2021-12-05 20:58:44 +08:00
|
|
|
name: Build
|
|
|
|
|
2021-12-12 04:29:27 +08:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- gh-pages
|
2021-12-05 20:58:44 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
container:
|
|
|
|
image: ghcr.io/armmbed/mbed-os-env:latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-20 20:38:39 +08:00
|
|
|
uses: actions/checkout@v3
|
2022-04-20 20:50:25 +08:00
|
|
|
- name: Work around CVE-2022-24765
|
|
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
2021-12-12 03:33:58 +08:00
|
|
|
- name: Compile starter-project app
|
2021-12-05 20:58:44 +08:00
|
|
|
run: make
|
2021-12-12 03:33:58 +08:00
|
|
|
working-directory: 'apps/starter-project'
|
|
|
|
- name: Compile accelerometer-test app
|
|
|
|
run: make
|
|
|
|
working-directory: 'apps/accelerometer-test'
|
2022-01-19 22:23:21 +08:00
|
|
|
- name: Compile movement
|
|
|
|
run: make
|
|
|
|
working-directory: 'movement/make'
|
2021-12-06 01:37:44 +08:00
|
|
|
- name: Upload UF2
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-12-12 04:29:27 +08:00
|
|
|
name: watch.uf2
|
2022-01-19 22:23:21 +08:00
|
|
|
path: movement/make/build/watch.uf2
|
2022-01-26 07:09:56 +08:00
|
|
|
|
|
|
|
build-simulator:
|
|
|
|
container:
|
|
|
|
image: emscripten/emsdk
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-20 20:38:39 +08:00
|
|
|
uses: actions/checkout@v3
|
2022-01-26 07:09:56 +08:00
|
|
|
- name: Compile movement
|
|
|
|
run: emmake make
|
|
|
|
working-directory: 'movement/make'
|
|
|
|
- name: Archive simulator build
|
|
|
|
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
|