44 branches : [main, zig-master]
55 pull_request :
66 branches : [main, zig-master]
7+ workflow_dispatch :
78
89env :
910 ZIG_VERSION : ${{ github.ref == 'refs/heads/zig-master' && 'master' || '0.13.0' }}
1011
1112jobs :
12- build :
13- name : Build
14- runs-on : ${{ matrix.os }}
15- steps :
16- - name : Checkout
17- uses : actions/checkout@v4
18- - name : Setup Zig
19- uses : mlugg/setup-zig@v1
20- with :
21- version : ${{ env.ZIG_VERSION }}
22- - name : Build
23- run : zig build -Doptimize=ReleaseSmall
24-
25- unit-test-ports :
26- name : Unit Test Ports
27- runs-on : ${{ matrix.os }}
28- needs : build
29- strategy :
30- matrix :
31- os : [ubuntu-latest, windows-latest, macos-latest]
32- port_dir : [gigadevice/gd32, raspberrypi/rp2xxx, stmicro/stm32]
33- steps :
34- - name : Checkout
35- uses : actions/checkout@v4
36- - name : Setup Zig
37- uses : mlugg/setup-zig@v1
38- with :
39- version : ${{ env.ZIG_VERSION }}
40- - name : Unit Test Ports
41- run : zig build test
42- working-directory : port/${{ matrix.port_dir }}
43-
4413 unit-test-regz :
4514 name : Unit Test Regz
15+ continue-on-error : true
4616 strategy :
4717 matrix :
4818 os : [ubuntu-latest, windows-latest, macos-latest]
6030
6131 unit-test-uf2 :
6232 name : Unit Test UF2
33+ continue-on-error : true
6334 strategy :
6435 matrix :
6536 os : [ubuntu-latest, windows-latest, macos-latest]
@@ -75,48 +46,71 @@ jobs:
7546 run : zig build test
7647 working-directory : tools/uf2
7748
78- build-website :
79- name : Build Website
49+ stm32-gen-check :
50+ name : Check that stm32 generated code is up to date
51+ continue-on-error : true
8052 runs-on : ubuntu-latest
53+ steps :
54+ - name : Checkout code
55+ uses : actions/checkout@v3
56+ - name : Setup Zig
57+ uses : mlugg/setup-zig@v1
58+ with :
59+ version : ${{ env.ZIG_VERSION }}
60+ - name : Generate Code
61+ run : zig build -Dgenerate
62+ working-directory : port/stmicro/stm32
63+ - name : Check for code diffs
64+ run : |
65+ if [[ $(git status --porcelain | grep -v '^??') ]]; then
66+ echo "Code differences detected:"
67+ git diff
68+ echo "Please commit or fix these changes to proceed."
69+ exit 1
70+ else
71+ echo "No code differences detected."
72+ fi
73+
74+ build :
75+ name : Build
76+ continue-on-error : true
77+ runs-on : ${{ matrix.os }}
78+ strategy :
79+ matrix :
80+ os : [ubuntu-latest, windows-latest, macos-latest]
8181 steps :
8282 - name : Checkout
8383 uses : actions/checkout@v4
8484 - name : Setup Zig
8585 uses : mlugg/setup-zig@v1
8686 with :
8787 version : ${{ env.ZIG_VERSION }}
88- - name : Build Website
89- run : zig build
90- working-directory : website
88+ - name : Build
89+ run : zig build -Doptimize=ReleaseSmall
9190
92- dry-run-packaging :
93- name : Dry Run Packaging
94- runs-on : macos-latest
91+ unit-test-ports :
92+ name : Unit Test Ports
93+ continue-on-error : true
94+ runs-on : ${{ matrix.os }}
95+ strategy :
96+ matrix :
97+ os : [ubuntu-latest, windows-latest, macos-latest]
98+ port_dir : [gigadevice/gd32, raspberrypi/rp2xxx, stmicro/stm32]
9599 steps :
96100 - name : Checkout
97101 uses : actions/checkout@v4
98102 - name : Setup Zig
99103 uses : mlugg/setup-zig@v1
100104 with :
101105 version : ${{ env.ZIG_VERSION }}
102- - name : Dry Run Packaging
103- run : |
104- MICROZIG_VERSION=$(zig build package -- get-version)
105- echo microzig version: $MICROZIG_VERSION
106- zig build package -- http://localhost:8000
107- python3 -m http.server 8000 --directory boxzer-out &
108- sleep 1
109-
110- cd tools/package-test
111- zig fetch --save=microzig http://localhost:8000/${MICROZIG_VERSION}/microzig.tar.gz
112- zig build -Doptimize=ReleaseSmall
113-
114- jobs -p | xargs kill
106+ - name : Unit Test Ports
107+ run : zig build test
108+ working-directory : port/${{ matrix.port_dir }}
115109
116110 build-examples :
117111 name : Build Examples
112+ continue-on-error : true
118113 runs-on : ubuntu-latest
119- needs : build
120114 strategy :
121115 matrix :
122116 example_dir :
@@ -142,26 +136,44 @@ jobs:
142136 run : zig build -Doptimize=ReleaseSmall --summary all
143137 working-directory : examples/${{ matrix.example_dir }}
144138
145- stm32-gen-check :
146- name : Check that stm32 generated code is up to date
139+
140+
141+ build-website :
142+ name : Build Website
143+ continue-on-error : true
147144 runs-on : ubuntu-latest
148145 steps :
149- - name : Checkout code
150- uses : actions/checkout@v3
146+ - name : Checkout
147+ uses : actions/checkout@v4
151148 - name : Setup Zig
152149 uses : mlugg/setup-zig@v1
153150 with :
154151 version : ${{ env.ZIG_VERSION }}
155- - name : Generate Code
156- run : zig build -Dgenerate
157- working-directory : port/stmicro/stm32
158- - name : Check for code diffs
152+ - name : Build Website
153+ run : zig build
154+ working-directory : website
155+
156+ dry-run-packaging :
157+ name : Dry Run Packaging
158+ continue-on-error : true
159+ runs-on : macos-latest
160+ steps :
161+ - name : Checkout
162+ uses : actions/checkout@v4
163+ - name : Setup Zig
164+ uses : mlugg/setup-zig@v1
165+ with :
166+ version : ${{ env.ZIG_VERSION }}
167+ - name : Dry Run Packaging
159168 run : |
160- if [[ $(git status --porcelain | grep -v '^??') ]]; then
161- echo "Code differences detected:"
162- git diff
163- echo "Please commit or fix these changes to proceed."
164- exit 1
165- else
166- echo "No code differences detected."
167- fi
169+ MICROZIG_VERSION=$(zig build package -- get-version)
170+ echo microzig version: $MICROZIG_VERSION
171+ zig build package -- http://localhost:8000
172+ python3 -m http.server 8000 --directory boxzer-out &
173+ sleep 1
174+
175+ cd tools/package-test
176+ zig fetch --save=microzig http://localhost:8000/${MICROZIG_VERSION}/microzig.tar.gz
177+ zig build -Doptimize=ReleaseSmall
178+
179+ jobs -p | xargs kill
0 commit comments