Linux 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. sh '''
  83. cd LibOS/shim/test/apps/lighttpd
  84. make
  85. make start-graphene-server &
  86. sleep 1
  87. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8003
  88. '''
  89. sh '''
  90. cd LibOS/shim/test/apps/nginx
  91. make
  92. make start-graphene-server &
  93. sleep 1
  94. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8002
  95. '''
  96. sh '''
  97. cd LibOS/shim/test/apps/apache
  98. make
  99. make start-graphene-server &
  100. sleep 1
  101. LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh 127.0.0.1:8001
  102. '''
  103. sh '''
  104. cd "$(./Scripts/clean-check-test-copy)"
  105. make clean
  106. rm -r LibOS/glibc-2.23
  107. rm LibOS/glibc-*.tar.gz
  108. make -C Pal/ipc/linux KERNELDIR=/lib/modules/4.4.0-161-generic/build clean
  109. make -C LibOS/shim/test/regression clean
  110. make -C LibOS/shim/test/apps/ltp clean
  111. # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559
  112. rm -rf /tmp/graphene.clean-check.clean/LibOS/shim/test/apps/ltp/src
  113. rm -rf LibOS/shim/test/apps/ltp/src
  114. make -C LibOS/shim/test/apps/python-simple clean
  115. make -C LibOS/shim/test/apps/python-scipy-insecure clean
  116. make -C LibOS/shim/test/apps/bash clean
  117. make -C LibOS/shim/test/apps/curl clean
  118. make -C LibOS/shim/test/apps/gcc clean
  119. make -C LibOS/shim/test/apps/lmbench distclean
  120. make -C LibOS/shim/test/apps/lighttpd distclean
  121. make -C LibOS/shim/test/apps/nginx distclean
  122. make -C LibOS/shim/test/apps/apache distclean
  123. make -C Pal/src PAL_HOST=Skeleton clean
  124. ./Scripts/clean-check
  125. '''
  126. }
  127. post {
  128. always {
  129. archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp.xml'
  130. junit 'Pal/regression/pal-regression.xml'
  131. junit 'LibOS/shim/test/regression/libos-regression.xml'
  132. junit 'LibOS/shim/test/apps/ltp/ltp.xml'
  133. }
  134. }
  135. }
  136. stage('Deploy') {
  137. steps {
  138. sh 'echo Deploying code'
  139. }
  140. }
  141. }
  142. post {
  143. success {
  144. echo 'Deployment successful'
  145. }
  146. failure {
  147. echo 'Failure while on the pipeline'
  148. }
  149. unstable {
  150. echo 'Pipeline marked as "unstable"'
  151. }
  152. }
  153. }