Skip to content

Commit

Permalink
Merge #1143
Browse files Browse the repository at this point in the history
1143: Fixing Windows CI build. r=johnkord a=johnkord

Right now Windows builds in CI are broken (the tests aren't getting run and powershell is erroring out, yet it believes it to be a successful build), and this PR will revert the changes that broke it.

This PR temporarily disables the oeedgr8r tests on Windows, which needs to be re-enabled ASAP.

Co-authored-by: John Kordich <johnkord@microsoft.com>
Co-authored-by: Anita Govindarajan <v-angovi@microsoft.com>
  • Loading branch information
3 people committed Dec 1, 2018
2 parents 33f159f + 42ef11e commit 7f64be1
Show file tree
Hide file tree
Showing 60 changed files with 271 additions and 226 deletions.
371 changes: 247 additions & 124 deletions .jenkins/Jenkinsfile
@@ -1,148 +1,271 @@
// oetools-image:tag Docker image from OE Jenkins Registry
OETOOLS_IMAGE = "oejenkinscidockerregistry.azurecr.io/oetools-azure:1.7"


def coffeelakeTest(String compiler, String unit, String suite) {
stage("Coffeelake $compiler $unit $suite") {
node('hardware') {
checkout scm
pipeline {
agent any
stages {
stage('Build and Test') {
parallel {
stage('Check pre-commit requirements') {
agent {
docker {
image 'oetools-azure:1.7'
}
}
steps {
timeout(2) {
sh './scripts/check-precommit-reqs'
}
}
}
stage('Simulation default compiler') {
// This particular test asserts that everything (at least
// for simulation) can be built after using our
// install-prereqs script to bootstrap a machine.
agent {
dockerfile {
filename '.jenkins/Dockerfile.scripts'
}
}
steps {
timeout(15) {
// This is run to test that it works with the dependencies
// installed by our install-prereqs script.
sh './scripts/check-precommit-reqs'

// We actually expect `ctest` to fail because it is an
// older version that emits a failure if any tests are
// skipped. In other stages, we explicitly install an
// updated version of CMake.
dir('build') {
sh '''
cmake ..
make
OE_SIMULATION=1 ctest --verbose --output-on-failure || true
'''
// Note that `make package` is not expected to work
// without extra configuration.
}
}
}
}
stage('Simulation clang-7 SGX1 Debug') {
agent {
docker {
image 'oetools-azure:1.7'
}
}
steps {
timeout(15) {
sh "./scripts/test-build-config -p $unit -b $suite --compiler=$compiler"
sh './scripts/test-build-config -b Debug --compiler=clang-7'
}

}
}
}
}

def simulationTest(String compiler, String unit, String suite ) {
stage("Coffeelake $compiler $unit $suite") {
node {
checkout scm

docker.image(OETOOLS_IMAGE).inside {
timeout(15) {
sh "./scripts/test-build-config -p $unit -b $suite --compiler=$compiler"
}
stage('Simulation clang-7 SGX1 Release') {
agent {
docker {
image 'oetools-azure:1.7'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1 -b Release --compiler=clang-7'
}
}
}
}
}

def nonSimulationTest() {
stage('Non-Simulation Container SGX1-FLC RelWithDebInfo') {
node('hardware') {
checkout scm

docker.image(OETOOLS_IMAGE).inside('--device /dev/sgx:/dev/sgx') {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b RelWithDebInfo -d'
}
stage('Simulation clang-7 SGX1 RelWithDebInfo') {
agent {
docker {
image 'oetools-azure:1.7'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1 -b RelWithDebInfo --compiler=clang-7'
}
}
}
}
}

def checkPreCommitRequirements() {
stage('Check pre-commit requirements') {
node {
checkout scm

docker.image(OETOOLS_IMAGE).inside {
timeout(2) {
sh './scripts/check-precommit-reqs'
}
stage('Simulation clang-7 SGX1-FLC Debug') {
agent {
docker {
image 'oetools-azure:1.7'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b Debug --compiler=clang-7'
}
}
}
}
stage('Simulation default compiler') {
// This particular test asserts that everything (at least
// for simulation) can be built after using our
// install-prereqs script to bootstrap a machine.
node {
checkout scm

def buildImage = docker.build("oetools-base", '-f .jenkins/Dockerfile.scripts .')

buildImage.inside {
timeout(15) {
// This is run to test that it works with the dependencies
// installed by our install-prereqs script.
sh './scripts/check-precommit-reqs'

// We actually expect `ctest` to fail because it is an
// older version that emits a failure if any tests are
// skipped. In other stages, we explicitly install an
// updated version of CMake.
dir('build') {
sh '''
cmake ..
make
OE_SIMULATION=1 ctest --verbose --output-on-failure || true
'''
// Note that `make package` is not expected to work
// without extra configuration.
}
}
stage('Simulation clang-7 SGX1-FLC Release') {
agent {
docker {
image 'oetools-azure:1.7'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b Release --compiler=clang-7'
}
}
}
}
}

def windowsDebugCrossPlatform() {
stage('Linux SGX1 Debug') {
node {
docker.image(OETOOLS_IMAGE).inside {
stage('Simulation clang-7 SGX1-FLC RelWithDebInfo') {
agent {
docker {
image 'oetools-azure:1.7'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b RelWithDebInfo --compiler=clang-7'
}
}
}
stage('Coffeelake clang-7 SGX1-FLC Debug') {
agent {
node {
label 'hardware'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b Debug -d --compiler=clang-7'
}
}
}
stage('Coffeelake clang-7 SGX1-FLC Release') {
agent {
node {
label 'hardware'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b Release -d --compiler=clang-7'
}
}
}
stage('Coffeelake clang-7 SGX1-FLC RelWithDebInfo') {
agent {
node {
label 'hardware'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b RelWithDebInfo -d --compiler=clang-7'
}
}
}
stage('Coffeelake gcc SGX1-FLC Debug') {
agent {
node {
label 'hardware'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b Debug -d --compiler=gcc'
}
}
}
stage('Coffeelake gcc SGX1-FLC Release') {
agent {
node {
label 'hardware'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b Release -d --compiler=gcc'
}
}
}
stage('Coffeelake gcc SGX1-FLC RelWithDebInfo') {
agent {
node {
label 'hardware'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b RelWithDebInfo -d --compiler=gcc'
}
}
}
stage('Windows Debug Cross-platform') {
stages {
stage('Linux SGX1 Debug') {
agent {
docker {
image 'oetools-azure:1.7'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b Debug --compiler=clang-7'
stash includes: 'build/tests/**', name: 'linuxdebug'
sh './scripts/test-build-config -p SGX1FLC -b Debug --compiler=clang-7'
stash includes: 'build/tests/**', name: 'linuxdebug'
}
}
}
stage('Windows Debug') {
agent {
node {
label 'SGXFLC-Windows'
}
}
steps {
unstash 'linuxdebug'
bat 'move build linuxbin'
bat 'mkdir build && cd build && cmake -G "Visual Studio 15 2017 Win64" -DADD_WINDOWS_ENCLAVE_TESTS=1 -DLINUX_BIN_DIR=%cd%\\linuxbin\\tests .. && pushd . && "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\Tools\\LaunchDevCmd.bat" && popd && cmake --build . --config Debug && ctest -V -C Debug'
}
}
}
}
}
stage('Windows Debug') {
node('SGXFLC-Windows') {
unstash 'linuxdebug'
powershell 'mv build linuxbin'
powershell './scripts/test-build-config.ps1 -add_windows_enclave_tests -linux_bin_dir $ENV:WORKSPACE/linuxbin/tests -build_type Debug'
}
}

}

def windowsReleaseCrossPlatform() {
stage('Linux SGX1 Release') {
node {
docker.image(OETOOLS_IMAGE).inside {
stage('Windows Release Cross-platform') {
stages {
stage('Linux SGX1 Release') {
agent {
docker {
image 'oetools-azure:1.7'
}
}
steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b Release --compiler=clang-7'
stash includes: 'build/tests/**', name: 'linuxrelease'
sh './scripts/test-build-config -p SGX1FLC -b Release --compiler=clang-7'
stash includes: 'build/tests/**', name: 'linuxrelease'
}
}
}
stage('Windows Release') {
agent {
node {
label 'SGXFLC-Windows'
}
}
steps {
unstash 'linuxrelease'
bat 'move build linuxbin'
bat 'mkdir build && cd build && cmake -G "Visual Studio 15 2017 Win64" -DADD_WINDOWS_ENCLAVE_TESTS=1 -DLINUX_BIN_DIR=%cd%\\linuxbin\\tests .. && pushd . && "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\Tools\\LaunchDevCmd.bat" && popd && cmake --build . --config Release && ctest -V -C Release'
}
}
}
}
}
stage('Windows Release') {
node('SGXFLC-Windows') {
unstash 'linuxrelease'
powershell 'mv build linuxbin'
powershell './scripts/test-build-config.ps1 -add_windows_enclave_tests -linux_bin_dir $ENV:WORKSPACE/linuxbin/tests -build_type Release'
stage('Non-Simulation Container SGX1-FLC RelWithDebInfo') {
agent {
docker {
image 'oetools-azure:1.7'
label 'hardware'
args '--device /dev/sgx:/dev/sgx'
}
}

steps {
timeout(15) {
sh './scripts/test-build-config -p SGX1FLC -b RelWithDebInfo -d'
}
}
}
}
}
}
}

parallel "Check Pre-Commit Requirements" : { checkPreCommitRequirements() },
"Simulation clang-7 SGX1 Debug" : { simulationTest('clang-7', 'SGX1', 'Debug')},
"Simulation clang-7 SGX1 Release" : { simulationTest('clang-7', 'SGX1', 'Release')},
"Simulation clang-7 SGX1 RelWithDebInfo" : { simulationTest('clang-7', 'SGX1', 'RelWithDebInfo')},
"Simulation clang-7 SGX1-FLC Debug" : { simulationTest('clang-7', 'SGX1FLC', 'Debug')},
"Simulation clang-7 SGX1-FLC Release" : { simulationTest('clang-7', 'SGX1FLC', 'Release')},
"Simulation clang-7 SGX1-FLC RelWithDebInfo" : { simulationTest('clang-7', 'SGX1FLC', 'RelWithDebInfo')},
"Coffeelake clang-7 SGX1-FLC Debug" : { coffeelakeTest('clang-7', 'SGX1FLC', 'Debug') },
"Coffeelake clang-7 SGX1-FLC Release" : { coffeelakeTest('clang-7', 'SGX1FLC','Release') },
"Coffeelake clang-7 SGX1-FLC RelWithDebInfo" : { coffeelakeTest('clang-7', 'SGX1FLC', 'RelWithDebinfo') },
"Coffeelake gcc SGX1-FLC Debug" : { coffeelakeTest('gcc', 'SGX1FLC', 'Debug') },
"Coffeelake gcc SGX1-FLC Release" : { coffeelakeTest('gcc', 'SGX1FLC', 'Release') },
"Coffeelake gcc SGX1-FLC RelWithDebInfo" : { coffeelakeTest('gcc', 'SGX1FLC', 'RelWithDebInfo') },
"Windows Debug Cross-platform" : { windowsDebugCrossPlatform() },
"Windows Release Cross-platform" : { windowsReleaseCrossPlatform() },
"Non-Simulation Container SGX1-FLC RelWithDebInfo" : { nonSimulationTest() }

0 comments on commit 7f64be1

Please sign in to comment.