Linux-Debug 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. sh '''
  59. cd LibOS/shim/test/apps/bash
  60. make regression
  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 USE_SELECT=1
  84. make start-graphene-server &
  85. sleep 1
  86. ./src/src/redis-benchmark
  87. '''
  88. }
  89. sh '''
  90. cd LibOS/shim/test/apps/lighttpd
  91. make
  92. make start-graphene-server &
  93. sleep 1
  94. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8003
  95. '''
  96. sh '''
  97. cd LibOS/shim/test/apps/nginx
  98. make
  99. make start-graphene-server &
  100. sleep 1
  101. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8002
  102. '''
  103. sh '''
  104. cd LibOS/shim/test/apps/apache
  105. make
  106. make start-graphene-server &
  107. sleep 1
  108. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8001
  109. '''
  110. sh '''
  111. cd "$(./Scripts/clean-check-test-copy)"
  112. make distclean
  113. make -C LibOS/shim/test/regression clean
  114. make -C LibOS/shim/test/apps/ltp clean
  115. # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559
  116. rm -rf /tmp/graphene-debug.clean-check.clean/LibOS/shim/test/apps/ltp/src
  117. rm -rf LibOS/shim/test/apps/ltp/src
  118. make -C LibOS/shim/test/apps/python-simple clean
  119. make -C LibOS/shim/test/apps/python-scipy-insecure clean
  120. make -C LibOS/shim/test/apps/bash clean
  121. make -C LibOS/shim/test/apps/curl clean
  122. make -C LibOS/shim/test/apps/gcc clean
  123. make -C LibOS/shim/test/apps/lmbench distclean
  124. make -C LibOS/shim/test/apps/redis distclean
  125. make -C LibOS/shim/test/apps/lighttpd distclean
  126. make -C LibOS/shim/test/apps/nginx distclean
  127. make -C LibOS/shim/test/apps/apache distclean
  128. make -C Pal/src PAL_HOST=Skeleton clean
  129. ./Scripts/clean-check
  130. '''
  131. }
  132. post {
  133. always {
  134. archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp.xml'
  135. junit 'Pal/regression/pal-regression.xml'
  136. junit 'LibOS/shim/test/regression/libos-regression.xml'
  137. junit 'LibOS/shim/test/apps/ltp/ltp.xml'
  138. }
  139. }
  140. }
  141. stage('Deploy') {
  142. steps {
  143. sh 'echo Deploying code'
  144. }
  145. }
  146. }
  147. post {
  148. success {
  149. echo 'Deployment successful'
  150. }
  151. failure {
  152. echo 'Failure while on the pipeline'
  153. }
  154. unstable {
  155. echo 'Pipeline marked as "unstable"'
  156. }
  157. }
  158. }