mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-07 06:14:02 +00:00
The DCAP SGX driver v1.6+ closely follows the in-kernel SGX driver v28+. This version changes the driver path to /dev/sgx/enclave and changes argument struct of the SGX_IOC_ENCLAVE_ADD_PAGE ioctl.
133 lines
5.6 KiB
Plaintext
133 lines
5.6 KiB
Plaintext
pipeline {
|
|
agent {
|
|
dockerfile { filename 'Jenkinsfiles/ubuntu-16.04.dockerfile'
|
|
label 'sgx_slave'
|
|
args "-v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro -v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket --device=/dev/gsgx:/dev/gsgx --device=/dev/isgx:/dev/isgx"
|
|
}
|
|
}
|
|
stages {
|
|
stage('Lint') {
|
|
steps {
|
|
sh '''
|
|
./.ci/run-shellcheck || :
|
|
./.ci/run-shellcheck -f json | ./.ci/prfilter
|
|
'''
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
sh '''
|
|
./Scripts/clean-check-prepare
|
|
'''
|
|
sh '''
|
|
cd Pal/src/host/Linux-SGX/signer/ && openssl genrsa -3 -out enclave-key.pem 3072
|
|
'''
|
|
sh '''
|
|
cd /opt/intel
|
|
git clone https://github.com/01org/linux-sgx-driver.git
|
|
cd linux-sgx-driver
|
|
git checkout sgx_driver_1.9
|
|
make
|
|
'''
|
|
sh '''
|
|
cd Pal/src/host/Linux-SGX/sgx-driver
|
|
ISGX_DRIVER_PATH=/opt/intel/linux-sgx-driver make
|
|
'''
|
|
sh '''
|
|
make -j 8 SGX=1 WERROR=1 GLIBC_VERSION=2.27
|
|
make -j 8 SGX=1 WERROR=1 GLIBC_VERSION=2.27 test
|
|
'''
|
|
sh '''
|
|
make SGX=1 sgx-tokens
|
|
'''
|
|
}
|
|
}
|
|
stage('Test') {
|
|
steps {
|
|
timeout(time: 15, unit: 'MINUTES') {
|
|
sh '''
|
|
cd Pal/regression
|
|
if [ "${ra_client_spid}" != "" ]; then \
|
|
make clean SGX=1; \
|
|
make SGX=1 RA_CLIENT_SPID=${ra_client_spid}; \
|
|
else \
|
|
make SGX=1; \
|
|
fi
|
|
make SGX=1 all sgx-tokens
|
|
make SGX=1 KEEP_LOG=1 regression
|
|
'''
|
|
}
|
|
timeout(time: 15, unit: 'MINUTES') {
|
|
sh '''
|
|
cd LibOS/shim/test/regression
|
|
make SGX=1 all sgx-tokens
|
|
make SGX=1 regression
|
|
'''
|
|
}
|
|
timeout(time: 5, unit: 'MINUTES') {
|
|
sh '''
|
|
cd LibOS/shim/test/fs
|
|
make SGX=1 all sgx-tokens
|
|
make SGX=1 test
|
|
'''
|
|
}
|
|
|
|
// LTP is ignored under SGX because of random segfaults
|
|
sh '''
|
|
cd LibOS/shim/test/ltp
|
|
make SGX=1 all sgx-tokens
|
|
make SGX=1 ltp-sgx.xml || :
|
|
'''
|
|
|
|
sh '''
|
|
# Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix):
|
|
git -C LibOS/shim/test/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure
|
|
|
|
./Scripts/gitignore-test
|
|
'''
|
|
|
|
sh '''
|
|
cd "$(./Scripts/clean-check-test-copy)"
|
|
|
|
rm Pal/src/host/Linux-SGX/signer/enclave-key.pem
|
|
make SGX=1 GLIBC_VERSION=2.27 distclean
|
|
make -C LibOS/shim/test/regression SGX=1 clean
|
|
make -C LibOS/shim/test/ltp clean
|
|
# LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559
|
|
rm -rf /tmp/graphene-sgx.clean-check.clean/LibOS/shim/test/ltp/src
|
|
rm -rf LibOS/shim/test/ltp/src
|
|
|
|
./Scripts/clean-check
|
|
'''
|
|
}
|
|
post {
|
|
always {
|
|
archiveArtifacts 'LibOS/shim/test/ltp/ltp-sgx.xml'
|
|
|
|
junit 'Pal/regression/pal-regression.xml'
|
|
junit 'LibOS/shim/test/regression/libos-regression.xml'
|
|
|
|
// LTP is ignored under SGX because of random segfaults
|
|
//junit 'LibOS/shim/test/ltp/ltp-sgx.xml'
|
|
}
|
|
}
|
|
}
|
|
stage('Deploy') {
|
|
steps {
|
|
sh 'echo Deploying code'
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
success {
|
|
echo 'Deployment successful'
|
|
}
|
|
failure {
|
|
echo 'Failure while on the pipeline'
|
|
}
|
|
unstable {
|
|
echo 'Pipeline marked as "unstable"'
|
|
}
|
|
}
|
|
}
|