Linux-Debug-18.04 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. pipeline {
  2. agent {
  3. dockerfile { filename 'Jenkinsfiles/ubuntu-18.04.dockerfile' }
  4. }
  5. stages {
  6. stage('Lint') {
  7. steps {
  8. sh '''
  9. ./.ci/run-pylint -f text || :
  10. ./.ci/run-pylint -f json | ./.ci/prfilter
  11. ./.ci/run-shellcheck || :
  12. ./.ci/run-shellcheck -f json | ./.ci/prfilter
  13. '''
  14. }
  15. }
  16. stage('Build') {
  17. steps {
  18. sh '''
  19. ./Scripts/clean-check-prepare
  20. make -j 8 DEBUG=1 WERROR=1
  21. make -j 8 DEBUG=1 WERROR=1 test
  22. '''
  23. }
  24. }
  25. stage('Test') {
  26. steps {
  27. sh '''
  28. cd Pal/regression
  29. make regression
  30. '''
  31. sh '''
  32. cd LibOS/shim/test/regression
  33. make regression
  34. '''
  35. sh '''
  36. cd LibOS/shim/test/fs
  37. make test
  38. '''
  39. sh '''
  40. cd LibOS/shim/test/apps/ltp
  41. make
  42. make ltp.xml
  43. '''
  44. timeout(time: 5, unit: 'MINUTES') {
  45. sh '''
  46. cd LibOS/shim/test/apps/python-simple
  47. PYTHONVERSION=python3.6 make check
  48. '''
  49. }
  50. timeout(time: 5, unit: 'MINUTES') {
  51. sh '''
  52. cd LibOS/shim/test/apps/python-scipy-insecure
  53. PYTHONVERSION=python3.6 make check
  54. '''
  55. }
  56. timeout(time: 5, unit: 'MINUTES') {
  57. sh '''
  58. cd LibOS/shim/test/apps/bash
  59. make regression
  60. '''
  61. }
  62. timeout(time: 5, unit: 'MINUTES') {
  63. sh '''
  64. cd LibOS/shim/test/apps/curl
  65. make check
  66. '''
  67. }
  68. timeout(time: 5, unit: 'MINUTES') {
  69. sh '''
  70. cd LibOS/shim/test/apps/gcc
  71. make check
  72. '''
  73. }
  74. timeout(time: 20, unit: 'MINUTES') {
  75. sh '''
  76. cd LibOS/shim/test/apps/lmbench
  77. make test N_RUNS=1 ENOUGH=100
  78. '''
  79. }
  80. timeout(time: 10, unit: 'MINUTES') {
  81. sh '''
  82. cd LibOS/shim/test/apps/redis
  83. make
  84. make start-graphene-server &
  85. sleep 1
  86. ./src/src/redis-benchmark
  87. '''
  88. }
  89. timeout(time: 10, unit: 'MINUTES') {
  90. sh '''
  91. cd LibOS/shim/test/apps/lighttpd
  92. make
  93. make start-graphene-server &
  94. sleep 1
  95. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8003
  96. '''
  97. }
  98. timeout(time: 10, unit: 'MINUTES') {
  99. sh '''
  100. cd LibOS/shim/test/apps/nginx
  101. make
  102. make start-graphene-server &
  103. sleep 1
  104. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8002
  105. '''
  106. }
  107. timeout(time: 20, unit: 'MINUTES') {
  108. sh '''
  109. cd LibOS/shim/test/apps/apache
  110. make
  111. make start-graphene-server &
  112. sleep 1
  113. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8001
  114. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh https://127.0.0.1:8443
  115. '''
  116. }
  117. timeout(time: 5, unit: 'MINUTES') {
  118. sh '''
  119. cd LibOS/shim/test/apps/blender
  120. make check
  121. '''
  122. }
  123. sh '''
  124. # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix):
  125. git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure
  126. ./Scripts/gitignore-test
  127. '''
  128. sh '''
  129. cd "$(./Scripts/clean-check-test-copy)"
  130. make distclean
  131. make -C LibOS/shim/test/regression clean
  132. make -C LibOS/shim/test/apps/ltp clean
  133. # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559
  134. rm -rf /tmp/graphene-debug-18.04.clean-check.clean/LibOS/shim/test/apps/ltp/src
  135. rm -rf LibOS/shim/test/apps/ltp/src
  136. make -C LibOS/shim/test/apps/python-simple clean
  137. make -C LibOS/shim/test/apps/python-scipy-insecure clean
  138. make -C LibOS/shim/test/apps/bash clean
  139. make -C LibOS/shim/test/apps/curl clean
  140. make -C LibOS/shim/test/apps/gcc clean
  141. make -C LibOS/shim/test/apps/lmbench distclean
  142. make -C LibOS/shim/test/apps/redis distclean
  143. make -C LibOS/shim/test/apps/lighttpd distclean
  144. make -C LibOS/shim/test/apps/nginx distclean
  145. make -C LibOS/shim/test/apps/apache distclean
  146. make -C LibOS/shim/test/apps/blender distclean
  147. ./Scripts/clean-check
  148. '''
  149. }
  150. post {
  151. always {
  152. archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp.xml'
  153. junit 'Pal/regression/pal-regression.xml'
  154. junit 'LibOS/shim/test/regression/libos-regression.xml'
  155. junit 'LibOS/shim/test/apps/ltp/ltp.xml'
  156. }
  157. }
  158. }
  159. stage('Deploy') {
  160. steps {
  161. sh 'echo Deploying code'
  162. }
  163. }
  164. }
  165. post {
  166. success {
  167. echo 'Deployment successful'
  168. }
  169. failure {
  170. echo 'Failure while on the pipeline'
  171. }
  172. unstable {
  173. echo 'Pipeline marked as "unstable"'
  174. }
  175. }
  176. }