diff --git a/.ci/lib/stage-clean-check.jenkinsfile b/.ci/lib/stage-clean-check.jenkinsfile new file mode 100644 index 00000000..a4366d27 --- /dev/null +++ b/.ci/lib/stage-clean-check.jenkinsfile @@ -0,0 +1,44 @@ +stage('clean-check') { + sh ''' + ./Scripts/gitignore-test + ''' + sh ''' + cd "$(./Scripts/clean-check-test-copy)" + + rm -f Pal/src/host/Linux-SGX/signer/enclave-key.pem + + make distclean + + rm -rf LibOS/glibc-2.* + + make -C LibOS/shim/test/regression clean + + make -C Examples/python-simple clean + make -C Examples/python-scipy-insecure clean + make -C Examples/bash clean + make -C Examples/curl clean + #make -C Examples/gcc distclean + make -C Examples/memcached distclean + make -C Examples/redis distclean + make -C Examples/lighttpd distclean + make -C Examples/nginx distclean + make -C Examples/apache distclean + make -C Examples/blender distclean + #make -C Examples/r distclean + make -C Pal/src PAL_HOST=Skeleton clean + + make -C Examples/ra-tls-mbedtls distclean + make -C Examples/ra-tls-secret-prov distclean + + make -C LibOS/shim/test/ltp clean + # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559 + rm -rf /tmp/*.clean-check.clean/LibOS/shim/test/ltp/src + rm -rf LibOS/shim/test/ltp/src + + # python/ subdir does not have makefiles, so no clean + rm -rf /tmp/*.clean-check.clean/python/graphenelibos/__pycache__ + rm -rf python/graphenelibos/__pycache__ + + ./Scripts/clean-check + ''' +} diff --git a/.ci/lib/stage-test-all-nosgx.jenkinsfile b/.ci/lib/stage-test-all-nosgx.jenkinsfile index 3aea7587..e12eab6f 100644 --- a/.ci/lib/stage-test-all-nosgx.jenkinsfile +++ b/.ci/lib/stage-test-all-nosgx.jenkinsfile @@ -126,36 +126,4 @@ stage('test') { ''' } */ - - sh ''' - ./Scripts/gitignore-test - ''' - sh ''' - cd "$(./Scripts/clean-check-test-copy)" - - make distclean - rm -rf LibOS/glibc-2.* - make -C LibOS/shim/test/regression clean - - make -C LibOS/shim/test/ltp clean - # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559 - rm -rf /tmp/graphene*.clean-check.clean/LibOS/shim/test/ltp/src - rm -rf LibOS/shim/test/ltp/src - - make -C Examples/python-simple clean - make -C Examples/python-scipy-insecure clean - make -C Examples/bash clean - make -C Examples/curl clean - #make -C Examples/gcc distclean - make -C Examples/memcached distclean - make -C Examples/redis distclean - make -C Examples/lighttpd distclean - make -C Examples/nginx distclean - make -C Examples/apache distclean - make -C Examples/blender distclean - #make -C Examples/r distclean - make -C Pal/src PAL_HOST=Skeleton clean - - ./Scripts/clean-check - ''' } diff --git a/.ci/lib/stage-test-apps-sgx.jenkinsfile b/.ci/lib/stage-test-apps-sgx.jenkinsfile index 2ab95a7a..3478bdaa 100644 --- a/.ci/lib/stage-test-apps-sgx.jenkinsfile +++ b/.ci/lib/stage-test-apps-sgx.jenkinsfile @@ -149,38 +149,4 @@ stage('test') { fi ''' } - - sh ''' - ./Scripts/gitignore-test - ''' - sh ''' - cd "$(./Scripts/clean-check-test-copy)" - - rm Pal/src/host/Linux-SGX/signer/enclave-key.pem - make distclean - - make -C Examples/python-simple SGX=1 clean - make -C Examples/python-scipy-insecure SGX=1 clean - make -C Examples/bash SGX=1 clean - make -C Examples/curl SGX=1 clean - #make -C Examples/gcc SGX=1 distclean - make -C Examples/memcached SGX=1 distclean - make -C Examples/redis SGX=1 distclean - make -C Examples/lighttpd SGX=1 distclean - make -C Examples/nginx SGX=1 distclean - make -C Examples/apache SGX=1 distclean - make -C Examples/blender SGX=1 distclean - #make -C Examples/r SGX=1 distclean - make -C Examples/ra-tls-mbedtls SGX=1 distclean - make -C Examples/ra-tls-secret-prov SGX=1 distclean - - # Currently used release of LTP contains broken symlinks under - # utils/ffsb-6.0-rc2/ (config.guess and config.sub); without explicit - # rm of these symlinks, the clean-check utility fails. We should - # update to newer release of LTP where this issue will be fixed. - rm -rf /tmp/*/LibOS/shim/test/ltp/src - rm -rf LibOS/shim/test/ltp/src - - ./Scripts/clean-check - ''' } diff --git a/.ci/lib/stage-test-simple-sgx.jenkinsfile b/.ci/lib/stage-test-simple-sgx.jenkinsfile index 82a0a4ca..b4647301 100644 --- a/.ci/lib/stage-test-simple-sgx.jenkinsfile +++ b/.ci/lib/stage-test-simple-sgx.jenkinsfile @@ -34,21 +34,4 @@ stage('test') { make -j8 SGX=1 all sgx-tokens make SGX=1 ltp-sgx.xml || : ''' - - sh ''' - ./Scripts/gitignore-test - ''' - sh ''' - cd "$(./Scripts/clean-check-test-copy)" - - rm Pal/src/host/Linux-SGX/signer/enclave-key.pem - make distclean - make -C LibOS/shim/test/regression clean - make -C LibOS/shim/test/ltp clean - # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559 - rm -rf /tmp/graphene*.clean-check.clean/LibOS/shim/test/ltp/src - rm -rf LibOS/shim/test/ltp/src - - ./Scripts/clean-check - ''' } diff --git a/.ci/linux-direct-ubuntu16.04-gcc-debug.jenkinsfile b/.ci/linux-direct-ubuntu16.04-gcc-debug.jenkinsfile index 277e4c1e..c82ed506 100644 --- a/.ci/linux-direct-ubuntu16.04-gcc-debug.jenkinsfile +++ b/.ci/linux-direct-ubuntu16.04-gcc-debug.jenkinsfile @@ -19,5 +19,6 @@ node('nonsgx_slave') { } finally { load '.ci/lib/artifacts.jenkinsfile' } + load '.ci/lib/stage-clean-check.jenkinsfile' } } diff --git a/.ci/linux-direct-ubuntu16.04-gcc-glibc223.jenkinsfile b/.ci/linux-direct-ubuntu16.04-gcc-glibc223.jenkinsfile index d25f2987..646fdd66 100644 --- a/.ci/linux-direct-ubuntu16.04-gcc-glibc223.jenkinsfile +++ b/.ci/linux-direct-ubuntu16.04-gcc-glibc223.jenkinsfile @@ -15,5 +15,6 @@ node('nonsgx_slave') { load '.ci/lib/stage-lint.jenkinsfile' load '.ci/lib/stage-clean-check-prepare.jenkinsfile' load '.ci/lib/stage-build-nosgx.jenkinsfile' + load '.ci/lib/stage-clean-check.jenkinsfile' } } diff --git a/.ci/linux-direct-ubuntu16.04-gcc-release.jenkinsfile b/.ci/linux-direct-ubuntu16.04-gcc-release.jenkinsfile index f40c848e..2a3be498 100644 --- a/.ci/linux-direct-ubuntu16.04-gcc-release.jenkinsfile +++ b/.ci/linux-direct-ubuntu16.04-gcc-release.jenkinsfile @@ -19,5 +19,6 @@ node('nonsgx_slave') { } finally { load '.ci/lib/artifacts.jenkinsfile' } + load '.ci/lib/stage-clean-check.jenkinsfile' } } diff --git a/.ci/linux-direct-ubuntu18.04-gcc-debug.jenkinsfile b/.ci/linux-direct-ubuntu18.04-gcc-debug.jenkinsfile index e51ef5d3..6b88a920 100644 --- a/.ci/linux-direct-ubuntu18.04-gcc-debug.jenkinsfile +++ b/.ci/linux-direct-ubuntu18.04-gcc-debug.jenkinsfile @@ -19,5 +19,6 @@ node('nonsgx_slave') { } finally { load '.ci/lib/artifacts.jenkinsfile' } + load '.ci/lib/stage-clean-check.jenkinsfile' } } diff --git a/.ci/linux-direct-ubuntu18.04-gcc-glibc227.jenkinsfile b/.ci/linux-direct-ubuntu18.04-gcc-glibc227.jenkinsfile index 25113389..d4c5747d 100644 --- a/.ci/linux-direct-ubuntu18.04-gcc-glibc227.jenkinsfile +++ b/.ci/linux-direct-ubuntu18.04-gcc-glibc227.jenkinsfile @@ -15,5 +15,6 @@ node('nonsgx_slave') { load '.ci/lib/stage-lint.jenkinsfile' load '.ci/lib/stage-clean-check-prepare.jenkinsfile' load '.ci/lib/stage-build-nosgx.jenkinsfile' + load '.ci/lib/stage-clean-check.jenkinsfile' } } diff --git a/.ci/linux-direct-ubuntu18.04-gcc-release.jenkinsfile b/.ci/linux-direct-ubuntu18.04-gcc-release.jenkinsfile index 92f44162..d22006cd 100644 --- a/.ci/linux-direct-ubuntu18.04-gcc-release.jenkinsfile +++ b/.ci/linux-direct-ubuntu18.04-gcc-release.jenkinsfile @@ -19,5 +19,6 @@ node('nonsgx_slave') { } finally { load '.ci/lib/artifacts.jenkinsfile' } + load '.ci/lib/stage-clean-check.jenkinsfile' } } diff --git a/.ci/linux-sgx-ubuntu16.04-gcc-release-apps.jenkinsfile b/.ci/linux-sgx-ubuntu16.04-gcc-release-apps.jenkinsfile index 174d150b..b41a9eec 100644 --- a/.ci/linux-sgx-ubuntu16.04-gcc-release-apps.jenkinsfile +++ b/.ci/linux-sgx-ubuntu16.04-gcc-release-apps.jenkinsfile @@ -20,5 +20,6 @@ node('sgx_slave_2.6') { } finally { load '.ci/lib/artifacts.jenkinsfile' } + load '.ci/lib/stage-clean-check.jenkinsfile' } } diff --git a/.ci/linux-sgx-ubuntu16.04-gcc-release.jenkinsfile b/.ci/linux-sgx-ubuntu16.04-gcc-release.jenkinsfile index e25700f0..8cbc5b8c 100644 --- a/.ci/linux-sgx-ubuntu16.04-gcc-release.jenkinsfile +++ b/.ci/linux-sgx-ubuntu16.04-gcc-release.jenkinsfile @@ -20,5 +20,6 @@ node('sgx_slave_2.6') { } finally { load '.ci/lib/artifacts.jenkinsfile' } + load '.ci/lib/stage-clean-check.jenkinsfile' } } diff --git a/.ci/linux-sgx-ubuntu18.04-gcc-release-apps.jenkinsfile b/.ci/linux-sgx-ubuntu18.04-gcc-release-apps.jenkinsfile index 7bea2956..5551dec0 100644 --- a/.ci/linux-sgx-ubuntu18.04-gcc-release-apps.jenkinsfile +++ b/.ci/linux-sgx-ubuntu18.04-gcc-release-apps.jenkinsfile @@ -20,5 +20,6 @@ node('sgx_slave_2.6') { } finally { load '.ci/lib/artifacts.jenkinsfile' } + load '.ci/lib/stage-clean-check.jenkinsfile' } } diff --git a/.ci/linux-sgx-ubuntu18.04-gcc-release.jenkinsfile b/.ci/linux-sgx-ubuntu18.04-gcc-release.jenkinsfile index 12ee446e..3978e4ee 100644 --- a/.ci/linux-sgx-ubuntu18.04-gcc-release.jenkinsfile +++ b/.ci/linux-sgx-ubuntu18.04-gcc-release.jenkinsfile @@ -20,5 +20,6 @@ node('sgx_slave_2.6') { } finally { load '.ci/lib/artifacts.jenkinsfile' } + load '.ci/lib/stage-clean-check.jenkinsfile' } }