Linux-SGX 5.2 KB

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