Linux-Debug 7.7 KB

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