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
159
Issues
159
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
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
b58a0cce
Commit
b58a0cce
authored
Feb 24, 2025
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to override XDG_CACHE_DIR
parent
cbb64888
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
35 deletions
+27
-35
.gitlab-ci.yml
.gitlab-ci.yml
+27
-35
No files found.
.gitlab-ci.yml
View file @
b58a0cce
...
@@ -6,10 +6,12 @@ variables:
...
@@ -6,10 +6,12 @@ variables:
STACK_ROOT
:
"
${CI_PROJECT_DIR}/.stack-root"
STACK_ROOT
:
"
${CI_PROJECT_DIR}/.stack-root"
STACK_OPTS
:
"
--system-ghc"
STACK_OPTS
:
"
--system-ghc"
STORE_DIR
:
"
${CI_PROJECT_DIR}/.cabal"
STORE_DIR
:
"
${CI_PROJECT_DIR}/.cabal"
CABAL_DIR
:
"
${CI_PROJECT_DIR}/.cabal"
CORENLP
:
"
4.5.4"
CORENLP
:
"
4.5.4"
FF_USE_FASTZIP
:
"
true"
FF_USE_FASTZIP
:
"
true"
ARTIFACT_COMPRESSION_LEVEL
:
"
fast"
ARTIFACT_COMPRESSION_LEVEL
:
"
fast"
CACHE_COMPRESSION_LEVEL
:
"
fast"
CACHE_COMPRESSION_LEVEL
:
"
fast"
XDG_CACHE_HOME
:
"
/builds/gargantext/.cache"
stages
:
stages
:
-
cabal
-
cabal
...
@@ -26,6 +28,8 @@ stack:
...
@@ -26,6 +28,8 @@ stack:
-
.stack-work/
-
.stack-work/
script
:
script
:
-
echo "Building the project from '$CI_PROJECT_DIR'"
-
echo "Building the project from '$CI_PROJECT_DIR'"
-
git config --global --add safe.directory $XDG_CACHE_HOME/nix/tarball-cache
-
git config --global --add safe.directory '*'
-
nix-shell --run "stack build --no-terminal --fast --dry-run"
-
nix-shell --run "stack build --no-terminal --fast --dry-run"
allow_failure
:
false
allow_failure
:
false
...
@@ -38,6 +42,8 @@ cabal:
...
@@ -38,6 +42,8 @@ cabal:
-
.cabal/
-
.cabal/
policy
:
pull-push
policy
:
pull-push
script
:
script
:
-
git config --global --add safe.directory $XDG_CACHE_HOME/nix/tarball-cache
-
git config --global --add safe.directory '*'
-
nix-shell --run "./bin/update-project-dependencies $STORE_DIR && cabal --store-dir=$STORE_DIR v2-build all --flags 'test-crypto no-phylo-debug-logs' --ghc-options='-O0 -fclear-plugins'"
-
nix-shell --run "./bin/update-project-dependencies $STORE_DIR && cabal --store-dir=$STORE_DIR v2-build all --flags 'test-crypto no-phylo-debug-logs' --ghc-options='-O0 -fclear-plugins'"
allow_failure
:
false
allow_failure
:
false
...
@@ -56,64 +62,50 @@ bench:
...
@@ -56,64 +62,50 @@ bench:
test
:
test
:
stage
:
test
stage
:
test
# The tests needs to run as the 'test' user, because they leverage the
# initdb utility from postgres that cannot be run by 'root'.
before_script
:
-
echo "Creating test user..."
-
mkdir -p /home/test
-
mkdir -p /root/.config
-
useradd -U test
-
chown -R test:test dist-newstyle/
-
chown -R test:test /root/
-
chown -R test:test $STORE_DIR
-
chown -R test:test ${CABAL_DIR}
-
mkdir -p "$XDG_CACHE_HOME/nix"
-
chown -R test:test "$XDG_CACHE_HOME/nix"
cache
:
cache
:
key
:
cabal.project
key
:
cabal.project
paths
:
paths
:
-
dist-newstyle/
-
dist-newstyle/
-
.cabal/
-
.cabal/
policy
:
pull-push
policy
:
pull-push
# The tests needs to run as the 'test' user, because they leverage the
# initdb utility from postgres that cannot be run by 'root'.
script
:
script
:
-
|
-
|
echo "Creating test user..."
git config --global --add safe.directory $XDG_CACHE_HOME/nix/tarball-cache
mkdir -p /home/test
git config --global --add safe.directory '*'
mkdir -p /root/.config
export TEST_TMPDIR="${CI_PROJECT_DIR}/tmp"
useradd -U test
mkdir -p "$TEST_TMPDIR"
chown -R test:test dist-newstyle/
chown -R test:test /root/
chown -R test:test $STORE_DIR
chown -R test:test /root/.cache/nix/tarball-cache
export CABAL=$(nix-shell --run "which cabal")
export CABAL=$(nix-shell --run "which cabal")
echo "Found cabal at ${CABAL}"
echo "Found cabal at ${CABAL}"
export TEST_NIX_PATH=$(nix-shell --run "echo -n \$PATH")
export TEST_NIX_PATH=$(nix-shell --run "echo -n \$PATH")
echo "Found test nix path at ${TEST_NIX_PATH}"
echo "Found test nix path at ${TEST_NIX_PATH}"
git config --global --add safe.directory '*'
nix-shell --run "./bin/update-project-dependencies $STORE_DIR"
nix-shell --run "./bin/update-project-dependencies $STORE_DIR"
mkdir -p /root/.cache/cabal/logs
mkdir -p /root/.cache/cabal/logs
chown -R test:test /root/.cache/cabal/logs/
chown -R test:test /root/.cache/cabal/logs/
chown -R test:test /root/.cache/cabal/packages/hackage.haskell.org/
chown -R test:test /root/.cache/cabal/packages/hackage.haskell.org/
chown -R test:test "$TEST_TMPDIR"
mkdir -p /builds/gargantext/haskell-gargantext/devops/coreNLP/stanford-corenlp-current
mkdir -p /builds/gargantext/haskell-gargantext/devops/coreNLP/stanford-corenlp-current
cp -R /root/devops/coreNLP/stanford-corenlp-${CORENLP}/* /builds/gargantext/haskell-gargantext/devops/coreNLP/stanford-corenlp-current/
cp -R /root/devops/coreNLP/stanford-corenlp-${CORENLP}/* /builds/gargantext/haskell-gargantext/devops/coreNLP/stanford-corenlp-current/
nix-shell --run "chown -R test:test /root/.config/ && su -m test -c \"export PATH=$PATH:$TEST_NIX_PATH && cd /builds/gargantext/haskell-gargantext; $CABAL --store-dir=$STORE_DIR v2-test --test-show-details=streaming --flags 'test-crypto no-phylo-debug-logs' --ghc-options='-O0 -fclear-plugins'\""
nix-shell --run "chown -R test:test /root/.config/ && su -m test -c \"export PATH=$PATH:$TEST_NIX_PATH && export TMPDIR=$TEST_TMPDIR && cd /builds/gargantext/haskell-gargantext; $CABAL --store-dir=$STORE_DIR v2-test --test-show-details=streaming --flags 'test-crypto no-phylo-debug-logs' --ghc-options='-O0 -fclear-plugins'\""
chown -R root:root dist-newstyle/
chown -R root:root dist-newstyle/
chown -R root:root /root/
chown -R root:root /root/
chown -R root:root $STORE_DIR
chown -R root:root $STORE_DIR
chown -R root:root /root/.cache/cabal/logs/
chown -R root:root /root/.cache/cabal/logs/
chown -R root:root /root/.cache/cabal/packages/hackage.haskell.org/
chown -R root:root /root/.cache/cabal/packages/hackage.haskell.org/
chown -R root:root /root/.cache/nix/tarball-cache
chown -Rh root:root /builds/gargantext/haskell-gargantext/devops/coreNLP/stanford-corenlp-current
chown -Rh root:root /builds/gargantext/haskell-gargantext/devops/coreNLP/stanford-corenlp-current
#docs:
# stage: docs
# cache:
# key: stack.yaml
# paths:
# - .stack-root/
# - .stack-work/
# 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
# # FIXME(adinapoli) Currently Gitlab 11.x doesn't support the 'rules' keyword.
# # rules:
# # - if: '$CI_MERGE_REQUEST_IID' # Run job on Merge Requests
# only:
# - 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