Linux-SGX-18.04-apps 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. sh '''
  85. cd LibOS/shim/test/apps/lighttpd
  86. make SGX=1
  87. make SGX=1 start-graphene-server &
  88. sleep 10
  89. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8003
  90. '''
  91. sh '''
  92. cd LibOS/shim/test/apps/nginx
  93. make SGX=1
  94. make SGX=1 start-graphene-server &
  95. sleep 30
  96. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8002
  97. '''
  98. sh '''
  99. cd LibOS/shim/test/apps/apache
  100. make SGX=1
  101. make SGX=1 start-graphene-server &
  102. sleep 30
  103. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8001
  104. '''
  105. }
  106. }
  107. stage('Deploy') {
  108. steps {
  109. sh 'echo Deploying code'
  110. }
  111. }
  112. }
  113. post {
  114. success {
  115. echo 'Deployment successful'
  116. }
  117. failure {
  118. echo 'Failure while on the pipeline'
  119. }
  120. unstable {
  121. echo 'Pipeline marked as "unstable"'
  122. }
  123. }
  124. }