-
Notifications
You must be signed in to change notification settings - Fork 13
53 lines (38 loc) · 1.19 KB
/
zig.yml
File metadata and controls
53 lines (38 loc) · 1.19 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
name: Build & Tests
on:
push:
branches: [ main, zig-port ]
pull_request:
branches: [ main, zig-port ]
jobs:
c-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check GCC version
run: gcc --version
- name: Build C versions (C17 and C23)
run: cd c && make clean && make
- name: Test C17 executable runs
run: cd c && echo -e "hi\npython\nexit" | timeout 5 ./chat-c17 || true
- name: Test C23 executable runs
run: cd c && echo -e "hi\npython\nexit" | timeout 5 ./chat-c23 || true
- name: Compare binary sizes
run: |
echo "Binary sizes:"
ls -lh c/chat-c17 c/chat-c23
zig-build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.15.2
- name: Build Zig chatbot
run: cd zig && zig build
- name: Run Zig tests
run: cd zig && zig build test
- name: Test Zig executable runs
run: cd zig && echo -e "hi\npython\nexit" | timeout 5 ./zig-out/bin/chat || true
- name: Show binary size
run: ls -lh zig/zig-out/bin/chat