~aasg/nixexprs

42109db58f6ba88fd96f95adbafdf682beca01af — Aluísio Augusto Silva Gonçalves 8 months ago 3abbc16
ci: Use `cachix watch-exec` to upload built derivations

Replace the ls-then-diff logic we borrowed from cachix-action with
cachix's new watch-exec command, simplifying the build steps and
possibly reducing the CI time (by pushing in parallel with building,
haven't checked if it does that though).
2 files changed, 2 insertions(+), 19 deletions(-)

M .builds/nixos-20.09.yml
M .builds/nixpkgs-unstable.yml
M .builds/nixos-20.09.yml => .builds/nixos-20.09.yml +1 -9
@@ 10,12 10,4 @@ tasks:
      cachix use aasg-nixexprs
      nix path-info --all | grep -v '\.drv$' | sort >pre-build-paths
  - build: |
      nix-build --no-out-link --keep-going --keep-failed --show-trace ./nixexprs/ci.nix || touch FAILED
  - cache: |
      nix path-info --all | grep -v '\.drv$' | sort >post-build-paths
      comm -13 pre-build-paths post-build-paths | cachix push aasg-nixexprs
  - finish: |
      if [[ -f FAILED ]]; then
        echo "Build failed. See logs of the build task for details."
        exit 1
      fi
      cachix watch-exec aasg-nixexprs -- nix-build --no-out-link --keep-going --keep-failed --show-trace ./nixexprs/ci.nix

M .builds/nixpkgs-unstable.yml => .builds/nixpkgs-unstable.yml +1 -10
@@ 15,13 15,4 @@ tasks:
  - check-flake: |
      nix flake check --log-format raw ./nixexprs
  - build: |
      nix path-info --all | grep -v '\.drv$' | sort >pre-build-paths
      nix-build --no-out-link --keep-going --keep-failed --show-trace ./nixexprs/ci.nix || touch FAILED
      nix path-info --all | grep -v '\.drv$' | sort >post-build-paths
  - cache: |
      comm -13 pre-build-paths post-build-paths | cachix push aasg-nixexprs
  - finish: |
      if [[ -f FAILED ]]; then
        echo "Build failed. See logs of the build task for details."
        exit 1
      fi
      cachix watch-exec aasg-nixexprs -- nix-build --no-out-link --keep-going --keep-failed --show-trace ./nixexprs/ci.nix