123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- pipeline {
- agent {
- dockerfile { filename 'Jenkinsfiles/ubuntu-18.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-pylint -f text || :
- ./.ci/run-pylint -f json | ./.ci/prfilter
- ./.ci/run-shellcheck || :
- ./.ci/run-shellcheck -f json | ./.ci/prfilter
- '''
- }
- }
- stage('Build') {
- steps {
- 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 ISGX_DRIVER_VERSION=1.9 make
- '''
- sh '''
- make -j 8 SGX=1 WERROR=1
- '''
- }
- }
- stage('Test') {
- steps {
- timeout(time: 5, unit: 'MINUTES') {
- sh '''
- cd LibOS/shim/test/apps/python-simple
- PYTHONVERSION=python3.6 make SGX=1
- PYTHONVERSION=python3.6 make SGX=1 check
- '''
- }
- timeout(time: 5, unit: 'MINUTES') {
- sh '''
- cd LibOS/shim/test/apps/python-scipy-insecure
- PYTHONVERSION=python3.6 make SGX=1
- PYTHONVERSION=python3.6 make SGX=1 check
- '''
- }
- timeout(time: 5, unit: 'MINUTES') {
- sh '''
- cd LibOS/shim/test/apps/bash
- make SGX=1 all
- make SGX=1 regression
- '''
- }
- timeout(time: 5, unit: 'MINUTES') {
- sh '''
- cd LibOS/shim/test/apps/curl
- make SGX=1 all
- make SGX=1 check
- '''
- }
- timeout(time: 10, unit: 'MINUTES') {
- sh '''
- cd LibOS/shim/test/apps/gcc
- make SGX=1 all
- make SGX=1 check
- '''
- }
- timeout(time: 15, unit: 'MINUTES') {
- sh '''
- cd LibOS/shim/test/apps/lmbench
- make SGX=1 all
- make SGX=1 test N_RUNS=1 ENOUGH=100
- '''
- }
- timeout(time: 15, unit: 'MINUTES') {
- sh '''
- cd LibOS/shim/test/apps/redis
- make SGX=1
- make SGX=1 start-graphene-server &
- sleep 30
- ./src/src/redis-benchmark
- '''
- }
- sh '''
- cd LibOS/shim/test/apps/lighttpd
- make SGX=1
- make SGX=1 start-graphene-server &
- sleep 10
- LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8003
- '''
- sh '''
- cd LibOS/shim/test/apps/nginx
- make SGX=1
- make SGX=1 start-graphene-server &
- sleep 30
- LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8002
- '''
- sh '''
- cd LibOS/shim/test/apps/apache
- make SGX=1
- make SGX=1 start-graphene-server &
- sleep 30
- LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8001
- '''
- }
- }
- 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"'
- }
- }
- }
|