Skip to content

Move fuzz tests into fuzz.zig #83

Move fuzz tests into fuzz.zig

Move fuzz tests into fuzz.zig #83

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build-linux:
runs-on: ntnu-runners
steps:
- uses: actions/checkout@v4
- name: Install xz
run: sudo apt-get update && sudo apt-get install -y xz-utils
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- run: zig build test --summary all
- run: zig build install
- uses: actions/upload-artifact@v3
with:
name: crdt-server-linux
path: zig-out/bin/crdt-server
if-no-files-found: error
build-windows:
runs-on: ntnu-runners
steps:
- uses: actions/checkout@v4
- name: Install xz and wine
run: sudo apt-get update && sudo apt-get install -y xz-utils wine
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- run: zig build test -Dtarget=x86_64-windows-gnu -fwine --summary all
- run: zig build install -Dtarget=x86_64-windows-gnu
- uses: actions/upload-artifact@v3
with:
name: crdt-server-windows
path: zig-out/bin/crdt-server.exe
if-no-files-found: error
build-macos:
runs-on: ntnu-runners
steps:
- uses: actions/checkout@v4
- name: Install xz
run: sudo apt-get update && sudo apt-get install -y xz-utils
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- run: zig build install -Dtarget=x86_64-macos-none
- uses: actions/upload-artifact@v3
with:
name: crdt-server-macos-x86_64
path: zig-out/bin/crdt-server
if-no-files-found: error
- run: zig build install -Dtarget=aarch64-macos-none
- uses: actions/upload-artifact@v3
with:
name: crdt-server-macos-aarch64
path: zig-out/bin/crdt-server
if-no-files-found: error
build-docs:
runs-on: ntnu-runners
steps:
- uses: actions/checkout@v4
- name: Install xz
run: sudo apt-get update && sudo apt-get install -y xz-utils
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- run: zig build docs
- name: Combine docs
run: |
mkdir -p staging/lib staging/server
cp -r zig-out/docs/lib/* staging/lib/
cp -r zig-out/docs/server/* staging/server/
cp .github/pages/index.html staging/
- uses: actions/upload-pages-artifact@v2
with:
path: staging
deploy-docs:
if: github.ref == 'refs/heads/master'
needs: build-docs
runs-on: ntnu-runners
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v3
id: deployment