-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.91 KB
/
ci.yml
File metadata and controls
58 lines (49 loc) · 1.91 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: CI
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
ZIG_VERSION: "0.16.0"
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- name: Install Zig 0.16.0
run: bash .github/scripts/install-zig.sh "${ZIG_VERSION}"
- name: Cache Zig build outputs
uses: actions/cache@v5
with:
path: |
.zig-cache
~/.cache/zig
key: zig-ubuntu-${{ hashFiles('src/**/*.zig', 'build.zig', 'build.zig.zon', 'test_runner.zig', 'support/autobahn/**/*.zig', 'support/autobahn/**/build.zig', 'support/autobahn/**/build.zig.zon', 'Dockerfile') }}
restore-keys: zig-ubuntu-
- name: non-blocking test
run: zig build test -Dforce_blocking=false
- name: blocking test
run: zig build test -Dforce_blocking=true
- name: build server native
run: cd support/autobahn/server && zig build
- name: build client native
run: cd support/autobahn/client && zig build
- name: build server x86-linux-gnu
run: cd support/autobahn/server && zig build -Dtarget=x86-linux-gnu
- name: build server x86_64-linux-gnu
run: cd support/autobahn/server && zig build -Dtarget=x86_64-linux-gnu
- name: build server x86_64-windows-gnu
run: cd support/autobahn/server && zig build -Dtarget=x86_64-windows-gnu
- name: build client x86-linux-gnu
run: cd support/autobahn/client && zig build -Dtarget=x86-linux-gnu
- name: build client x86_64-linux-gnu
run: cd support/autobahn/client && zig build -Dtarget=x86_64-linux-gnu
- name: build client x86_64-windows-gnu
run: cd support/autobahn/client && zig build -Dtarget=x86_64-windows-gnu
- name: build Docker test image
run: docker build -t websocket-zig16-test .