summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2019-10-15 11:35:23 +0200
committerLinus Färnstrand <linus@mullvad.net>2019-10-15 14:12:54 +0200
commit87a954977bd354a4f6e365644b3bcb85cc3c6f74 (patch)
treee28d59fd75ddb32cc44e130ccde559a2e92503f0
parentceeb7b97b00b57929c21cce7a161382d51c66651 (diff)
downloadmullvadvpn-87a954977bd354a4f6e365644b3bcb85cc3c6f74.tar.xz
mullvadvpn-87a954977bd354a4f6e365644b3bcb85cc3c6f74.zip
Add --profile minimal to our rustup installs
-rw-r--r--.travis.yml2
-rw-r--r--Dockerfile2
-rw-r--r--appveyor.yml2
-rwxr-xr-xci/ci-rust-script.sh18
4 files changed, 12 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index 27cab903cc..cafe1b5480 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,7 +33,7 @@ matrix:
- android-28
- build-tools-28.0.3
install:
- - curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
+ - curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable --profile minimal -y
- source $HOME/.cargo/env
- rustup target add aarch64-linux-android
- curl -sf -L -o /tmp/ndk.zip https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip
diff --git a/Dockerfile b/Dockerfile
index 215fa06231..d4e9a14022 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,7 +14,5 @@ RUN apt install build-essential \
curl \
p7zip-full \
git -y
-RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain none
-ENV PATH="/root/.cargo/bin/:${PATH}"
RUN mkdir /mvd
CMD tail -f /dev/null
diff --git a/appveyor.yml b/appveyor.yml
index 8f0698ec15..e1af1d1e20 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -36,7 +36,7 @@ install:
}
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
- - rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%
+ - rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION% --profile minimal
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
# TMP fix for https://github.com/rust-lang-nursery/rustup.rs/issues/893:
- set PATH=%PATH%;C:\Users\appveyor\.rustup\toolchains\%RUST_VERSION%-%TARGET%\bin
diff --git a/ci/ci-rust-script.sh b/ci/ci-rust-script.sh
index 797a9e1008..79e34731af 100755
--- a/ci/ci-rust-script.sh
+++ b/ci/ci-rust-script.sh
@@ -7,8 +7,14 @@ RUSTFLAGS="--deny unused_imports --deny dead_code"
source env.sh ""
-rustup update $RUST_TOOLCHAIN_CHANNEL
-rustup default $RUST_TOOLCHAIN_CHANNEL
+RUST_EXTRA_COMPONENTS=""
+if [ "${RUST_TOOLCHAIN_CHANNEL}" = "nightly" ]; then
+ RUST_EXTRA_COMPONENTS+=" -c rustfmt-preview"
+fi
+
+curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
+ sh -s -- -y --default-toolchain $RUST_TOOLCHAIN_CHANNEL --profile minimal $RUST_EXTRA_COMPONENTS
+source $HOME/.cargo/env
case "$(uname -s)" in
MINGW*|MSYS_NT*)
@@ -24,12 +30,8 @@ if [ "${RUST_TOOLCHAIN_CHANNEL}" != "nightly" ]; then
fi
if [ "${RUST_TOOLCHAIN_CHANNEL}" = "nightly" ]; then
- if rustup component add rustfmt-preview; then
- rustfmt --version;
- cargo fmt -- --check --unstable-features;
- else
- echo "There seems to not be any rustfmt for the current nighly. Skipping formatting check!"
- fi
+ rustfmt --version;
+ cargo fmt -- --check --unstable-features;
fi
if ! git diff-index --quiet HEAD; then