Linux 7.0 KB

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