diff options
| author | Aidan Hobson Sayers <aidanhs@cantab.net> | 2017-05-25 01:37:36 +0100 |
|---|---|---|
| committer | Aidan Hobson Sayers <aidanhs@cantab.net> | 2017-05-25 02:19:00 +0100 |
| commit | 47f8b4a3d8e80ca88912aa10954685b300565a90 (patch) | |
| tree | b5d944dd2c30676d8439bd029ff1b179248d30b8 /src/ci | |
| parent | 5b13bff5203c1bdc6ac6dc87f69b5359a9503078 (diff) | |
| download | rust-47f8b4a3d8e80ca88912aa10954685b300565a90.tar.gz rust-47f8b4a3d8e80ca88912aa10954685b300565a90.zip | |
Hack around abysmally slow llvm clones
Diffstat (limited to 'src/ci')
| -rwxr-xr-x | src/ci/init_repo.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ci/init_repo.sh b/src/ci/init_repo.sh index 1db2135eb6d..0a17bd3b571 100755 --- a/src/ci/init_repo.sh +++ b/src/ci/init_repo.sh @@ -64,6 +64,7 @@ if [ ! -d "$cache_src_dir/.git" ]; then git clone https://github.com/rust-lang/rust.git $cache_src_dir" fi retry sh -c "cd $cache_src_dir && git reset --hard && git pull" +(cd $cache_src_dir && git rm src/llvm) retry sh -c "cd $cache_src_dir && \ git submodule deinit -f . && git submodule sync && git submodule update --init" @@ -76,6 +77,15 @@ touch "$cache_valid_file" # http://stackoverflow.com/questions/12641469/list-submodules-in-a-git-repository modules="$(git config --file .gitmodules --get-regexp '\.path$' | cut -d' ' -f2)" for module in $modules; do + if [ "$module" = src/llvm ]; then + commit="$(git ls-tree HEAD src/llvm | awk '{print $3}')" + git rm src/llvm + curl -sSL -O "https://github.com/rust-lang/llvm/archive/$commit.tar.gz" + tar -C src/ -xf "$commit.tar.gz" + rm "$commit.tar.gz" + mv "src/llvm-$commit" src/llvm + continue + fi if [ ! -d "$cache_src_dir/$module" ]; then echo "WARNING: $module not found in pristine repo" retry sh -c "git submodule deinit -f $module && git submodule update --init $module" |
