build: ensure all examples build correctly #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux | |
on: | |
pull_request: | |
push: | |
branches: | |
- dev | |
- release | |
workflow_dispatch: | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- uses: acifani/setup-tinygo@v2 | |
with: | |
tinygo-version: '0.31.2' | |
- name: TinyGo version check | |
run: tinygo version | |
- name: Install gonew | |
run: go install golang.org/x/tools/cmd/gonew@latest | |
- name: Install Mechanoid CLI | |
run: go install github.com/hybridgroup/mechanoid/cmd/mecha@latest | |
- name: Mechanoid version check | |
run: mecha -v | |
smoketest: | |
strategy: | |
matrix: | |
project: [ | |
'blinky', | |
'buttons', | |
'display', | |
'externref', | |
'filestore', | |
'simple', | |
'thumby', | |
'wasmbadge', | |
'wasmdrone'] | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- name: Build project modules | |
run: mecha build | |
working-directory: ./${{ matrix.project }} | |
- name: Build project binary | |
run: tinygo build -o ${{ matrix.project }}.uf2 -target gopher-badge . | |
working-directory: ./${{ matrix.project }} |