Skip to content

Commit

Permalink
Use buildjet runners for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
ranisalt committed Dec 16, 2023
1 parent b794bd9 commit e1b4b77
Showing 1 changed file with 21 additions and 36 deletions.
57 changes: 21 additions & 36 deletions .github/workflows/dummy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:
runs-on: ubuntu-latest

container:
image: node:20-alpine
image: node:lts-alpine

steps:
- name: Install build deps
run: apk add make g++ python3 git
run: apk add --no-cache g++ git make python3

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -64,48 +64,33 @@ jobs:
build-arm:
strategy:
matrix:
include:
- arch: aarch64
distro: ubuntu_latest
- arch: aarch64
distro: alpine_latest
image: [lts-slim, lts-alpine]

name: Build on arm64
runs-on: ubuntu-latest
runs-on: buildjet-2vcpu-ubuntu-2204-arm

container:
image: node:${{ matrix.image }}

steps:
- name: Install build deps
if: matrix.image == 'lts-slim'
run: apt update -yq && apt install -yq g++ git make python3

- name: Install build deps
if: matrix.image == 'lts-alpine'
run: apk add --no-cache g++ git make python3

- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Prebuild
uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
setup: mkdir -p "${PWD}/artifacts"
dockerRunArgs: --volume "${PWD}:/repo"
install: |
case "${{ matrix.distro }}" in
ubuntu*)
apt update -yq
apt install -yq ca-certificates curl g++ gnupg make python3
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >> /etc/apt/sources.list.d/nodesource.list
apt update -yq
apt install -yq nodejs yarn
;;
alpine*)
apk add --update make g++ python3
apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.19/main/ nodejs~=20 yarn
;;
esac
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts

run: |
cd /repo
yarn install --frozen-lockfile --ignore-scripts
yarn build
- name: Prebuild
run: yarn build

- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -140,11 +125,11 @@ jobs:

publish:
name: Publish package
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: [build, build-alpine, build-arm, build-freebsd]

container:
image: node:20-alpine
image: node:alpine

steps:
- name: Checkout
Expand Down

0 comments on commit e1b4b77

Please sign in to comment.