mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-19 11:12:43 +00:00
Enable appveyor cache, add more paranoia
This commit is contained in:
parent
2564711e80
commit
b970bc2a79
@ -141,15 +141,18 @@ install:
|
||||
- set SCCACHE_ERROR_LOG=%CD%/sccache.log
|
||||
|
||||
test_script:
|
||||
- appveyor-retry sh -c 'git submodule deinit -f . && git submodule update --init'
|
||||
- if not exist C:\cache\rustsrc\NUL mkdir C:\cache\rustsrc
|
||||
- sh src/ci/init_repo.sh . /c/cache/rustsrc
|
||||
- set SRC=.
|
||||
- set NO_CCACHE=1
|
||||
- sh src/ci/run.sh
|
||||
|
||||
on_failure:
|
||||
- cat %CD%/sccache.log
|
||||
- cat %CD%\sccache.log
|
||||
- cat C:\Users\appveyor\AppData\Local\Temp\1\build-cache-logs\*.log
|
||||
|
||||
cache:
|
||||
- C:\cache\rustsrc
|
||||
- "build/i686-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
|
||||
- "build/x86_64-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
|
||||
- "i686-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
|
||||
|
@ -38,9 +38,20 @@ fi
|
||||
|
||||
# Wipe the cache if it's not valid, or mark it as invalid while we update it
|
||||
if [ ! -f "$cache_valid_file" ]; then
|
||||
rm -rf "$CACHE_DIR" && mkdir "$CACHE_DIR"
|
||||
rm -rf "$CACHE_DIR"
|
||||
mkdir "$CACHE_DIR"
|
||||
else
|
||||
rm "$cache_valid_file"
|
||||
stat_lines=$(cd "$cache_src_dir" && git status --porcelain | wc -l)
|
||||
stat_ec=$(cd "$cache_src_dir" && git status >/dev/null 2>&1 && echo $?)
|
||||
if [ ! -d "$cache_src_dir/.git" -o $stat_lines != 0 -o $stat_ec != 0 ]; then
|
||||
# Something is badly wrong - the cache valid file is here, but something
|
||||
# about the git repo is fishy. Nuke it all, just in case
|
||||
echo "WARNING: $cache_valid_file exists but bad repo: l:$stat_lines, ec:$stat_ec"
|
||||
rm -rf "$CACHE_DIR"
|
||||
mkdir "$CACHE_DIR"
|
||||
else
|
||||
rm "$cache_valid_file"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update the cache (a pristine copy of the rust source master)
|
||||
|
Loading…
Reference in New Issue
Block a user