diff --git a/.cirrus.yml b/.cirrus.yml index 72bb837..b1d2036 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -29,7 +29,7 @@ task: - scenario: netnsRegtest # This script is run as root build_script: - - echo "sandbox = true" >> /etc/nix/nix.conf + - printf '%s\n' 'sandbox = true' 'max-jobs = auto' >> /etc/nix/nix.conf - nix shell --inputs-from . nixpkgs#{bash,coreutils,cachix} -c ./test/ci/build.sh $scenario - name: flake diff --git a/test/ci/build-to-cachix.sh b/test/ci/build-to-cachix.sh index 689fd56..dcea712 100755 --- a/test/ci/build-to-cachix.sh +++ b/test/ci/build-to-cachix.sh @@ -17,9 +17,10 @@ trap 'rm -rf $tmpDir' EXIT ## Instantiate time nix-instantiate "$@" --add-root "$tmpDir/drv" --indirect > /dev/null -printf "instantiated "; realpath "$tmpDir/drv" +drv=$(realpath "$tmpDir/drv") +echo "instantiated $drv" -outPath=$(nix-store --query "$tmpDir/drv") +outPath=$(nix-store --query "$drv") if nix path-info --store "https://${cachixCache}.cachix.org" "$outPath" &>/dev/null; then echo "$outPath has already been built successfully." exit 0 @@ -33,12 +34,12 @@ fi if [[ $CACHIX_SIGNING_KEY ]]; then # Speed up task by uploading store paths as soon as they are created - buildCmd="cachix watch-exec $cachixCache nix-build --" + buildCmd="cachix watch-exec $cachixCache nix -- build" else - buildCmd=nix-build + buildCmd="nix build" fi -$buildCmd --out-link "$tmpDir/result" "$tmpDir/drv" >/dev/null +$buildCmd --out-link "$tmpDir/result" --print-build-logs "$drv^*" if [[ $CACHIX_SIGNING_KEY ]]; then cachix push "$cachixCache" "$outPath"