ci: Build and grab path for jobs in separate calls
Some checks failed
CI / Check, build and cache Nix flake (push) Has been cancelled

The old build-n-parse seemed to output null sometimes.....
This commit is contained in:
Jack O'Sullivan 2024-11-26 22:45:19 +00:00
parent 4e2c2f92f0
commit 56e9abf945

View File

@ -33,11 +33,12 @@ jobs:
run: | run: |
nix eval --json --apply "builtins.attrNames" .#ci.x86_64-linux | jq -cr '.[]' | while read job; do nix eval --json --apply "builtins.attrNames" .#ci.x86_64-linux | jq -cr '.[]' | while read job; do
echo "Building CI job $job" echo "Building CI job $job"
path="$(nix build --no-link .#ci.x86_64-linux."$job" --json | jq -r .[0].outputs.out)" nix build --no-link .#ci.x86_64-linux."$job"
echo "Caching CI job $job" echo "Caching CI job $job"
ci/push-to-cache.sh "$path" ci/push-to-cache.sh "$(nix eval --raw .#ci.x86_64-linux."$job")"
done done
echo "Building and caching CI derivation" echo "Building and caching CI derivation"
path="$(nix build --no-link .#ciDrv.x86_64-linux --json | jq -r .[0].outputs.out)" nix build --no-link .#ciDrv.x86_64-linux
UPDATE_PROFILE=1 ci/push-to-cache.sh "$path" UPDATE_PROFILE=1 ci/push-to-cache.sh "$(nix eval --raw .#ciDrv.x86_64-linux)"