forked from vloncar/hls4ml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
131 lines (130 loc) · 3.14 KB
/
Jenkinsfile
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
pipeline {
agent {
docker {
image 'hls4ml-with-vivado:latest'
}
}
options {
timeout(time: 6, unit: 'HOURS')
}
stages {
stage('Keras to HLS') {
parallel {
stage('py36') {
steps {
dir(path: 'test') {
sh '''#!/bin/bash
. activate hls4ml-py36
pip install -U ../ --user
./convert-keras-models.sh -p 3 -x -f keras-models.txt
pip uninstall hls4ml -y'''
}
}
}
stage('py27') {
steps {
dir(path: 'test') {
sh '''#!/bin/bash
. activate hls4ml-py27
pip install -U ../ --user
./convert-keras-models.sh -p 2 -x -f keras-models.txt
pip uninstall hls4ml -y'''
}
}
}
}
post {
success {
dir(path: 'test') {
sh '''#!/bin/bash
./py-diff.sh -r 2'''
}
}
}
}
stage('C Simulation') {
parallel {
stage('2017.2') {
when {
allOf {
environment name: 'USE_VIVADO_2017', value: '1';
environment name: 'TEST_SIMULATION', value: '1'
}
}
steps {
dir(path: 'test') {
sh '''#!/bin/bash
./build-prj.sh -i /opt/Xilinx -v 2017.2 -c -p 2'''
}
}
}
stage('2018.2') {
when {
allOf {
environment name: 'USE_VIVADO_2018', value: '1';
environment name: 'TEST_SIMULATION', value: '1'
}
}
steps {
dir(path: 'test') {
sh '''#!/bin/bash
./build-prj.sh -i /opt/Xilinx -v 2018.2 -c -p 2'''
}
}
}
}
}
stage('C/RTL Synthesis') {
parallel {
stage('2017.2') {
when {
allOf {
environment name: 'USE_VIVADO_2017', value: '1';
environment name: 'TEST_SYNTHESIS', value: '1'
}
}
steps {
dir(path: 'test') {
sh '''#!/bin/bash
./build-prj.sh -i /opt/Xilinx -v 2017.2 -r -p 2'''
}
}
}
stage('2018.2') {
when {
allOf {
environment name: 'USE_VIVADO_2018', value: '1';
environment name: 'TEST_SYNTHESIS', value: '1'
}
}
steps {
dir(path: 'test') {
sh '''#!/bin/bash
./build-prj.sh -i /opt/Xilinx -v 2018.2 -r -p 2'''
}
}
}
}
}
stage('Report') {
when {
environment name: 'TEST_SYNTHESIS', value: '1'
}
steps {
dir(path: 'test') {
sh '''#!/bin/bash
./gather-reports.sh -b | tee report.rpt'''
}
archiveArtifacts artifacts: 'test/report.rpt', fingerprint: true
}
}
}
post {
always {
dir(path: 'test') {
sh '''#!/bin/bash
./cleanup.sh'''
}
}
}
}