~aasg/nixexprs

f11028d538f882af2c40226ea1fd771d1f195b94 — Aluísio Augusto Silva Gonçalves a month ago 1e5f499
ci: Rework build steps to enable Nix features

Seems that nix-command is not enabled for `nixUnstable` by default.
Move the setup and tests around so we can enable it (and flakes) first.
1 files changed, 7 insertions(+), 6 deletions(-)

M .builds/nixpkgs-unstable.yml
M .builds/nixpkgs-unstable.yml => .builds/nixpkgs-unstable.yml +7 -6
@@ 9,16 9,17 @@ sources:
secrets:
  - 06d44cfd-6ded-45c4-9ef4-8e1433f9054e
tasks:
  - test: |
      nix --experimental-features 'nix-command flakes' flake check ./nixexprs
      nix-instantiate --eval --strict ./nixexprs/lib/tests.nix
  - prepare: |
      cachix use aasg-nixexprs
      nix path-info --all | grep -v '\.drv$' | sort >pre-build-paths
      printf 'experimental-features = nix-command flakes\n' >>~/.config/nix/nix.conf
  - test: |
      nix flake check --log-format raw ./nixexprs
      nix-instantiate --eval --strict ./nixexprs/lib/tests.nix
  - build: |
      nix-build --no-out-link --keep-going --keep-failed nixexprs || touch FAILED
  - cache: |
      nix path-info --all | grep -v '\.drv$' | sort >pre-build-paths
      nix-build --no-out-link --keep-going --keep-failed ./nixexprs || 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