-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
74 lines (69 loc) · 1.79 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
74 lines (69 loc) · 1.79 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
default:
image: registry.gitlab.com/smspp/smspp-project
cache:
key: ${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_TemplateBlock=ON
- cmake --build smspp-project/build --target install
artifacts:
paths:
- smspp-project/build
only:
refs:
- develop
- tags
changes:
- cmake/*
- include/*
- src/*
- test/*
- tools/*
- CMakeLists.txt
- .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
- .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