Skip to content

fix: remove Windows from CI matrix (no Windows Zig binary in pantry) #16

fix: remove Windows from CI matrix (no Windows Zig binary in pantry)

fix: remove Windows from CI matrix (no Windows Zig binary in pantry) #16

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
name: Test on ${{ matrix.os }} with Zig ${{ matrix.zig-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
zig-version: ['0.15.1']
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Zig
uses: home-lang/pantry-setup@v1
with:
packages: ziglang.org@${{ matrix.zig-version }}
- name: Verify Zig installation
run: zig version
- name: Build framework
run: zig build
- name: Run tests
run: zig build test
- name: Run examples
run: zig build examples
lint:
name: Lint and Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Zig
uses: home-lang/pantry-setup@v1
with:
packages: ziglang.org@0.15.1
- name: Check formatting
run: zig fmt --check .
build-docs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Zig
uses: home-lang/pantry-setup@v1
with:
packages: ziglang.org@0.15.1
- name: Generate docs
run: zig build-lib -femit-docs src/lib.zig
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Zig
uses: home-lang/pantry-setup@v1
with:
packages: ziglang.org@0.15.1
- name: Install kcov
continue-on-error: true
id: install-kcov
run: |
sudo apt-get update
sudo apt-get install -y kcov
- name: Build framework
if: steps.install-kcov.outcome == 'success'
run: zig build
- name: Run tests with coverage
if: steps.install-kcov.outcome == 'success'
run: ./zig-out/bin/zig-test --test-dir tests --coverage
- name: Upload coverage to Codecov
if: steps.install-kcov.outcome == 'success'
uses: codecov/codecov-action@v4
with:
directory: ./coverage
fail_ci_if_error: false
verbose: true
- name: Upload coverage artifact
if: steps.install-kcov.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/
- name: Coverage skipped
if: steps.install-kcov.outcome != 'success'
run: echo "kcov not available on this platform, skipping coverage"