forked from brucefan1983/GPUMD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
77 lines (64 loc) · 1.5 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
image: $CI_REGISTRY/materials-theory/$CI_PROJECT_NAME/cicd
variables:
INSTDIR: "local_installation"
GIT_DEPTH: 300
before_script:
- export PATH=$PWD/$INSTDIR:${PATH}
#------------------- build stage -------------------
.build:
stage: build
artifacts:
expire_in: 2 days
paths:
- local_installation/
script:
- mkdir $INSTDIR
- cd src
- make CFLAGS="-std=c++14 -O3 -arch=sm_72 -DDEBUG" -j4
- mv gpumd nep ../$INSTDIR/
build:linux:
extends: .build
#------------------- test stage -------------------
.documentation:
needs:
- build:linux
artifacts:
expire_in: 2 days
paths:
- public
script:
# prepare homepage
- mkdir -p public/dev
# --------------------------
# DEVELOPMENT VERSION
- git checkout master
- git pull
- tag=$(git describe --tags | tail -1)
- echo "tag= $tag"
# build user guide
- sed -i "s/version = ''/version = '$tag'/" doc/conf.py
- sphinx-build -W doc/ public/dev/
- git checkout -- doc/conf.py
# --------------------------
# STABLE VERSION
- tag=$(git tag | tail -1)
- echo "tag= $tag"
- git checkout $tag
# build user guide
- sphinx-build -W doc/ public/
# --------------------------
# clean up
- ls -l public/
- chmod go-rwX -R public/
documentation:test:
extends: .documentation
stage: test
except:
- master
#------------------- deploy stage -------------------
pages:
extends: .documentation
stage: deploy
only:
- master
- tags