-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (68 loc) · 1.59 KB
/
test.yaml
File metadata and controls
81 lines (68 loc) · 1.59 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Test
permissions:
checks: write
on:
pull_request:
branches:
- main
paths:
- ".github/workflows/**"
- "src/**"
- "examples/**"
- "libs/**"
- "tools/**"
- "build.zig"
- "build.zig.zon"
push:
paths:
- ".github/workflows/**"
- "src/**"
- "examples/**"
- "libs/**"
- "tools/**"
- "build.zig"
- "build.zig.zon"
concurrency:
# Cancels pending runs when a PR gets updated.
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}
cancel-in-progress: true
jobs:
validation:
name: Validation
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: true
- name: Install Zig
uses: mlugg/setup-zig@v2
- name: Lint
run: zig fmt --check . --exclude libs/
build-examples:
needs: ["validation"]
strategy:
fail-fast: false
matrix:
os:
- linux-large
- macos-15-large
- windows-large
runs-on: ${{matrix.os}}
name: "Build examples"
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: false
- if: matrix.os == 'linux-large'
run: sudo ln -s /usr/lib/x86_64-linux-gnu/libX11.so.6 /usr/lib/x86_64-linux-gnu/libX11.so
- name: Install Zig
uses: mlugg/setup-zig@v2
with:
cache-size-limit: 4096
- name: Build examples
shell: bash
run: cd examples/ && zig build