Linux 8.2 KB

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