Linux 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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. cd LibOS
  19. make -j 8 glibc-build/Build.success GLIBC_VERSION=2.23
  20. rm -r glibc-build
  21. cd ..
  22. make -j 8 WERROR=1
  23. make -j 8 WERROR=1 test
  24. make -C Pal/src -j 8 PAL_HOST=Skeleton WERROR=1
  25. '''
  26. }
  27. }
  28. stage('Test') {
  29. steps {
  30. sh '''
  31. cd Pal/regression
  32. make regression
  33. '''
  34. sh '''
  35. cd LibOS/shim/test/regression
  36. make regression
  37. '''
  38. sh '''
  39. cd LibOS/shim/test/fs
  40. make test
  41. '''
  42. sh '''
  43. cd LibOS/shim/test/apps/ltp
  44. make
  45. make ltp.xml
  46. '''
  47. timeout(time: 5, unit: 'MINUTES') {
  48. sh '''
  49. cd LibOS/shim/test/apps/python-simple
  50. make check
  51. '''
  52. }
  53. timeout(time: 5, unit: 'MINUTES') {
  54. sh '''
  55. cd LibOS/shim/test/apps/python-scipy-insecure
  56. make check
  57. '''
  58. }
  59. timeout(time: 5, unit: 'MINUTES') {
  60. sh '''
  61. cd LibOS/shim/test/apps/bash
  62. make regression
  63. '''
  64. }
  65. timeout(time: 5, unit: 'MINUTES') {
  66. sh '''
  67. cd LibOS/shim/test/apps/curl
  68. make check
  69. '''
  70. }
  71. timeout(time: 5, unit: 'MINUTES') {
  72. sh '''
  73. cd LibOS/shim/test/apps/gcc
  74. make check
  75. '''
  76. }
  77. timeout(time: 15, unit: 'MINUTES') {
  78. sh '''
  79. cd LibOS/shim/test/apps/lmbench
  80. make test N_RUNS=1 ENOUGH=100
  81. '''
  82. }
  83. timeout(time: 10, unit: 'MINUTES') {
  84. sh '''
  85. cd LibOS/shim/test/apps/redis
  86. make USE_SELECT=1
  87. make start-graphene-server &
  88. sleep 1
  89. ./src/src/redis-benchmark
  90. '''
  91. }
  92. timeout(time: 10, unit: 'MINUTES') {
  93. sh '''
  94. cd LibOS/shim/test/apps/lighttpd
  95. make
  96. make start-graphene-server &
  97. sleep 1
  98. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8003
  99. '''
  100. }
  101. timeout(time: 10, unit: 'MINUTES') {
  102. sh '''
  103. cd LibOS/shim/test/apps/nginx
  104. make
  105. make start-graphene-server &
  106. sleep 1
  107. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8002
  108. '''
  109. }
  110. timeout(time: 20, unit: 'MINUTES') {
  111. sh '''
  112. cd LibOS/shim/test/apps/apache
  113. make
  114. make start-graphene-server &
  115. sleep 1
  116. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8001
  117. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh https://127.0.0.1:8443
  118. '''
  119. }
  120. sh '''
  121. cd "$(./Scripts/clean-check-test-copy)"
  122. make distclean
  123. rm -r LibOS/glibc-2.23
  124. rm LibOS/glibc-2.23.tar.gz
  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.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. make -C Pal/src PAL_HOST=Skeleton clean
  141. ./Scripts/clean-check
  142. '''
  143. }
  144. post {
  145. always {
  146. archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp.xml'
  147. junit 'Pal/regression/pal-regression.xml'
  148. junit 'LibOS/shim/test/regression/libos-regression.xml'
  149. junit 'LibOS/shim/test/apps/ltp/ltp.xml'
  150. }
  151. }
  152. }
  153. stage('Deploy') {
  154. steps {
  155. sh 'echo Deploying code'
  156. }
  157. }
  158. }
  159. post {
  160. success {
  161. echo 'Deployment successful'
  162. }
  163. failure {
  164. echo 'Failure while on the pipeline'
  165. }
  166. unstable {
  167. echo 'Pipeline marked as "unstable"'
  168. }
  169. }
  170. }