-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// Copyright (c) Open Enclave SDK contributors. | ||
// Licensed under the MIT License. | ||
|
||
OECI_LIB_VERSION = env.OECI_LIB_VERSION ?: "master" | ||
oe = library("OpenEnclaveCommon@${OECI_LIB_VERSION}").jenkins.common.Openenclave.new() | ||
|
||
GLOBAL_TIMEOUT_MINUTES = 240 | ||
CTEST_TIMEOUT_SECONDS = 480 | ||
GLOBAL_ERROR = null | ||
|
||
AGENTS_LABELS = [ | ||
"acc-ubuntu-16.04": env.UBUNTU_1604_CUSTOM_LABEL ?: "ACC-1604", | ||
"acc-ubuntu-18.04": env.UBUNTU_1804_CUSTOM_LABEL ?: "ACC-1804", | ||
"acc-rhel-8": env.RHEL_8_CUSTOM_LABEL ?: "ACC-RHEL-8", | ||
"acc-win2016": env.WINDOWS_2016_CUSTOM_LABEL ?: "SGX-Windows-2016", | ||
"acc-win2019": env.WINDOWS_2019_CUSTOM_LABEL ?: "SGX-Windows-2019" | ||
] | ||
|
||
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '90', | ||
artifactNumToKeepStr: '180', | ||
daysToKeepStr: '90', | ||
numToKeepStr: '180')), | ||
[$class: 'JobRestrictionProperty']]) | ||
|
||
|
||
def LinuxBuild(String label, String compiler) { | ||
stage("${label} ${compiler} oeedger8r-cpp") { | ||
node(label) { | ||
timeout(GLOBAL_TIMEOUT_MINUTES) { | ||
cleanWs() | ||
checkout scm | ||
def task = """ | ||
cmake ${WORKSPACE} | ||
make -j 4 | ||
ctest --output-on-failure --timeout ${CTEST_TIMEOUT_SECONDS} | ||
""" | ||
|
||
oe.Run(compiler, task) | ||
} | ||
} | ||
} | ||
} | ||
|
||
def WindowsBuild(String label) { | ||
stage("${label} oeedger8r-cpp") { | ||
node(label) { | ||
timeout(GLOBAL_TIMEOUT_MINUTES) { | ||
cleanWs() | ||
checkout scm | ||
bat """ | ||
vcvars64.bat x64 && \ | ||
cmake ${WORKSPACE} | ||
make -j 4 | ||
ctest --output-on-failure --timeout ${CTEST_TIMEOUT_SECONDS} | ||
""" | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
try { | ||
stage("PR Testing") { | ||
def testing_stages = [ | ||
"ACC1604 clang-7": { LinuxBuild(AGENTS_LABELS["acc-ubuntu-16.04"], 'clang-7',) }, | ||
"ACC1804 clang-7": { LinuxBuild(AGENTS_LABELS["acc-ubuntu-18.04"], 'clang-7') }, | ||
"RHEL 8 gcc 8": { LinuxBuild(AGENTS_LABELS["acc-rhel-8"], 'gcc') }, | ||
"Win 2016 Clang 7": { WindowsBuild(AGENTS_LABELS["acc-win2016"]) }, | ||
"Win 2019 Clang 7": { WindowsBuild(AGENTS_LABELS["acc-win2019"]) } | ||
] | ||
|
||
parallel testing_stages | ||
} | ||
|
||
} catch(Exception e) { | ||
println "Caught global pipeline exception :" + e | ||
GLOBAL_ERROR = e | ||
throw e | ||
} finally { | ||
currentBuild.result = (GLOBAL_ERROR != null) ? 'FAILURE' : "SUCCESS" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
status = [ "continuous-integration/jenkins/branch" ] | ||
pr_status = [ "DCO" ] | ||
required_approvals = 1 | ||
block_labels = [ "do not merge" ] | ||
delete_merged_branches = true | ||
timeout_sec = 1800 # 30 minutes | ||
|
||
[committer] | ||
name = "oe-bors[bot]" | ||
email = "[email protected]" |