Compare commits
3 commits
main
...
workflow-c
Author | SHA1 | Date | |
---|---|---|---|
dc781b5bc8 | |||
96011436f7 | |||
4d7f5a6e89 |
2 changed files with 26 additions and 9 deletions
24
.github/workflows/build-machines-and-homes.yml
vendored
24
.github/workflows/build-machines-and-homes.yml
vendored
|
@ -70,12 +70,20 @@ jobs:
|
||||||
nix build -L "$package"
|
nix build -L "$package"
|
||||||
|
|
||||||
- name: cache
|
- name: cache
|
||||||
if: always()
|
# https://stackoverflow.com/a/58859404
|
||||||
|
if: '!cancelled()'
|
||||||
run: |
|
run: |
|
||||||
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
||||||
|
derivations=()
|
||||||
|
while IFS=$'\n' read derivation; do
|
||||||
|
derivations+=("$derivation")
|
||||||
|
done < <(nix path-info --derivation "$package")
|
||||||
|
|
||||||
|
for derivation in "${derivations[@]}"; do
|
||||||
nix copy -j8 \
|
nix copy -j8 \
|
||||||
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
||||||
$(nix path-info --recursive --derivation "$package" |sed 's/\.drv$/.drv^*/')
|
$(nix-store --query --requisites --include-outputs "$derivation")
|
||||||
|
done
|
||||||
|
|
||||||
build-homes:
|
build-homes:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -129,9 +137,17 @@ jobs:
|
||||||
nix build -L "$package"
|
nix build -L "$package"
|
||||||
|
|
||||||
- name: cache
|
- name: cache
|
||||||
if: always()
|
# https://stackoverflow.com/a/58859404
|
||||||
|
if: '!cancelled()'
|
||||||
run: |
|
run: |
|
||||||
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
||||||
|
derivations=()
|
||||||
|
while IFS=$'\n' read derivation; do
|
||||||
|
derivations+=("$derivation")
|
||||||
|
done < <(nix path-info --derivation "$package")
|
||||||
|
|
||||||
|
for derivation in "${derivations[@]}"; do
|
||||||
nix copy -j8 \
|
nix copy -j8 \
|
||||||
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
||||||
$(nix path-info --recursive --derivation "$package" |sed 's/\.drv$/.drv^*/')
|
$(nix-store --query --requisites --include-outputs "$derivation")
|
||||||
|
done
|
||||||
|
|
3
.github/workflows/build-packages.yml
vendored
3
.github/workflows/build-packages.yml
vendored
|
@ -59,7 +59,8 @@ jobs:
|
||||||
- run: nix build -L ${{ matrix.package }}
|
- run: nix build -L ${{ matrix.package }}
|
||||||
|
|
||||||
- name: cache result
|
- name: cache result
|
||||||
if: always()
|
# https://stackoverflow.com/a/58859404
|
||||||
|
if: '!cancelled()'
|
||||||
run: |
|
run: |
|
||||||
nix copy -j8 \
|
nix copy -j8 \
|
||||||
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue