From 20056ea33e3eafee5ba42e8ad494af9f4b35b792 Mon Sep 17 00:00:00 2001 From: Michael Nightingale <9887246+mnightingale@users.noreply.github.com> Date: Sat, 28 Oct 2023 12:55:37 +0100 Subject: [PATCH] Matrix --- .github/workflows/build.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d1590a..3f8a375 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,34 +4,44 @@ on: [ push ] jobs: build: - runs-on: ubuntu-latest + name: Build ${{ matrix.os }} ${{ matrix.platform }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + platform: linux/amd64 + - os: ubuntu-latest + platform: linux/arm64 steps: - name: Checkout code uses: actions/checkout@v4 -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 -# with: -# platforms: arm64 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - - uses: docker/setup-buildx-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - uses: docker/build-push-action@v4 + - name: Build cross-compilation environment + uses: docker/build-push-action@v4 with: context: . + platforms: linux/amd64,linux/arm64 tags: builder:latest load: true cache-from: type=gha cache-to: type=gha,mode=max push: false - - name: Run the build process with Docker + - name: Build with Docker uses: addnab/docker-run-action@v3 with: image: builder:latest options: | - --platform linux/amd64 + --platform ${{ matrix.platform }} --workdir /usr/src/rapidyenc run: | cmake -B build .