Linux-Debug-18.04 6.8 KB

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