name: Generic zig build on: workflow_dispatch: push: branches: - '*' jobs: build: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v4 - name: Setup Zig # No version given on purpose: setup-zig resolves it from # minimum_zig_version in build.zig.zon, so the toolchain cannot drift # from what the package declares. uses: https://codeberg.org/mlugg/setup-zig@v2.2.1 - name: Check formatting # Cheap and needs nothing fetched, so it runs before the build. There is # a pre-commit hook for this too; this catches a commit that skipped it. run: zig fmt --check . - name: Build project run: zig build --summary all - name: Run tests run: zig build test --summary all - name: Notify uses: https://git.lerch.org/lobo/action-notify-ntfy@v2 if: always() && env.GITEA_ACTIONS == 'true' with: host: ${{ secrets.NTFY_HOST }} topic: ${{ secrets.NTFY_TOPIC }} status: ${{ job.status }} user: ${{ secrets.NTFY_USER }} password: ${{ secrets.NTFY_PASSWORD }}