Linux 7.9 KB

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