Commit d4a2440e authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Try caching cabal store in CI

parent a30917da
Pipeline #4346 canceled with stages
......@@ -7,6 +7,7 @@ image: adinapoli/gargantext:v2
variables:
STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"
STACK_OPTS: "--system-ghc"
CABAL_STORE_DIR: "${CI_PROJECT_DIR}/.cabal"
#before_script:
#- apt-get update
......@@ -59,8 +60,9 @@ cabal:
- .stack-work/
- dist-newstyle/
- target
- .cabal/
script:
- nix-shell --run "./bin/update-cabal-project && cabal v2-build"
- nix-shell --run "./bin/update-cabal-project $CABAL_STORE_DIR && cabal --store-dir=$CABAL_STORE_DIR v2-build"
allow_failure: false
test:
......@@ -73,6 +75,7 @@ test:
- .stack-work/
- dist-newstyle/
- target
- .cabal/
script:
- nix-shell --run "cabal v2-test --test-show-details=streaming"
- nix-shell --run "cabal --store-dir=$CABAL_STORE_DIR v2-test --test-show-details=streaming"
#!/usr/bin/env bash
cabal v2-update 'hackage.haskell.org,2023-06-25T00:00:00Z'
cabal v2-install stack2cabal-1.0.14 --overwrite-policy=always
set -euxo pipefail
DEFAULT_STORE=$HOME/.cabal
STORE_DIR="${1:-$DEFAULT_STORE}"
cabal --store-dir=$STORE_DIR v2-update 'hackage.haskell.org,2023-06-25T00:00:00Z'
cabal --store-dir=$STORE_DIR v2-install stack2cabal-1.0.14 --overwrite-policy=always
stack2cabal --no-run-hpack -p '2023-06-25'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment