webui/.github/workflows/zig.yml
2024-06-09 11:38:59 +08:00

37 lines
1.0 KiB
YAML

name: Zig Build
on:
workflow_call:
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: [0.11.0, 0.12.0, 0.13.0, '']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS'
with:
xcode-version: latest-stable
- uses: actions/checkout@v4
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ matrix.version }}
- name: Build static library
run: zig build -Dverbose
- name: Build dynamic library
if: ${{ !cancelled() }}
run: zig build -Ddynamic -Dverbose
- name: Build static library with TLS support
if: runner.os == 'Linux'
run: zig build -Denable-tls -Dverbose
- name: Build dynamic library with TLS support
if: runner.os == 'Linux'
run: zig build -Ddynamic -Denable-tls -Dverbose
- name: Build examples
run: zig build examples