From 3181c5fcdee6fb00b7fde946e2c625e7f8ad4401 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 1 Dec 2022 10:30:22 -0800 Subject: [PATCH] ci: Run test on both platforms --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80032f33..2a4daafe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,8 +46,14 @@ jobs: tag: ${{ env.TAG }} test: + name: test (${{ matrix.platform }}) needs: build runs-on: ubuntu-latest + strategy: + matrix: + platform: + - linux/amd64 + - linux/arm64 steps: - uses: docker/login-action@v1 @@ -60,11 +66,18 @@ jobs: with: python-version: ~3 + # The ubuntu-latest runner is linux/amd64 so anything else will + # run with emulation, which is still better than nothing. + - if: matrix.platform != 'linux/amd64' + uses: docker/setup-qemu-action@v2 + - name: Run zika-tutorial run: | git clone https://github.com/nextstrain/zika-tutorial pip install nextstrain-cli nextstrain build --image ghcr.io/nextstrain/base:${{ needs.build.outputs.tag }} zika-tutorial -F + env: + DOCKER_DEFAULT_PLATFORM: ${{ matrix.platform }} push-branch: if: startsWith(needs.build.outputs.tag, 'branch-') && github.event_name != 'pull_request'