-
-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (59 loc) · 1.44 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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]
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: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Build
run: |
zig build -Dtarget=${{ matrix.targets }} -Dis_ci