Skip to content

CI

CI #736

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