Linux-SGX-18.04-apps 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. pipeline {
  2. agent {
  3. dockerfile { filename 'Jenkinsfiles/ubuntu-18.04.dockerfile'
  4. label 'sgx_slave'
  5. 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"
  6. }
  7. }
  8. stages {
  9. stage('Lint') {
  10. steps {
  11. sh '''
  12. ./.ci/run-pylint -f text || :
  13. ./.ci/run-pylint -f json | ./.ci/prfilter
  14. ./.ci/run-shellcheck || :
  15. ./.ci/run-shellcheck -f json | ./.ci/prfilter
  16. '''
  17. }
  18. }
  19. stage('Build') {
  20. steps {
  21. sh '''
  22. cd Pal/src/host/Linux-SGX/signer/ && openssl genrsa -3 -out enclave-key.pem 3072
  23. '''
  24. sh '''
  25. cd /opt/intel
  26. git clone https://github.com/01org/linux-sgx-driver.git
  27. cd linux-sgx-driver
  28. git checkout sgx_driver_1.9
  29. make
  30. '''
  31. sh '''
  32. cd Pal/src/host/Linux-SGX/sgx-driver
  33. ISGX_DRIVER_PATH=/opt/intel/linux-sgx-driver ISGX_DRIVER_VERSION=1.9 make
  34. '''
  35. sh '''
  36. make -j 8 SGX=1 WERROR=1
  37. '''
  38. }
  39. }
  40. stage('Test') {
  41. steps {
  42. timeout(time: 5, unit: 'MINUTES') {
  43. sh '''
  44. cd LibOS/shim/test/apps/python-simple
  45. PYTHONVERSION=python3.6 make SGX=1
  46. PYTHONVERSION=python3.6 make SGX=1 check
  47. '''
  48. }
  49. timeout(time: 5, unit: 'MINUTES') {
  50. sh '''
  51. cd LibOS/shim/test/apps/python-scipy-insecure
  52. PYTHONVERSION=python3.6 make SGX=1
  53. PYTHONVERSION=python3.6 make SGX=1 check
  54. '''
  55. }
  56. timeout(time: 5, unit: 'MINUTES') {
  57. sh '''
  58. cd LibOS/shim/test/apps/bash
  59. make SGX=1 all
  60. make SGX=1 regression
  61. '''
  62. }
  63. timeout(time: 5, unit: 'MINUTES') {
  64. sh '''
  65. cd LibOS/shim/test/apps/curl
  66. make SGX=1 all
  67. make SGX=1 check
  68. '''
  69. }
  70. timeout(time: 10, unit: 'MINUTES') {
  71. sh '''
  72. cd LibOS/shim/test/apps/gcc
  73. make SGX=1 all
  74. make SGX=1 check
  75. '''
  76. }
  77. timeout(time: 15, unit: 'MINUTES') {
  78. sh '''
  79. cd LibOS/shim/test/apps/lmbench
  80. make SGX=1 all
  81. make SGX=1 test N_RUNS=1 ENOUGH=100
  82. '''
  83. }
  84. timeout(time: 15, unit: 'MINUTES') {
  85. sh '''
  86. cd LibOS/shim/test/apps/redis
  87. make SGX=1
  88. make SGX=1 start-graphene-server &
  89. sleep 30
  90. ./src/src/redis-benchmark
  91. '''
  92. }
  93. sh '''
  94. cd LibOS/shim/test/apps/lighttpd
  95. make SGX=1
  96. make SGX=1 start-graphene-server &
  97. sleep 10
  98. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8003
  99. '''
  100. sh '''
  101. cd LibOS/shim/test/apps/nginx
  102. make SGX=1
  103. make SGX=1 start-graphene-server &
  104. sleep 30
  105. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8002
  106. '''
  107. sh '''
  108. cd LibOS/shim/test/apps/apache
  109. make SGX=1
  110. make SGX=1 start-graphene-server &
  111. sleep 30
  112. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8001
  113. '''
  114. }
  115. }
  116. stage('Deploy') {
  117. steps {
  118. sh 'echo Deploying code'
  119. }
  120. }
  121. }
  122. post {
  123. success {
  124. echo 'Deployment successful'
  125. }
  126. failure {
  127. echo 'Failure while on the pipeline'
  128. }
  129. unstable {
  130. echo 'Pipeline marked as "unstable"'
  131. }
  132. }
  133. }