Update CI scripts

- Build `post-*` branches
- Use `cargo install-latest` and `cargo cache`
- Always notify on failure
- Remove some comments
This commit is contained in:
Philipp Oppermann
2019-01-28 11:57:30 +01:00
parent cc36ae536b
commit e5298ea8e6
2 changed files with 15 additions and 23 deletions

View File

@@ -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

View File

@@ -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