File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -141,15 +141,18 @@ install:
141141 - set SCCACHE_ERROR_LOG=%CD%/sccache.log
142142
143143test_script :
144- - appveyor-retry sh -c 'git submodule deinit -f . && git submodule update --init'
144+ - if not exist C:\cache\rustsrc\NUL mkdir C:\cache\rustsrc
145+ - sh src/ci/init_repo.sh . /c/cache/rustsrc
145146 - set SRC=.
146147 - set NO_CCACHE=1
147148 - sh src/ci/run.sh
148149
149150on_failure :
150- - cat %CD%/sccache.log
151+ - cat %CD%\sccache.log
152+ - cat C:\Users\appveyor\AppData\Local\Temp\1\build-cache-logs\*.log
151153
152154cache :
155+ - C:\cache\rustsrc
153156 - " build/i686-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
154157 - " build/x86_64-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
155158 - " i686-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
Original file line number Diff line number Diff line change 3838
3939# Wipe the cache if it's not valid, or mark it as invalid while we update it
4040if [ ! -f " $cache_valid_file " ]; then
41- rm -rf " $CACHE_DIR " && mkdir " $CACHE_DIR "
41+ rm -rf " $CACHE_DIR "
42+ mkdir " $CACHE_DIR "
4243else
43- rm " $cache_valid_file "
44+ stat_lines=$( cd " $cache_src_dir " && git status --porcelain | wc -l)
45+ stat_ec=$( cd " $cache_src_dir " && git status > /dev/null 2>&1 && echo $? )
46+ if [ ! -d " $cache_src_dir /.git" -o $stat_lines != 0 -o $stat_ec != 0 ]; then
47+ # Something is badly wrong - the cache valid file is here, but something
48+ # about the git repo is fishy. Nuke it all, just in case
49+ echo " WARNING: $cache_valid_file exists but bad repo: l:$stat_lines , ec:$stat_ec "
50+ rm -rf " $CACHE_DIR "
51+ mkdir " $CACHE_DIR "
52+ else
53+ rm " $cache_valid_file "
54+ fi
4455fi
4556
4657# Update the cache (a pristine copy of the rust source master)
You can’t perform that action at this time.
0 commit comments