ci: Build and cache CI jobs individually
Some checks failed
CI / Check, build and cache Nix flake (push) Failing after 6m27s

This commit is contained in:
2024-11-26 12:29:44 +00:00
parent 6c98ef8944
commit e9467e0cc7
3 changed files with 21 additions and 14 deletions

View File

@@ -25,15 +25,19 @@ jobs:
extra-trusted-public-keys = nix-cache.nul.ie-1:BzH5yMfF4HbzY1C977XzOxoPhEc9Zbu39ftPkUbH+m4=
- name: Check flake
run: nix flake check
- name: Build the world
run: nix flake check --no-build
- name: Build (and cache) the world
id: build
run: |
path=$(nix build --no-link .#ci.x86_64-linux --json | jq -r .[0].outputs.out)
echo "path=$path" >> "$GITHUB_OUTPUT"
- name: Push to cache
env:
HARMONIA_SSH_KEY: ${{ secrets.HARMONIA_SSH_KEY }}
run: |
ci/push-to-cache.sh "${{ steps.build.outputs.path }}"
nix eval --json --apply "builtins.attrNames" .#ci.x86_64-linux | jq -cr '.[]' | while read job; do
echo "Building $job"
path="$(nix build --no-link .#ci.x86_64-linux."$job" --json | jq -r .[0].outputs.out)"
echo "Caching $job"
ci/push-to-cache.sh "$path"
done
echo "Building and caching CI derivation"
path="$(nix build --no-link .#ciDrv.x86_64-linux --json | jq -r .[0].outputs.out)"
UPDATE_PROFILE=1 ci/push-to-cache.sh "$path"