also looking at this
ci: define and enforce the Zig toolchain policy
#16
9 files
+97
-25
| @@ -0,0 +1,23 @@ | ||
| 1 | # Zig toolchain policy | |
| 2 | ||
| 3 | The Zig Test Framework supports the exact Zig development build recorded in | |
| 4 | `.zig-version`. Required CI jobs use that version so pull requests are tested | |
| 5 | against a reproducible toolchain. | |
| 6 | ||
| 7 | Because the project follows Zig development builds, CI also runs a scheduled | |
| 8 | compatibility check against the latest `0.17.0-dev` build. That check is | |
| 9 | informational: an upstream API change should produce an intentional toolchain | |
| 10 | update rather than unexpectedly blocking unrelated pull requests. | |
| 11 | ||
| 12 | ## Updating Zig | |
| 13 | ||
| 14 | 1. Replace the version in `.zig-version` with the full output of `zig version`. | |
| 15 | 2. Run `zig fmt --check .`. | |
| 16 | 3. Run `zig build`, `zig build test`, and `zig build examples`. | |
| 17 | 4. Run `zig build-lib -femit-docs src/lib.zig` and remove the generated local | |
| 18 | artifacts after verifying the command succeeds. | |
| 19 | 5. Summarize required compatibility changes in the pull request and, for a | |
| 20 | release, in the changelog. | |
| 21 | ||
| 22 | The compatibility job can also be run manually from GitHub Actions before | |
| 23 | updating the pinned version. | |