-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.gitlab-ci.yml
68 lines (60 loc) · 1.67 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
image: adahlberg/nlblueprintci:19.04
.only_mr: &only_mr
only:
- master
- merge_requests
.install: &install
before_script:
## Add private key to server access
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_PRIVATE_KEY" | ssh-add -
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
## Install netqasm
- echo $CI_COMMIT_REF_NAME
- echo $CI_COMMIT_BRANCH
# Use master if merging to master otherwise develop
# if not merging then use master if on master otherwise develop
- BRANCH="$(if [ "$CI_COMMIT_BRANCH" == "" ]; then if [ "$CI_COMMIT_REF_NAME" == "develop" ]; then echo "master"; else echo "develop"; fi; else if [ "$CI_COMMIT_REF_NAME" == "develop" ]; then echo "master"; else echo "develop"; fi; fi)"
- echo $BRANCH
- git clone git@gitlab.tudelft.nl:qinc-wehner/netqasm/netqasm.git -b $BRANCH
- cd netqasm
- make install
- cd ..
- make install
stages:
- lint
- tests
- examples
- deploy
lint:
<<: *install
stage: lint
script: make lint
<<: *only_mr
tests:
<<: *install
stage: tests
script: make tests
<<: *only_mr
sdk-tests:
<<: *install
variables:
NETQASM_SIMULATOR: netsquid
stage: tests
script: make -C netqasm external-tests
<<: *only_mr
examples:
<<: *install
stage: examples
script: make examples
<<: *only_mr
sdk-examples:
<<: *install
variables:
NETQASM_SIMULATOR: netsquid
stage: examples
script: make -C netqasm external-examples
<<: *only_mr