-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (36 loc) · 928 Bytes
/
main.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
name: ci
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
# Cancels pending runs when a PR gets updated.
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}
cancel-in-progress: true
jobs:
lint-and-build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Read .zig-version
id: zigversion
uses: juliangruber/read-file-action@v1
with:
path: ./.zigversion
- name: Install Zig
uses: mlugg/setup-zig@v1
with:
version: ${{ steps.zigversion.outputs.content }}
- name: Check format
continue-on-error: true
run: zig fmt --check .
- name: Build and run tests
run: zig build test