CI #540
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: CI | |
on: | |
schedule: | |
- cron: '10 20 * * *' | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- '**.zig' | |
- '.github/workflows/CI.yml' | |
push: | |
branches: | |
- main | |
paths: | |
- '**.zig' | |
- '.github/workflows/CI.yml' | |
jobs: | |
test: | |
timeout-minutes: 10 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
zig-version: [master] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: ${{ matrix.zig-version }} | |
- name: fmt and test(windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
zig.exe fmt --check . | |
zig.exe build test -Dis_ci=true | |
zig.exe build -Dis_ci=true | |
- name: fmt and test(unix) | |
if: matrix.os != 'windows-latest' | |
run: | | |
zig fmt --check . | |
zig build test -Dis_ci=true | |
zig build -Dis_ci=true | |
cross-compile: | |
timeout-minutes: 10 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
targets: [x86_64-windows, x86_64-linux, x86_64-macos, aarch64-macos] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: goto-bus-stop/setup-zig@v1 | |
with: | |
version: master | |
- name: Build | |
run: | | |
zig build -Dtarget=${{ matrix.targets }} -Dis_ci |