-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (62 loc) · 1.57 KB
/
build-and-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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build & Test
on:
push:
pull_request:
jobs:
build-and-test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
zig_version:
- latest
#- master - not compatible yet
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v1
with:
version: ${{ matrix.zig_version }}
- name: Install dependencies
shell: bash
run: |
sudo apt-get install libxi-dev libgl-dev libx11-dev
# kle tests not triggered from main,
# must figure out how to properly zig test
- run: |
zig build
zig build test
zig test src/kle.zig
zig test src/spsc_queue.zig
- uses: actions/upload-artifact@v4
if: always()
with:
name: klawa
path: zig-out/bin/klawa
retention-days: 2
if-no-files-found: error
run-functional-tests:
name: Run functional tests
needs:
- build-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: klawa
path: zig-out/bin/klawa
- name: Install dependencies
shell: bash
run: |
sudo apt-get install xserver-xephyr ffmpeg
- name: Run tests
shell: bash
run: |
cd tests && ./test.sh
- uses: actions/upload-artifact@v4
if: always()
with:
name: output.webm
path: tests/output.webm
retention-days: 2
if-no-files-found: error