diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d36402aa..0e7dceaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -285,6 +285,7 @@ jobs: if: runner.os != 'windows' run: | echo "BUILD_TYPE=Release" >> $GITHUB_ENV + echo "CACHE=OFF" >> $GITHUB_ENV os="${{ matrix.os }}" if [[ "${os}" == "macos"* ]]; then echo "ncpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV @@ -296,6 +297,7 @@ jobs: if: runner.os == 'windows' run: | echo "BUILD_TYPE=Release" >> $env:GITHUB_ENV + echo "CACHE=OFF" >> $env:GITHUB_ENV echo "ncpus=%NUMBER_OF_PROCESSORS%" echo "ncpus=%NUMBER_OF_PROCESSORS%" >> $GITHUB_ENV @@ -403,11 +405,14 @@ jobs: if: ${{ runner.os != 'windows' && steps.cache.outputs.cache-hit == 'true' }} run: | mv ./llvm-project/ ../ + echo "CACHE=ON" >> $GITHUB_ENV + - name: Move llvm-project to top level directory if: ${{ runner.os == 'windows' && steps.cache.outputs.cache-hit == 'true' }} run: | mv .\llvm-project\ ..\ + echo "CACHE=ON" >> $env:GITHUB_ENV - name: Build LLVM/Cling on Unix systems if the cache is invalid if: ${{ runner.os != 'windows' && steps.cache.outputs.cache-hit != 'true' }} @@ -566,8 +571,7 @@ jobs: if [[ "${cling_on}" == "ON" ]]; then #FIXME: Currently Cling directory not found if using cache, so cloning again, until reason why is found. - test -d ./cling - if [[ $? == 1 ]]; then + if [[ $CACHE == "ON" ]]; then echo "Cling folder not found. Cloning again." git clone https://github.com/root-project/cling.git cd ./cling/