mirror of
https://github.com/krahets/hello-algo.git
synced 2026-10-30 12:16:13 +08:00
ci: add Zig 0.14.1 build and test workflow (#1863)
* ci: add Zig CI workflow Add GitHub Actions workflow for Zig (the only supported language without CI). Runs zig build and zig build test on ubuntu, macOS, and Windows. Targets Zig 0.14.1 per codes/zig/build.zig. Co-Authored-By: claude-flow <ruv@ruv.net> * ci: use a compatible macOS image for Zig 0.14.1 --------- Co-authored-by: Santosh Maturi <santhum@amazon.com> Co-authored-by: claude-flow <ruv@ruv.net> Co-authored-by: krahets <krahets@163.com>
This commit is contained in:
42
.github/workflows/zig.yml
vendored
Normal file
42
.github/workflows/zig.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Zig
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- ".github/workflows/zig.yml"
|
||||
- "codes/zig/**/*.zig"
|
||||
- "codes/zig/build.zig"
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- ".github/workflows/zig.yml"
|
||||
- "codes/zig/**/*.zig"
|
||||
- "codes/zig/build.zig"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
matrix:
|
||||
# Keep the macOS SDK compatible with Zig 0.14.1.
|
||||
os: [ubuntu-latest, macos-14, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: mlugg/setup-zig@v2
|
||||
with:
|
||||
version: "0.14.1"
|
||||
|
||||
- name: Build
|
||||
working-directory: codes/zig
|
||||
run: zig build
|
||||
|
||||
- name: Test
|
||||
working-directory: codes/zig
|
||||
run: zig build test
|
||||
Reference in New Issue
Block a user