mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-22 11:10:29 +08:00
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: Build
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches-ignore:
|
|
- gh-pages
|
|
|
|
env:
|
|
COLOR: BLUE
|
|
|
|
jobs:
|
|
build:
|
|
container:
|
|
image: ghcr.io/armmbed/mbed-os-env:latest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Work around CVE-2022-24765
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
- name: Compile starter-project app
|
|
run: make
|
|
working-directory: 'apps/starter-project'
|
|
- name: Compile accelerometer-test app
|
|
run: make
|
|
working-directory: 'apps/accelerometer-test'
|
|
- name: Compile movement
|
|
run: make
|
|
working-directory: 'movement/make'
|
|
- name: Upload UF2
|
|
uses: actions/upload-artifact@v4
|
|
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@v3
|
|
- name: Work around CVE-2022-24765
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
- name: Compile movement
|
|
run: emmake make
|
|
working-directory: 'movement/make'
|
|
- name: Archive simulator build
|
|
working-directory: 'movement/make/build-sim'
|
|
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@v4
|
|
with:
|
|
name: simulator.tar.gz
|
|
path: movement/make/build-sim/simulator.tar.gz
|