Repository navigation
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
96 lines (90 loc) · 2.56 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
96 lines (90 loc) · 2.56 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# The CHANGELOG of the module, held to the format and, on a merge request, to
# the commits of the branch [see ci/changelog.yml of the umbrella], and the
# code and the configurations that a merge request changes, held to the
# style of SMS++ [see ci/style.yml of the umbrella].
include:
- project: smspp/smspp-project
ref: develop
file: /ci/changelog.yml
- project: smspp/smspp-project
ref: develop
file: /ci/style.yml
default:
image: registry.gitlab.com/smspp/smspp-project
cache:
key: ${CI_PROJECT_PATH_SLUG}-${CI_COMMIT_REF_SLUG}
paths:
- smspp-project
stages:
- build
- test
- deploy
build:
stage: build
script:
- eval $(ssh-agent -s)
- ssh-add <(echo "$SMSPP_DEPLOY_KEY")
- mkdir -p ~/.ssh && ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
- if [ -d smspp-project ]; then (cd smspp-project && git pull && git submodule update --recursive); else git clone --branch develop git@gitlab.com:smspp/smspp-project.git; fi
- cmake -S smspp-project -B smspp-project/build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DBUILD_SATBlock=ON
- cmake --build smspp-project/build --target install
# the makefiles too, which have to keep building what CMake builds [see
# ci/makefile of the umbrella]
- make -C smspp-project -f ci/makefile -j$(nproc)
MODULE="$CI_PROJECT_TITLE"
artifacts:
paths:
- smspp-project/build
only:
refs:
- develop
- tags
changes:
- cmake/*
- include/*
- src/*
- test/*
- tools/*
- CMakeLists.txt
- makefile*
- lib/makefile*
- test/makefile*
- .gitlab-ci.yml
test:
stage: test
before_script:
# write the Gurobi WLS license from the masked CI/CD variables, if set
- |
if [ -n "$GRB_WLSSECRET" ]; then
printf 'LICENSEID=%s\nWLSACCESSID=%s\nWLSSECRET=%s\n' \
"$GRB_LICENSEID" "$GRB_WLSACCESSID" "$GRB_WLSSECRET" > /tmp/gurobi.lic
export GRB_LICENSE_FILE=/tmp/gurobi.lic
fi
script:
- ctest -V -C Release -L "$CI_PROJECT_TITLE" --test-dir smspp-project/build --no-tests=error
only:
refs:
- develop
- tags
changes:
- cmake/*
- include/*
- src/*
- test/*
- tools/*
- CMakeLists.txt
- makefile*
- lib/makefile*
- test/makefile*
- .gitlab-ci.yml
deploy:
stage: deploy
script:
- cd smspp-project/build && cpack -G "TGZ;ZIP;TBZ2"
artifacts:
paths:
- smspp-project/build/*.tar.gz
- smspp-project/build/*.tar.bz2
- smspp-project/build/*.zip
only:
- tags