Linux 6.4 KB

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