Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
153
Issues
153
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
0bb71987
Commit
0bb71987
authored
Jul 04, 2023
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI cache optimisation
parent
77da92ae
Pipeline
#4351
failed
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
37 deletions
+39
-37
.gitlab-ci.yml
.gitlab-ci.yml
+39
-37
No files found.
.gitlab-ci.yml
View file @
0bb71987
# Thanks to:
# https://vadosware.io/post/zero-to-continuous-integrated-testing-a-haskell-project-with-gitlab/
#
#
image
:
adinapoli/gargantext:v2
# Optimising CI speed by using tips from https://blog.nimbleways.com/let-s-make-faster-gitlab-ci-cd-pipelines/
image
:
adinapoli/gargantext:v2.1
variables
:
STACK_ROOT
:
"
${CI_PROJECT_DIR}/.stack-root"
STACK_OPTS
:
"
--system-ghc"
CABAL_STORE_DIR
:
"
${CI_PROJECT_DIR}/.cabal"
#before_script:
#- apt-get update
#- apt-get install make xz-utils
FF_USE_FASTZIP
:
"
true"
ARTIFACT_COMPRESSION_LEVEL
:
"
fast"
CACHE_COMPRESSION_LEVEL
:
"
fast"
stages
:
-
stack
...
...
@@ -22,45 +18,30 @@ stages:
stack
:
stage
:
stack
cache
:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
key
:
files
:
-
stack.yaml
paths
:
-
.stack-root/
-
.stack-work/
-
target
-
dist-newstyle/
-
.cabal/
script
:
-
echo "Building the project from '$CI_PROJECT_DIR'"
-
nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast --dry-run"
docs
:
stage
:
docs
cache
:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
paths
:
-
.stack-root/
-
.stack-work/
-
target
script
:
-
nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --fast --dry-run"
-
cp -R "$(stack path --local-install-root)"/doc ./output
artifacts
:
paths
:
-
./output
expire_in
:
1 week
allow_failure
:
true
-
nix-shell --run "stack build --no-terminal --fast --dry-run"
cabal
:
stage
:
cabal
cache
:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
key
:
files
:
-
cabal.project
paths
:
-
.stack-root/
-
.stack-work/
-
dist-newstyle/
-
target
-
.cabal/
policy
:
pull-push
script
:
-
nix-shell --run "./bin/update-cabal-project $CABAL_STORE_DIR && cabal --store-dir=$CABAL_STORE_DIR v2-build"
allow_failure
:
false
...
...
@@ -68,14 +49,35 @@ cabal:
test
:
stage
:
test
cache
:
# cache per branch name
# key: ${CI_COMMIT_REF_SLUG}
key
:
files
:
-
gargantext.cabal
paths
:
-
.stack-root/
-
.stack-work/
-
dist-newstyle/
-
target
-
.cabal/
policy
:
pull
script
:
-
nix-shell --run "./bin/update-cabal-project $CABAL_STORE_DIR && cabal --store-dir=$CABAL_STORE_DIR v2-test --test-show-details=streaming"
docs
:
stage
:
docs
cache
:
paths
:
-
.stack-root/
-
.stack-work/
-
dist-newstyle/
-
.cabal/
-
target
policy
:
pull
script
:
-
nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --fast --dry-run"
-
cp -R "$(stack path --local-install-root)"/doc ./output
rules
:
-
if
:
'
$CI_MERGE_REQUEST_IID'
# Run job on Merge Requests
artifacts
:
paths
:
-
./output
expire_in
:
1 week
allow_failure
:
true
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment