-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.gitlab-ci.yml
57 lines (53 loc) · 1.38 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
before_script:
# load the requested modules on oberon
- module load anaconda/3
wordseg-build:
stage: build
artifacts:
paths:
- build
when: on_success
expire_in: 1 hour
script:
# create a Python virtual environment (if not existing)
- conda env create --name wordseg-ci -f environment.yml 2> /dev/null || true
- conda activate wordseg-ci
# compile the project
- make install
wordseg-test:
stage: test
dependencies:
script:
# run the unit tests within the CI environment
- conda activate wordseg-ci
- make test
wordseg-deploy:
# install wordseg in the "wordseg" virtual environment on oberon
# (users just have to type "source activate wordseg" to use it)
stage: deploy
only:
refs:
- master
dependencies:
script:
# activate the production environment and (re)install wordseg in it
- conda activate wordseg
- cd /shared/apps/wordseg
- git pull origin master
- make clean
- make install
# test the production environment to be sure all is okay
- make test
# documentation is available on https://docs.cognitive-ml.fr/wordseg
documentation:
stage: deploy
only:
refs:
- master
dependencies:
- wordseg-build
script:
- module load texlive/2018
- conda activate wordseg-ci
- make doc
- scp -r build/doc/html/* cognitive-ml.fr:/var/www/docs.cognitive-ml.fr/wordseg