|
1 | | -@Library('utils@or-v2.0.1') _ |
2 | | - |
3 | | -node { |
4 | | - |
5 | | - env.EQUIVALENCE_CHECK = 1; |
6 | | - |
7 | | - stage('Checkout'){ |
8 | | - checkout scm; |
9 | | - } |
10 | | - |
11 | | - def DOCKER_IMAGE; |
12 | | - stage('Build and Push Docker Image') { |
13 | | - DOCKER_IMAGE = dockerPush('ubuntu22.04', 'openroad'); |
14 | | - echo "Docker image is ${DOCKER_IMAGE}"; |
15 | | - } |
16 | | - |
17 | | - stage('Build and Stash bins') { |
18 | | - buildBinsOR(DOCKER_IMAGE, "-no-warnings"); |
19 | | - } |
20 | | - |
21 | | - docker.image(DOCKER_IMAGE).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') { |
22 | | - stage('Setup Build') { |
23 | | - sh label: 'Configure git', script: "git config --system --add safe.directory '*'"; |
24 | | - } |
25 | | - stage('Build OpenROAD') { |
26 | | - sh label: 'Build script', script: './etc/Build.sh -no-warnings'; |
27 | | - stash name: 'build', includes: "build/**"; |
28 | | - } |
29 | | - } |
30 | | - |
31 | | - stage('Nightly Tests') { |
32 | | - |
33 | | - Map tasks = [failFast: false]; |
34 | | - def ISPD_YEAR = ['18', '19']; |
35 | | - def TEST_TO_RUN = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']; |
36 | | - ISPD_YEAR.each { ispd_year -> |
37 | | - TEST_TO_RUN.each { test_to_run -> |
38 | | - def name = "ISPD ${ispd_year} TEST ${test_to_run}"; |
39 | | - tasks[name] = { |
40 | | - node { |
41 | | - docker.image(DOCKER_IMAGE).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins/ispd:/root/ispd') { |
42 | | - stage("Setup ${name}") { |
43 | | - sh label: 'Configure git', script: "git config --system --add safe.directory '*'"; |
44 | | - checkout scm; |
45 | | - unstash 'build'; |
46 | | - } |
47 | | - stage("Run ${name}") { |
48 | | - catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { |
49 | | - timeout(time: 8, unit: 'HOURS') { |
50 | | - sh "python3 src/drt/test/run-ispd.py --program ${WORKSPACE}/build/bin/openroad --tests ispd${ispd_year}_test${test_to_run}"; |
51 | | - } |
52 | | - } |
53 | | - } |
54 | | - stage("Save ${name} Results") { |
55 | | - archiveArtifacts "**/*.tar.gz, **/*.log"; |
56 | | - } |
57 | | - } |
58 | | - } |
59 | | - } |
60 | | - } |
61 | | - } |
62 | | - |
63 | | - tasks['GPL Tests'] = { |
64 | | - node { |
65 | | - docker.image(DOCKER_IMAGE).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') { |
66 | | - stage('Setup GPL Tests') { |
67 | | - sh label: 'Configure git', script: "git config --system --add safe.directory '*'"; |
68 | | - checkout scm; |
69 | | - unstash 'build'; |
70 | | - } |
71 | | - stage('Run GPL Tests') { |
72 | | - catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { |
73 | | - timeout(time: 2, unit: 'HOURS') { |
74 | | - sh './src/gpl/test/regression-large'; |
75 | | - } |
76 | | - } |
77 | | - } |
78 | | - stage('Save GPL Results') { |
79 | | - sh label: 'Save gpl results', script: "exec tar zcvf src/gpl/test/results.tgz src/gpl/test/results"; |
80 | | - archiveArtifacts "**/*.tar.gz, **/*.log"; |
81 | | - } |
82 | | - } |
83 | | - } |
84 | | - } |
85 | | - |
86 | | - parallel(tasks) |
87 | | - |
88 | | - } |
89 | | - |
90 | | - stage('Send Email Report') { |
91 | | - sendEmail(); |
92 | | - } |
| 1 | +@Library('utils@main') _ |
93 | 2 |
|
| 3 | +k8sPodTemplate(coordinator: true, cloud: utilPickCloud()) { |
| 4 | + pipelineORNightly(k8s: true) |
94 | 5 | } |
0 commit comments