Skip to content

Commit 156f32e

Browse files
authored
Merge pull request #2052 from lzutao/leverage-profile
Use minimal profile to speed up Rust installation
2 parents 6dbf494 + d7dd1f7 commit 156f32e

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

.travis.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@ matrix:
7777
- name: rustfmt/clippy/rustup-init.sh/shellcheck
7878
language: minimal
7979
install:
80-
- |
81-
sh ./rustup-init.sh --default-toolchain=beta -y;
82-
. "$HOME"/.cargo/env;
83-
rustup component add rustfmt clippy;
80+
- sh ./rustup-init.sh --default-toolchain=beta --profile=minimal -y -c rustfmt -c clippy
81+
- export PATH="$HOME/.cargo/bin:$PATH"
8482
script:
8583
- |
8684
docker run \
@@ -106,13 +104,8 @@ matrix:
106104
if: branch == disabled-for-now
107105

108106
install:
109-
- sh rustup-init.sh --default-toolchain=stable -y
110-
- |
111-
if [ -r "$HOME/.cargo/env" ]; then
112-
. "$HOME"/.cargo/env;
113-
else
114-
export PATH="$HOME/.cargo/bin:$PATH";
115-
fi
107+
- sh ./rustup-init.sh --default-toolchain=stable --profile=minimal -y
108+
- export PATH="$HOME/.cargo/bin:$PATH"
116109
- if [ -z "$NO_ADD" ]; then rustup target add "$TARGET"; fi
117110

118111
script:

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ install:
6060
6161
# Install rust, x86_64-pc-windows-msvc host
6262
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
63-
- rustup-init.exe -y --default-host=x86_64-pc-windows-msvc
63+
- rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
6464
- set PATH=%PATH%;%USERPROFILE%\.cargo\bin
6565
- del rustup-init.exe
6666

0 commit comments

Comments
 (0)