From 9157f6e32dab2c7e33a9386d7c3c80b663d327f5 Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Tue, 21 Aug 2018 11:18:20 -0500 Subject: [PATCH] Improve CI - Try to get OSX releases working - Use LTO for appveyor releases - Remove unused install.sh --- .travis.yml | 19 +++++++++++-------- appveyor.yml | 6 +++--- ci/install.sh | 47 ----------------------------------------------- 3 files changed, 14 insertions(+), 58 deletions(-) delete mode 100644 ci/install.sh diff --git a/.travis.yml b/.travis.yml index 14e3cbe7..2530b300 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,14 @@ language: rust +rust: + - stable + - beta + - nightly + +os: + - linux + - osx + cache: timeout: 360 cargo: true @@ -10,16 +19,10 @@ before_cache: env: global: - CRATE_NAME=mdbook - - TARGET=x86_64-unknown-linux-gnu - -install: - - sh ci/install.sh - - export PATH=$PATH:$HOME/.cargo/bin script: - - cargo build --all --no-default-features - - cargo build --verbose - - cargo test --verbose + - cargo test --all + - cargo test --all --no-default-features before_deploy: - sh ci/before_deploy.sh diff --git a/appveyor.yml b/appveyor.yml index 03e658ce..d012f44f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,12 +36,12 @@ build: false # Equivalent to Travis' `script` phase test_script: - - cargo build --verbose - - cargo test --verbose + - cargo test --all + - cargo test --all --no-default-features before_deploy: # Generate artifacts for release - - cargo build --release + - cargo rustc --bin mdbook --release -- -C lto - mkdir staging - copy target\release\mdbook.exe staging - cd staging diff --git a/ci/install.sh b/ci/install.sh deleted file mode 100644 index a1059d62..00000000 --- a/ci/install.sh +++ /dev/null @@ -1,47 +0,0 @@ -set -ex - -main() { - local target= - if [ $TRAVIS_OS_NAME = linux ]; then - target=x86_64-unknown-linux-musl - sort=sort - else - target=x86_64-apple-darwin - sort=gsort # for `sort --sort-version`, from brew's coreutils. - fi - - # Builds for iOS are done on OSX, but require the specific target to be - # installed. - case $TARGET in - aarch64-apple-ios) - rustup target install aarch64-apple-ios - ;; - armv7-apple-ios) - rustup target install armv7-apple-ios - ;; - armv7s-apple-ios) - rustup target install armv7s-apple-ios - ;; - i386-apple-ios) - rustup target install i386-apple-ios - ;; - x86_64-apple-ios) - rustup target install x86_64-apple-ios - ;; - esac - - # This fetches latest stable release - local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \ - | cut -d/ -f3 \ - | grep -E '^v[0.1.0-9.]+$' \ - | $sort --version-sort \ - | tail -n1) - curl -LSfs https://japaric.github.io/trust/install.sh | \ - sh -s -- \ - --force \ - --git japaric/cross \ - --tag $tag \ - --target $target -} - -main \ No newline at end of file