Build #1398
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: Build | |
on: | |
push: | |
branches: [main, zig-master] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
matrix: | |
os: [ | |
ubuntu-latest, | |
windows-latest, | |
macos-latest, | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.13.0 | |
- name: Build | |
run: zig build -Doptimize=ReleaseSmall | |
- name: Unit Test Ports | |
run: zig build run-port-tests -Doptimize=ReleaseSmall | |
- name: Build Website | |
run: zig build | |
working-directory: website | |
- name: Dry run packaging | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
MICROZIG_VERSION=$(zig build package -- get-version) | |
echo microzig version: $MICROZIG_VERSION | |
zig build package -- http://localhost:8000 | |
python3 -m http.server 8000 --directory boxzer-out & | |
sleep 1 | |
cd tools/package-test | |
zig fetch --save=microzig/port/raspberrypi/rp2xxx http://localhost:8000/${MICROZIG_VERSION}/port/raspberrypi/rp2xxx.tar.gz | |
zig build -Doptimize=ReleaseSmall | |
zig build run-port-tests | |
# clean up server | |
jobs -p | xargs kill |