]> git.earman.xyz Git - sensor-watch.git/commitdiff
Build in CI using a build matrix (#41)
authorEirik Stanghelle Morland <eirik@morland.no>
Mon, 7 Jul 2025 23:24:03 +0000 (01:24 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Jul 2025 23:24:03 +0000 (19:24 -0400)
.github/workflows/build.yml

index 6af4dd171493b86aa47fb5942cae99f51d9c2e1a..a7b53c6c363f4ecdd67ff1de501d9f4c9d944ed9 100644 (file)
@@ -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