-
Notifications
You must be signed in to change notification settings - Fork 9
47 lines (40 loc) · 1.22 KB
/
test.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
name: Zig Build and Test
jobs:
build-and-test:
name: Build and Test on ${{ matrix.os }} (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# arm
- os: macos-latest
arch: aarch64
- os: macos-13
arch: x86_64
# x86
- os: ubuntu-latest
arch: x86_64
- os: windows-latest
arch: x86_64
steps:
- uses: actions/checkout@v2
- uses: AnimMouse/setup-ffmpeg@v1
- name: Set up Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Build and Test
run: |
if [ "${{ matrix.os }}" = "windows-latest" ]; then
zig build -Drelease -Dtarget=${{ matrix.arch }}-windows test
elif [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
zig build -Drelease -Dtarget=${{ matrix.arch }}-linux test
elif [[ "${{ matrix.os }}" == macos* ]]; then
zig build -Drelease -Dtarget=${{ matrix.arch }}-macos test
fi
shell: bash
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: test_output-${{ matrix.os }}-${{ matrix.arch }}
path: test_output/