From e1b4b77e4d0d24abc9e5a73c40c786553a25b580 Mon Sep 17 00:00:00 2001 From: Ranieri Althoff Date: Sat, 16 Dec 2023 02:31:51 +0100 Subject: [PATCH] Use buildjet runners for arm64 --- .github/workflows/dummy-release.yml | 57 +++++++++++------------------ 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/.github/workflows/dummy-release.yml b/.github/workflows/dummy-release.yml index ddb0726..8d34a82 100644 --- a/.github/workflows/dummy-release.yml +++ b/.github/workflows/dummy-release.yml @@ -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 @@ -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 @@ -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