Skip to content

Commit

Permalink
Matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
mnightingale committed Oct 28, 2023
1 parent d6d992c commit 20056ea
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down

0 comments on commit 20056ea

Please sign in to comment.