]> git.earman.xyz Git - sensor-watch.git/commitdiff
Add GitHub Workflow job to build and archive simulator
authorAlexsander Akers <me@a2.io>
Tue, 25 Jan 2022 23:09:56 +0000 (18:09 -0500)
committerAlexsander Akers <me@a2.io>
Tue, 25 Jan 2022 23:13:51 +0000 (18:13 -0500)
.github/workflows/build.yml

index 93928721463bc8f64f49d17e2520150160841d7c..7439d32e3392c2b60126b9adf26b4fee76d054ce 100644 (file)
@@ -28,3 +28,31 @@ jobs:
         with:
           name: watch.uf2
           path: movement/make/build/watch.uf2
+
+  build-simulator:
+    container:
+      image: emscripten/emsdk
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+      - name: Compile starter-project app
+        run: emmake make
+        working-directory: 'apps/starter-project'
+      - name: Compile accelerometer-test app
+        run: emmake make
+        working-directory: 'apps/accelerometer-test'
+      - name: Compile movement
+        run: emmake make
+        working-directory: 'movement/make'
+      - name: Archive simulator build
+        if: ${{ matrix.target == 'simulator' }}
+        working-directory: 'movement/make/build'
+        run: |
+          cp watch.html index.html
+          tar -czf simulator.tar.gz index.html watch.wasm watch.js
+      - name: Upload simulator build
+        uses: actions/upload-artifact@v2
+        with:
+          name: simulator.tar.gz
+          path: movement/make/build/simulator.tar.gz