generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #482 from imincik/nix-build-all
utils: add nix-build-all script
- Loading branch information
Showing
2 changed files
with
44 additions
and
28 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Build all packages and upload them to binary cache. Run tests. | ||
# Usage: nix-build-all.sh | ||
|
||
set -Eeuo pipefail | ||
|
||
nixos_tests=( test-qgis test-qgis-ltr test-nixgl ) | ||
|
||
|
||
# build all packages and upload them to binary chache | ||
echo -e "\nBuilding packages ..." | ||
nix build --json .#all-packages \ | ||
| jq -r '.[].outputs | to_entries[].value' \ | ||
| cachix push geonix | ||
|
||
# run tests | ||
echo -e "\nRunning tests ..." | ||
nix flake check | ||
|
||
for test in "${nixos_tests[@]}"; do | ||
nix build --json .#checks.x86_64-linux."$test" \ | ||
| jq -r '.[].outputs | to_entries[].value' \ | ||
| cachix push geonix | ||
done | ||
|
||
echo -e "\nDone." |