File tree 2 files changed +18
-4
lines changed
2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -141,15 +141,18 @@ install:
141
141
- set SCCACHE_ERROR_LOG=%CD%/sccache.log
142
142
143
143
test_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
145
146
- set SRC=.
146
147
- set NO_CCACHE=1
147
148
- sh src/ci/run.sh
148
149
149
150
on_failure :
150
- - cat %CD%/sccache.log
151
+ - cat %CD%\sccache.log
152
+ - cat C:\Users\appveyor\AppData\Local\Temp\1\build-cache-logs\*.log
151
153
152
154
cache :
155
+ - C:\cache\rustsrc
153
156
- " build/i686-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
154
157
- " build/x86_64-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
155
158
- " i686-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
Original file line number Diff line number Diff line change 38
38
39
39
# Wipe the cache if it's not valid, or mark it as invalid while we update it
40
40
if [ ! -f " $cache_valid_file " ]; then
41
- rm -rf " $CACHE_DIR " && mkdir " $CACHE_DIR "
41
+ rm -rf " $CACHE_DIR "
42
+ mkdir " $CACHE_DIR "
42
43
else
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
44
55
fi
45
56
46
57
# Update the cache (a pristine copy of the rust source master)
You can’t perform that action at this time.
0 commit comments