Skip to content
Snippets Groups Projects
Commit d232fdeb authored by Ben Gamari's avatar Ben Gamari :turtle:
Browse files

Restore Nix caching

parent 565124cc
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,17 @@ build-8.8: ...@@ -86,7 +86,17 @@ build-8.8:
paths: paths:
- store.nar - store.nar
before_script:
- |
if [ -e store.nar ]; then
echo "Extracting cached Nix store..."
nix-store --import -vv < store.nar || echo "invalid cache"
else
echo "No cache found"
fi
script: script:
# Install GHC
- echo "Bindist tarball is $GHC_TARBALL" - echo "Bindist tarball is $GHC_TARBALL"
- | - |
nix build \ nix build \
...@@ -96,6 +106,14 @@ build-8.8: ...@@ -96,6 +106,14 @@ build-8.8:
ghcHEAD ghcHEAD
- export GHC=`pwd`/ghc/bin/ghc - export GHC=`pwd`/ghc/bin/ghc
- rm -Rf $HOME/.cabal/packages/local ci/run - rm -Rf $HOME/.cabal/packages/local ci/run
# Build CI executable
- nix build -f ./ci -j$CPUS --no-build-output
- |
nix-store --export \
$(nix-store -qR --include-outputs \
$(nix-instantiate --quiet scripts/build-all.nix --arg bindistTarball $GHC_TARBALL -A buildDepends -A ghc)) \
> store.nar
# Test it
- nix run -f ./ci -c run-ci - nix run -f ./ci -c run-ci
after_script: after_script:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment