-
Notifications
You must be signed in to change notification settings - Fork 11
43 lines (36 loc) · 1.09 KB
/
ci.yaml
File metadata and controls
43 lines (36 loc) · 1.09 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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
zig-version: [0.15.0]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
version: ${{ matrix.zig-version }}
- name: Check Formatting
if: runner.os != 'Windows' # zig fmt failing on Windows CI, unclear why
run: zig fmt --ast-check --check .
- name: Build for Windows
run: zig build example -Dtarget=x86_64-windows-gnu --summary all
- name: Build for Linux
run: zig build example -Dtarget=x86_64-linux-gnu --summary all
- name: Build for macOS
if: runner.os == 'macOS'
# We don't support cross compiling for macOS, so don't set a target just build
# the native target
run: zig build example --summary all