-
-
Notifications
You must be signed in to change notification settings - Fork 32
Home
Jörg Thalheim edited this page Jun 26, 2022
·
9 revisions
stages:
- eval
- build
eval:
stage: eval
script:
- nix run github:nix-community/nix-eval-jobs -- --workers 8 --gc-roots-dir $(pwd)/gcroot --flake '.#hydraJobs' > jobs.json
# TODO: this does not properly check for eval errors yet
- nix run nixpkgs/nixpkgs-unstable#jq -- -r '.attr + " " + .drvPath' < jobs.json > jobs
- |
echo > generated-config.yml
while read -r line; do
IFS=" " read attr drvPath <<< "$line"
cat >> generated-config.yml <<EOF
build-$attr:
stage: build
retry: 2
script:
- nix build --out-link "result-$attr" -L "$drvPath"
- |
if [[ -n "$CACHIX_SIGNING_KEY" ]]; then
nix run nixpkgs/nixpkgs-unstable#cachix -- push ${CACHIX_NAME:-mic92} "result-$attr"
fi
EOF
done < jobs
artifacts:
paths:
- generated-config.yml
- jobs.json
build:
stage: build
trigger:
include:
- artifact: generated-config.yml
job: eval
strategy: depend