-
Notifications
You must be signed in to change notification settings - Fork 10
51 lines (47 loc) · 1.04 KB
/
zig-test.yaml
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
name: zig-test
on:
push:
branches:
- main
- master
tags:
- '*'
pull_request:
branches:
- main
paths:
- "zig/**"
- ".github/workflows/zig-test.yaml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-and-test:
defaults:
run:
working-directory: "zig"
strategy:
matrix:
os: [macos-12, macos-latest, ubuntu-20.04, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: korandoru/setup-zig@v1
with:
zig-version: master
- name: Ready msys2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain
path-type: inherit
if: matrix.os == 'windows-latest'
- name: Check
run: zig fmt --check .
if: matrix.os != 'windows-latest'
- name: Build and Test
run: zig build test