ci #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build" | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v6 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: run nix-eval-jobs | |
run: nix run nixpkgs#nix-eval-jobs -- --gc-roots-dir gcroots --flake .#all-download-images | tee jobs.json | |
- name: convert jobs json | |
# run: nix run nixpkgs#jq -- -r '.attr + " " + .drvPath' < jobs.json > jobs | |
run: nix run nixpkgs#jq -- -r 'select(.system == "x86_64-linux") | .attr + " " + .drvPath' < jobs.json > jobs | |
- name: build jobs | |
run: | | |
while read -r attr drvPath; do | |
nix build "$drvPath^*" --out-link "result-$attr" | |
done < jobs |