Linux 7.2 KB

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