Skip to content

Test on zig stable #692

Test on zig stable

Test on zig stable #692

name: build-and-test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.14.1
- run: zig fmt --check *.zig src/*.zig
- run: zig build
- run: zig build test
- run: cd examples/standalone && zig build
- 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: goto-bus-stop/setup-zig@v2
with:
version: 0.14.1
- run: zig build
- run: zig build test
deploy-pages:
runs-on: ubuntu-latest
needs: test-linux
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