Add workaround for Zig's absence of inline assembly translation and u… #6
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: Zig Build | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
board: [pico, pico_w, pico2, pico2_w, pico2-riscv, pico2-riscv_w] | |
optimize: [Debug, ReleaseSafe, ReleaseFast, ReleaseSmall] | |
zig: [latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Zig Compiler | |
uses: mlugg/[email protected] | |
with: | |
version: ${{ matrix.zig }} | |
- name: Cache Toolchains | |
id: cache-toolchains | |
uses: actions/cache@v4 | |
with: | |
path: ./build/${{ matrix.board }}/${{ matrix.optimize }}/toolchain | |
key: ${{ matrix.board }}-${{ matrix.optimize }}-toolchain | |
- name: Cache Dependencies | |
id: cache-deps | |
uses: actions/cache@v4 | |
with: | |
path: ./build/${{ matrix.board }}/${{ matrix.optimize }}/_deps | |
key: ${{ matrix.board }}-${{ matrix.optimize }}-deps | |
- name: Build | |
run: zig build -Dboard=${{ matrix.board }} -Doptimize=${{ matrix.optimize }} -Dbuild_dir=./build/${{ matrix.board }}/${{ matrix.optimize }} | |
- name: Upload Build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.board }}-${{ matrix.optimize }} | |
path: "./build/${{ matrix.board }}/${{ matrix.optimize }}\n!./build/${{ matrix.board }}/${{ matrix.optimize }}/_deps\n!./build/${{ matrix.board }}/${{ matrix.optimize }}/toolchain" |