Skip to content

Commit

Permalink
hack rand down for rustc 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Feb 8, 2018
1 parent 39b88b4 commit 5a9e112
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ matrix:
include:
- rust: 1.8.0
before_script:
# libc 0.2.34 started using #[deprecated]
# rand 0.3.22 started depending on rand 0.4, which requires rustc 1.15
# manually hacking the lockfile due to the limitations of cargo#2773
- cargo generate-lockfile
- cargo update --package libc --precise 0.2.33
- sed -i -e 's/"rand 0.[34].[0-9]\+/"rand 0.3.20/' Cargo.lock
- sed -i -e '/^name = "rand"/,/^$/s/version = "0.3.[0-9]\+"/version = "0.3.20"/' Cargo.lock
sudo: false
script:
- cargo build --verbose
Expand Down
6 changes: 4 additions & 2 deletions ci/rustup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ export TRAVIS_RUST_VERSION
for TRAVIS_RUST_VERSION in 1.8.0 stable beta nightly; do
run="rustup run $TRAVIS_RUST_VERSION"
if [ "$TRAVIS_RUST_VERSION" = 1.8.0 ]; then
# libc 0.2.34 started using #[deprecated]
# rand 0.3.22 started depending on rand 0.4, which requires rustc 1.15
# manually hacking the lockfile due to the limitations of cargo#2773
$run cargo generate-lockfile
$run cargo update --package libc --precise 0.2.33 || :
$run sed -i -e 's/"rand 0.[34].[0-9]\+/"rand 0.3.20/' Cargo.lock
$run sed -i -e '/^name = "rand"/,/^$/s/version = "0.3.[0-9]\+"/version = "0.3.20"/' Cargo.lock
fi
$run cargo build --verbose
$run $PWD/ci/test_full.sh
Expand Down

0 comments on commit 5a9e112

Please sign in to comment.