forked from QuTech-Delft/OpenQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile-master
70 lines (68 loc) · 2.28 KB
/
Jenkinsfile-master
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
pipeline {
agent any
environment {
PERSIST_WORKSPACE = ""
}
stages {
stage('Checkout eQASM_Assembler') {
steps {
script {
PERSIST_WORKSPACE = WORKSPACE
}
sh 'pwd'
sh 'rm -rf eQASM_Assembler'
sh 'GIT_SSH_COMMAND="ssh -i /var/jenkins_home/.ssh/jenkins_eqasm_assembler_deploy" git clone [email protected]:QE-Lab/eQASM_Assembler.git'
}
}
stage('Checkout libqasm') {
steps {
script {
PERSIST_WORKSPACE = WORKSPACE
}
sh 'pwd'
sh 'rm -rf libqasm'
sh 'GIT_SSH_COMMAND="ssh -i /var/jenkins_home/.ssh/jenkins_libqasm_deploy_id_rsa" git clone [email protected]:QE-Lab/libqasm.git'
sh 'cd libqasm && GIT_SSH_COMMAND="ssh -i /var/jenkins_home/.ssh/jenkins_libqasm_deploy_id_rsa" git submodule update --init --recursive'
}
}
stage('Build') {
agent {
dockerfile {
filename 'Dockerfile.build'
}
}
steps {
dir(PERSIST_WORKSPACE) {
sh 'pwd'
sh 'rm -rf cbuild'
sh 'mkdir cbuild'
sh 'cd cbuild/ && cmake .. && make'
sh 'rm -rf env'
sh 'python3 -m venv env'
sh '''
. ./env/bin/activate &&
pip3 --cache-dir /var/pip_cache install pytest numpy &&
pip3 install -e . &&
python3 libqasm/qasm_flex_bison/setup.py install
pip3 install eQASM_Assembler/qisa-as
'''
}
}
}
stage('Test') {
agent {
dockerfile {
filename 'Dockerfile.build'
}
}
steps {
dir(PERSIST_WORKSPACE) {
sh '''
. ./env/bin/activate &&
pytest --ignore=eQASM_Assembler/
'''
}
}
}
}
}