Linux 6.4 KB

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