ci: Add CI workflows

The push.yml workflow builds the manager and then places it in the $HOME
of the runner.  The issue.ym then uses the cached tool binary to update
the techtree information whenever any issue is changed.  This approach
of course only works as long as only one runner is connected to this
repository.

In the long run, this approach shall be replaced by a nix build of the
techtree-manager which is then cached by the OS instead of manually.
This commit is contained in:
Rahix 2025-05-22 09:49:33 +02:00
parent 04047052e3
commit 77abf68e3c
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,14 @@
on:
issues:
types: [opened, reopened, closed, labeled, unlabeled, edited]
jobs:
test:
runs-on: self-hosted-nixos-x86_64
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- name: Check techtree-manager presence
run: |
test -e ~/.cache/fafo-techtree/techtree-manager
- name: Run techtree-manager
run: cd techtree-manager/ && nix-shell shell.nix --run ~/.cache/fafo-techtree/techtree-manager

View file

@ -0,0 +1,14 @@
on:
push:
jobs:
build:
runs-on: self-hosted-nixos-x86_64
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- name: Build techtree manager tool
run: cd techtree-manager/ && nix-shell shell.nix --run "cargo build --release"
- name: Cache the techtree manager tool
run: |
mkdir -p ~/.cache/fafo-techtree
cp -v techtree-manager/target/release/techtree-manager ~/.cache/fafo-techtree/techtree-manager