From ee1ed38b105275e91f37691446630e4e60c02813 Mon Sep 17 00:00:00 2001 From: Schneems Date: Fri, 14 Jun 2024 10:46:29 -0500 Subject: [PATCH] Test getting started guide with ARM && AMD Previously, all Heroku runners used AMD (x86) CPU architecture. We added the ability to build and run on an ARM machine (aarch64, like an M3 Mac), but building binaries for ARM required a beta GitHub Action (GHA) runner. The GHA runner beta required extra invocations to setup tools on the machine (such as installing docker). The GHA ARM runners are now out of beta. This PR adds a test that exercises the ARM codepath on CI in addition to the existing AMD codepath. --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 699fe99e..1dad58c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,16 +60,19 @@ jobs: run: cargo test --locked -- --ignored print-pack-getting-started-output: - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-22.04-arm-medium' || 'ubuntu-latest' }} + strategy: + matrix: + arch: ["arm64", "amd64"] steps: - name: Checkout uses: actions/checkout@v4 - name: Install musl-tools - run: sudo apt-get install musl-tools --no-install-recommends + run: sudo apt-get install -y --no-install-recommends musl-tools - name: Update Rust toolchain run: rustup update - name: Install Rust linux-musl target - run: rustup target add x86_64-unknown-linux-musl + run: rustup target add ${{ matrix.arch == 'arm64' && 'aarch64-unknown-linux-musl' || 'x86_64-unknown-linux-musl' }} - name: Rust Cache uses: Swatinem/rust-cache@v2.7.3 - name: Install Pack CLI