Linux-Debug-18.04 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. sh '''
  118. # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix):
  119. git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure
  120. ./Scripts/gitignore-test
  121. '''
  122. sh '''
  123. cd "$(./Scripts/clean-check-test-copy)"
  124. make distclean
  125. make -C LibOS/shim/test/regression clean
  126. make -C LibOS/shim/test/apps/ltp clean
  127. # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559
  128. rm -rf /tmp/graphene-debug-18.04.clean-check.clean/LibOS/shim/test/apps/ltp/src
  129. rm -rf LibOS/shim/test/apps/ltp/src
  130. make -C LibOS/shim/test/apps/python-simple clean
  131. make -C LibOS/shim/test/apps/python-scipy-insecure clean
  132. make -C LibOS/shim/test/apps/bash clean
  133. make -C LibOS/shim/test/apps/curl clean
  134. make -C LibOS/shim/test/apps/gcc clean
  135. make -C LibOS/shim/test/apps/lmbench distclean
  136. make -C LibOS/shim/test/apps/redis distclean
  137. make -C LibOS/shim/test/apps/lighttpd distclean
  138. make -C LibOS/shim/test/apps/nginx distclean
  139. make -C LibOS/shim/test/apps/apache distclean
  140. ./Scripts/clean-check
  141. '''
  142. }
  143. post {
  144. always {
  145. archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp.xml'
  146. junit 'Pal/regression/pal-regression.xml'
  147. junit 'LibOS/shim/test/regression/libos-regression.xml'
  148. junit 'LibOS/shim/test/apps/ltp/ltp.xml'
  149. }
  150. }
  151. }
  152. stage('Deploy') {
  153. steps {
  154. sh 'echo Deploying code'
  155. }
  156. }
  157. }
  158. post {
  159. success {
  160. echo 'Deployment successful'
  161. }
  162. failure {
  163. echo 'Failure while on the pipeline'
  164. }
  165. unstable {
  166. echo 'Pipeline marked as "unstable"'
  167. }
  168. }
  169. }