diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 663ffa1..c876818 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,11 +1,10 @@ -# Gitea Actions. Every job runs in a pinned nixos/nix container with plain shell steps only: +# Gitea Actions, triggered only by pushed v* tags (the runner is slow): tests, then release. Every job runs in a pinned nixos/nix container with plain shell steps only: # the runner image has no Node, so JavaScript actions (actions/checkout, ...) cannot run. # Tooling comes from devbox (nix run nixpkgs#devbox), which honours devbox.lock like local runs. # Release upload goes through the Gitea REST API with the built-in job token. name: ci on: push: - branches: ["**"] tags: ["v*"] env: @@ -15,7 +14,7 @@ env: filter-syscalls = false jobs: - test: + release: runs-on: ubuntu-latest container: nixos/nix:2.36.0 steps: @@ -23,7 +22,6 @@ jobs: run: | set -euo pipefail nix profile install nixpkgs#git nixpkgs#curl nixpkgs#devbox - git --version && devbox version - name: Checkout run: | set -euo pipefail @@ -31,22 +29,6 @@ jobs: git -C src checkout --detach "${{ github.sha }}" - name: Test run: cd src && devbox run test - - release: - if: startsWith(github.ref, 'refs/tags/v') - needs: test - runs-on: ubuntu-latest - container: nixos/nix:2.36.0 - steps: - - name: Prepare tools - run: | - set -euo pipefail - nix profile install nixpkgs#git nixpkgs#curl nixpkgs#devbox - - name: Checkout - run: | - set -euo pipefail - git clone "${{ github.server_url }}/${{ github.repository }}.git" src - git -C src checkout --detach "${{ github.sha }}" - name: Build all targets and checksums run: | set -euo pipefail diff --git a/AGENTS.md b/AGENTS.md index 83c2a86..91bff35 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -28,3 +28,6 @@ Known zig 0.16 quirks (documented in build.sh): do not use `--opt:size`; linux-m ## Conventions - Errors: raise `SirmemError` (via `fail`); main prints `sirmem: error: ...`, exit 1. Warnings go to `Store.warnings` (stderr). - Relations are always rewritten through `saveRels` (sorted, unique, atomic). + +## CI / release +CI runs only on pushed `v*` tags (`.gitea/workflows/release.yml`: tests, cross-build, release). It never runs on branch pushes, so run `devbox run test` locally before tagging.