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 .