Fix attic push
build-dev / nix-build (push) Successful in 43s

This commit is contained in:
NeilClack
2026-08-23 15:12:35 -05:00
parent f2a40cd019
commit 9e73c82641
+13 -12
View File
@@ -1,11 +1,9 @@
name: build-dev name: build-dev
on: on:
# Every push to dev: build, run the offline test suite, publish to the # Every push to dev: build, run the offline test suite, publish to the
# dev Attic cache. # dev Attic cache.
push: push:
branches: [dev] branches: [dev]
jobs: jobs:
nix-build: nix-build:
runs-on: build-server runs-on: build-server
@@ -20,7 +18,6 @@ jobs:
"${{ gitea.server_url }}/${{ gitea.repository }}.git" . "${{ gitea.server_url }}/${{ gitea.repository }}.git" .
test -f flake.nix test -f flake.nix
git log --oneline -1 git log --oneline -1
- name: Inspect workspace - name: Inspect workspace
run: | run: |
pwd pwd
@@ -29,22 +26,26 @@ jobs:
git remote -v 2>&1 || true git remote -v 2>&1 || true
git describe --tags --always 2>&1 || true git describe --tags --always 2>&1 || true
test -f flake.nix && echo "flake.nix present" || echo "NO flake.nix" test -f flake.nix && echo "flake.nix present" || echo "NO flake.nix"
# Dev builds fingerprint as the short commit hash. # Dev builds fingerprint as the short commit hash.
# Persisted via GITHUB_ENV so the impure nix eval below reads it via # Persisted via GITHUB_ENV so the impure nix eval below reads it via
# builtins.getEnv. # builtins.getEnv.
- name: Compute version - name: Compute version
run: | run: |
echo "APP_VERSION=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV" echo "APP_VERSION=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
# checks is keyed per-system (checks.<system>.default); nix build's # checks is keyed per-system (checks.<system>.default); nix build's
# #attr shorthand can't resolve it, so resolve the current system inline. # #attr shorthand can't resolve it, so resolve the current system inline.
# --impure lets the flake read APP_VERSION via builtins.getEnv # --impure lets the flake read APP_VERSION via builtins.getEnv
# (pure evals always get the package defaults). The offline test suite # (pure evals always get the package defaults).
# runs in the package's checkPhase. - name: Build package
run: |
nix build -L ".#packages.$(nix eval --impure --raw --expr 'builtins.currentSystem').default" \
--impure --out-link result-pkg
# The offline test suite runs in the check derivation's checkPhase.
# This is a separate build/output from the package itself.
- name: Build + offline test suite - name: Build + offline test suite
run: nix build -L ".#checks.$(nix eval --impure --raw --expr 'builtins.currentSystem').default" --impure run: |
nix build -L ".#checks.$(nix eval --impure --raw --expr 'builtins.currentSystem').default" \
--impure --out-link result-checks
- name: Live portal tests - name: Live portal tests
env: env:
RWT_LIVE_ACCOUNT_EMAIL: ${{ secrets.RWT_LIVE_ACCOUNT_EMAIL }} RWT_LIVE_ACCOUNT_EMAIL: ${{ secrets.RWT_LIVE_ACCOUNT_EMAIL }}
@@ -57,11 +58,11 @@ jobs:
./build/test_api_client ./build/test_api_client
./build/test_license_service ./build/test_license_service
' '
# Dev closure (the actual package, not the check output) lands in the
# Dev closure lands in the dev cache. # dev cache.
- name: Push to Attic dev cache - name: Push to Attic dev cache
env: env:
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN_DEV }} ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN_DEV }}
run: | run: |
attic login radiantwave https://attic.radiantwavetech.com "$ATTIC_TOKEN" attic login radiantwave https://attic.radiantwavetech.com "$ATTIC_TOKEN"
attic push radiantwave:radiantwave-dev ./result attic push radiantwave:radiantwave-dev ./result-pkg