Linux-SGX-18.04 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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('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. if [ "${ra_client_spid}" != "" ]; then \
  40. make clean SGX=1; \
  41. make SGX=1 RA_CLIENT_SPID=${ra_client_spid} \
  42. RA_CLIENT_KEY=${ra_client_key}; \
  43. else \
  44. make SGX=1; \
  45. fi
  46. make SGX_RUN=1
  47. make SGX_RUN=1 KEEP_LOG=1 regression
  48. '''
  49. }
  50. timeout(time: 15, unit: 'MINUTES') {
  51. sh '''
  52. cd LibOS/shim/test/regression
  53. make SGX=1
  54. make SGX_RUN=1
  55. make SGX_RUN=1 regression
  56. '''
  57. }
  58. timeout(time: 5, unit: 'MINUTES') {
  59. sh '''
  60. cd LibOS/shim/test/apps/python
  61. make SGX=1
  62. make SGX_RUN=1
  63. make SGX_RUN=1 regression
  64. '''
  65. }
  66. timeout(time: 5, unit: 'MINUTES') {
  67. sh '''
  68. cd LibOS/shim/test/apps/bash
  69. make SGX=1
  70. make SGX_RUN=1
  71. make SGX_RUN=1 regression
  72. '''
  73. }
  74. timeout(time: 10, unit: 'MINUTES') {
  75. sh '''
  76. cd LibOS/shim/test/apps/gcc
  77. make SGX=1
  78. make SGX_RUN=1
  79. make SGX_RUN=1 regression
  80. '''
  81. }
  82. timeout(time: 15, unit: 'MINUTES') {
  83. sh '''
  84. cd LibOS/shim/test/apps/lmbench
  85. make SGX=1
  86. make SGX_RUN=1
  87. make SGX_RUN=1 regression N_RUNS=1 ENOUGH=100
  88. '''
  89. }
  90. sh '''
  91. cd LibOS/shim/test/apps/lighttpd
  92. make SGX=1
  93. make SGX_RUN=1
  94. make SGX_RUN=1 start-graphene-server &
  95. sleep 10
  96. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8000
  97. '''
  98. /*
  99. sh '''
  100. cd LibOS/shim/test/apps/apache
  101. make SGX=1
  102. make SGX_RUN=1
  103. make SGX_RUN=1 start-graphene-server &
  104. sleep 15
  105. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8001
  106. '''
  107. */
  108. }
  109. post {
  110. always {
  111. junit 'Pal/regression/pal-regression.xml'
  112. junit 'LibOS/shim/test/regression/libos-regression.xml'
  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. }