From e5298ea8e6fb9f737dfcab6457329617cdc2c9e2 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 28 Jan 2019 11:57:30 +0100 Subject: [PATCH] Update CI scripts - Build `post-*` branches - Use `cargo install-latest` and `cargo cache` - Always notify on failure - Remove some comments --- .appveyor.yml | 11 +++-------- .travis.yml | 27 ++++++++++++--------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 2b3d6e4a..dd760320 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -3,6 +3,7 @@ branches: - staging - trying - master + - /post-.*/ # Appveyor configuration template for Rust using rustup for Rust installation # https://github.com/starkat99/appveyor-rust @@ -39,7 +40,6 @@ environment: cache: - '%USERPROFILE%\.cargo\bin' - '%USERPROFILE%\.cargo\.crates.toml' - - target ## Install Script ## @@ -81,14 +81,9 @@ before_test: - sed -rie "s/#define std([[:alpha:]]+)[[:space:]]+\(__acrt_iob_func\(([[:digit:]]+)\)\)/#define std\1 (\&__iob_func()[\2])/" "C:\msys64\mingw32\i686-w64-mingw32\include\stdio.h" - rustup component add rust-src - set RUST_BACKTRACE=1 - - if not exist %USERPROFILE%\.cargo\bin\cargo-update-installed.exe cargo install cargo-update-installed - - if not exist %USERPROFILE%\.cargo\bin\cargo-xbuild.exe cargo install cargo-xbuild - - if not exist %USERPROFILE%\.cargo\bin\bootimage.exe cargo install bootimage - - cargo update-installed + - if not exist %USERPROFILE%\.cargo\bin\cargo-install-latest.exe cargo install cargo-install-latest + - cargo install-latest cargo-xbuild bootimage -# Uses 'cargo test' to run tests and build. Alternatively, the project may call compiled programs -# directly or perform other testing commands. Rust will automatically be placed in the PATH -# environment variable. test_script: - bootimage build - if %target%==x86_64-pc-windows-gnu cargo test diff --git a/.travis.yml b/.travis.yml index 8fcc74fb..6395333a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,17 @@ language: rust -sudo: false +rust: + - nightly + +os: + - linux + - osx + - windows notifications: email: on_success: never - on_failure: change + on_failure: always branches: only: @@ -15,14 +21,8 @@ branches: - trying # Build pull requests. - master - -rust: - - nightly - -os: - - linux - - osx - - windows + # Build post braches + - /^post-.*$/ cache: directories: @@ -42,11 +42,8 @@ install: before_script: - rustup component add rust-src - - (test -x $HOME/.cargo/bin/cargo-update-installed || cargo install cargo-update-installed) - - (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild) - - (test -x $HOME/.cargo/bin/bootimage || cargo install bootimage) - - (test -x $HOME/.cargo/bin/cargo-cache || cargo install cargo-cache) - - cargo update-installed + - (test -x $HOME/.cargo/bin/cargo-install-latest || cargo install cargo-install-latest) + - cargo install-latest cargo-xbuild bootimage cargo-cache script: - bootimage build