Skip to content

Fix CI

Fix CI #701

name: build-and-test

Check failure on line 1 in .github/workflows/build-and-test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-and-test.yaml

Invalid workflow file

(Line: 15, Col: 11): Unrecognized named-value: 'env'. Located at position 1 within expression: env.zig_version
on:
push:
branches:
- '**'
pull_request:
schedule:
- cron: 0 4 * * *
env:
zig_version: 0.15.1
jobs:
test-with-zig-master:
name: Test / Zig ${{ env.zig_version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.zig_version }}
- run: zig fmt --check *.zig src/*.zig
- run: zig build
- run: zig build test
- run: zig build docs
- name: Upload docs artifact
if: github.ref == 'refs/heads/main' && github.event_name != 'schedule'
uses: actions/upload-pages-artifact@v3
with:
path: ./zig-out/docs/
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.zig_version }}
- run: zig build
- run: zig build test
deploy-pages:
runs-on: ubuntu-latest
needs: test-with-zig-master
if: github.ref == 'refs/heads/main' && github.event_name != 'schedule'
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4