ci: trigger only on v* tags, run tests inside the release job
ci / release (push) Failing after 1m6s
ci / release (push) Failing after 1m6s
This commit is contained in:
@@ -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.
|
# 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.
|
# 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.
|
# Release upload goes through the Gitea REST API with the built-in job token.
|
||||||
name: ci
|
name: ci
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["**"]
|
|
||||||
tags: ["v*"]
|
tags: ["v*"]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -15,7 +14,7 @@ env:
|
|||||||
filter-syscalls = false
|
filter-syscalls = false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: nixos/nix:2.36.0
|
container: nixos/nix:2.36.0
|
||||||
steps:
|
steps:
|
||||||
@@ -23,7 +22,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
nix profile install nixpkgs#git nixpkgs#curl nixpkgs#devbox
|
nix profile install nixpkgs#git nixpkgs#curl nixpkgs#devbox
|
||||||
git --version && devbox version
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -31,22 +29,6 @@ jobs:
|
|||||||
git -C src checkout --detach "${{ github.sha }}"
|
git -C src checkout --detach "${{ github.sha }}"
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cd src && devbox run 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
|
- name: Build all targets and checksums
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|||||||
@@ -28,3 +28,6 @@ Known zig 0.16 quirks (documented in build.sh): do not use `--opt:size`; linux-m
|
|||||||
## Conventions
|
## Conventions
|
||||||
- Errors: raise `SirmemError` (via `fail`); main prints `sirmem: error: ...`, exit 1. Warnings go to `Store.warnings` (stderr).
|
- 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).
|
- 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.
|
||||||
|
|||||||
Reference in New Issue
Block a user