Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
bdd1e0f96This file is pinned to the selected release. Download the original to open it in your design tool.
name: Build Stack-chan Firmware
on:
push:
branches:
- develop
paths:
- 'firmware/**'
- 'web/package.json'
- 'web/package-lock.json'
- 'web/simulator/**'
- '.github/actions/setup/action.yml'
- '.github/workflows/build.yml'
- 'lefthook.yml'
pull_request:
branches:
- develop
paths:
- 'firmware/**'
- 'web/package.json'
- 'web/package-lock.json'
- 'web/simulator/**'
- '.github/actions/setup/action.yml'
- '.github/workflows/build.yml'
- 'lefthook.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: build-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
biome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup
- name: Run Biome
working-directory: ./firmware
run: npx biome ci . --error-on-warnings
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup
- name: Run firmware tests
working-directory: ./firmware
run: npm run test
- name: Run legacy name checks
working-directory: ./firmware
run: npm run check:legacy-names
- name: Run architecture checks
working-directory: ./firmware
run: npm run check:architecture
- name: Run Moddable module tests
working-directory: ./firmware
run: source "$HOME/.local/share/xs-dev-export.sh" && npm run test:moddable
- name: Smoke test Linux simulator startup
working-directory: ./firmware
run: source "$HOME/.local/share/xs-dev-export.sh" && npm run smoke:lin
- name: Run web simulator tests
working-directory: ./web
run: npm test
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: m5stack
command: npm run build:m5stack
- name: m5stack_cores3
command: npm run build:m5stack_cores3
- name: m5stackchan_cores3
command: npm run build:m5stackchan_cores3
- name: stackchan_rt
command: npm run build:stackchan_rt
- name: takao_core2_sg90
command: npm run build:takao_core2_sg90
- name: wasm
command: npm run build:wasm
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup
with:
install-emscripten: ${{ matrix.name == 'wasm' && 'true' || 'false' }}
- name: Build firmware (${{ matrix.name }})
working-directory: ./firmware
run: source "$HOME/.local/share/xs-dev-export.sh" && ${{ matrix.command }}