forked from fastmachinelearning/hls4ml
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
110 lines (109 loc) · 2.65 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
pipeline {
agent {
docker {
image 'vivado-el7:2'
args '-v /data/Xilinx:/data/Xilinx'
}
}
options {
timeout(time: 6, unit: 'HOURS')
}
stages {
stage('Keras to HLS') {
steps {
dir(path: 'test') {
sh '''#!/bin/bash --login
conda activate hls4ml-py37
pip install tensorflow
pip install -U ../ --user
./convert-keras-models.sh -x -f keras-models.txt
pip uninstall hls4ml -y'''
}
}
}
stage('C Simulation') {
parallel {
stage('2019.2') {
when {
allOf {
environment name: 'USE_VIVADO_2019', value: '1';
environment name: 'TEST_SIMULATION', value: '1'
}
}
steps {
dir(path: 'test') {
sh '''#!/bin/bash
./build-prj.sh -i /data/Xilinx -v 2019.2 -c -p 2'''
}
}
}
stage('2020.1') {
when {
allOf {
environment name: 'USE_VIVADO_2020', value: '1';
environment name: 'TEST_SIMULATION', value: '1'
}
}
steps {
dir(path: 'test') {
sh '''#!/bin/bash
./build-prj.sh -i /data/Xilinx -v 2020.1 -c -p 2'''
}
}
}
}
}
stage('C/RTL Synthesis') {
parallel {
stage('2019.2') {
when {
allOf {
environment name: 'USE_VIVADO_2019', value: '1';
environment name: 'TEST_SYNTHESIS', value: '1'
}
}
steps {
dir(path: 'test') {
sh '''#!/bin/bash
./build-prj.sh -i /data/Xilinx -v 2019.2 -s -r -p 2'''
}
}
}
stage('2020.1') {
when {
allOf {
environment name: 'USE_VIVADO_2020', value: '1';
environment name: 'TEST_SYNTHESIS', value: '1'
}
}
steps {
dir(path: 'test') {
sh '''#!/bin/bash
./build-prj.sh -i /data/Xilinx -v 2020.1 -s -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'''
}
}
}
}