Skip to content

CI

CI #624

Workflow file for this run

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'
env:
ZIG_VERSION: 0.12.0
jobs:
test:
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ env.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@v4
- uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Build
run: |
zig build -Dtarget=${{ matrix.targets }} -Dis_ci