Skip to content

Commit

Permalink
try caching
Browse files Browse the repository at this point in the history
  • Loading branch information
bri committed Feb 11, 2024
1 parent 9f4d0ea commit 7af4b38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ build_template: &BUILD_TEMPLATE
#flake_check_script: cachix watch-exec $CACHIX_USER -- nix flake check -j auto --system ${ARCH//arm/aarch}-${CIRRUS_OS} --impure --show-trace --accept-flake-config

build_image_template: &BUILD_IMAGE_TEMPLATE
nix_store_cache:
folder: /nix/store
name: build_image_${TARGET}@${ARCH}-${CIRRUS_OS}_${FORMAT}
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_TAG != "" || $CIRRUS_PR != "" || $CIRRUS_BUILD_SOURCE == ""
timeout_in: 120m
install_cachix_script: nix profile install github:nixos/nixpkgs/nixpkgs-unstable#cachix --impure && cachix use $CACHIX_USER
build_image_script: |
mkdir -p build
cp -LR "$(nix build ".#nixosConfigurations.${TARGET}@${ARCH//arm/aarch}-${CIRRUS_OS}.config.formats.${FORMAT}" --print-out-paths --show-trace --accept-flake-config)" build/
upload_caches: [ "nix_store_cache" ]
#cp -LR "$(cachix watch-exec $CACHIX_USER -- nix build ".#nixosConfigurations.${TARGET}@${ARCH//arm/aarch}-${CIRRUS_OS}.config.formats.${FORMAT}" --print-out-paths --show-trace --accept-flake-config)" build/
ssh_key_file:
path: /tmp/ci-upload.key
Expand Down

0 comments on commit 7af4b38

Please sign in to comment.