Remove dependence of ci on github token

This commit is contained in:
Manish Goregaokar 2018-09-03 09:12:06 +05:30
parent 1d13c1f998
commit 79d81ac3e7
2 changed files with 9 additions and 9 deletions

View file

@ -51,13 +51,12 @@ matrix:
script: script:
- | - |
if [ -n "$GITHUB_TOKEN" ]; then
rm rust-toolchain rm rust-toolchain
cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed" cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed"
travis_retry rustup-toolchain-install-master -f -n master --github-token $GITHUB_TOKEN RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH
rustup default master rustup default master
export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
fi
- | - |
if [ -z ${INTEGRATION} ]; then if [ -z ${INTEGRATION} ]; then
./ci/base-tests.sh ./ci/base-tests.sh

View file

@ -11,12 +11,13 @@ install:
- curl -sSf -o rustup-init.exe https://win.rustup.rs/ - curl -sSf -o rustup-init.exe https://win.rustup.rs/
- rustup-init.exe -y --default-host %TARGET% --default-toolchain nightly - rustup-init.exe -y --default-host %TARGET% --default-toolchain nightly
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
# https://support.microsoft.com/en-us/help/2524009/error-running-command-shell-scripts-that-include-parentheses - git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}' >rustc-hash.txt
- if defined GITHUB_TOKEN del rust-toolchain - set /p RUSTC_HASH=<rustc-hash.txt
- if defined GITHUB_TOKEN (cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed") - del rust-toolchain
- if defined GITHUB_TOKEN rustup-toolchain-install-master -f -n master --github-token %GITHUB_TOKEN% - cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed"
- if defined GITHUB_TOKEN rustup default master - rustup-toolchain-install-master %RUSTC_HASH% -f -n master
- if defined GITHUB_TOKEN set PATH=%PATH%;C:\Users\appveyor\.rustup\toolchains\master\bin - rustup default master
- set PATH=%PATH%;C:\Users\appveyor\.rustup\toolchains\master\bin
- rustc -V - rustc -V
- cargo -V - cargo -V