From efeba609dbeacaea16f756bb638dfa44dfcaab67 Mon Sep 17 00:00:00 2001 From: Eirik Stanghelle Morland Date: Tue, 8 Jul 2025 01:24:03 +0200 Subject: [PATCH] Build in CI using a build matrix (#41) --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6af4dd17..a7b53c6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,15 +6,24 @@ on: branches-ignore: - gh-pages -env: - BOARD: sensorwatch_red - DISPLAY: classic - jobs: build: container: image: ghcr.io/armmbed/mbed-os-env:latest runs-on: ubuntu-latest + strategy: + matrix: + board: + - "sensorwatch_red" + - "sensorwatch_green" + - "sensorwatch_blue" + - "sensorwatch_pro" + display: + - "classic" + - "custom" + env: + BOARD: ${{ matrix.board }} + DISPLAY: ${{ matrix.display }} steps: - name: Checkout uses: actions/checkout@v4 @@ -28,12 +37,25 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: movement.uf2 + name: ${{ matrix.board }}-display-${{ matrix.display }}-movement.uf2 path: build/firmware.uf2 build-simulator: container: image: emscripten/emsdk + strategy: + matrix: + board: + - "sensorwatch_red" + - "sensorwatch_green" + - "sensorwatch_blue" + - "sensorwatch_pro" + display: + - "classic" + - "custom" + env: + BOARD: ${{ matrix.board }} + DISPLAY: ${{ matrix.display }} runs-on: ubuntu-latest steps: - name: Checkout @@ -52,5 +74,5 @@ jobs: - name: Upload simulator build uses: actions/upload-artifact@v4 with: - name: movement.tar.gz + name: ${{ matrix.board }}-display-${{ matrix.display }}-movement.tar.gz path: build-sim/movement.tar.gz