Skip to content

Commit

Permalink
Merge pull request #1391 from dtolnay/ci
Browse files Browse the repository at this point in the history
Move CI commands into travis.yml and appveyor.yml
  • Loading branch information
dtolnay committed Sep 16, 2018
2 parents 4823089 + 5023e2a commit 3f0f739
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 137 deletions.
100 changes: 82 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,89 @@
sudo: false
language: rust
cache: cargo

# run builds for all the trains (and more)
rust:
- stable
- beta
- nightly
- 1.13.0
- 1.15.0
- 1.20.0
- 1.21.0
- 1.25.0
- 1.26.0

matrix:
include:
- rust: stable
script:
- cd "${TRAVIS_BUILD_DIR}/serde"
- cargo build --features rc
- cargo build --no-default-features
- cd "${TRAVIS_BUILD_DIR}/serde_test"
- cargo build
- cargo test

- rust: beta
script:
- cd "${TRAVIS_BUILD_DIR}/serde"
- cargo build --features rc
- cd "${TRAVIS_BUILD_DIR}/test_suite"
- cargo test

- rust: nightly
script:
- cd "${TRAVIS_BUILD_DIR}/serde"
- cargo build
- cargo build --no-default-features
- cargo build --no-default-features --features alloc
- cargo build --no-default-features --features rc,alloc
- cargo test --features rc,unstable
- cd "${TRAVIS_BUILD_DIR}/test_suite/deps"
- cargo build
- cd "${TRAVIS_BUILD_DIR}/test_suite"
- cargo test --features unstable
- cd "${TRAVIS_BUILD_DIR}/test_suite/no_std"
- cargo build

- rust: 1.13.0
script:
- cd "${TRAVIS_BUILD_DIR}/serde"
- cargo build --features rc
- cargo build --no-default-features
- cd "${TRAVIS_BUILD_DIR}/serde_test"
- cargo build

- rust: 1.15.0
script:
- cd "${TRAVIS_BUILD_DIR}/serde_derive"
- cargo build

- rust: 1.20.0
- rust: 1.21.0
- rust: 1.25.0
- rust: 1.26.0

- rust: nightly
env: CLIPPY=true
env: CLIPPY
script:
- rustup component add clippy-preview || travis_terminate 0
- cargo clippy -- -Dclippy
- cd "${TRAVIS_BUILD_DIR}/serde"
- cargo clippy --features rc,unstable -- -Dclippy
- cd "${TRAVIS_BUILD_DIR}/serde_derive"
- cargo clippy -- -Dclippy
- cd "${TRAVIS_BUILD_DIR}/serde_test"
- cargo clippy -- -Dclippy
- cd "${TRAVIS_BUILD_DIR}/test_suite"
- cargo clippy --features unstable -- -Dclippy
- cd "${TRAVIS_BUILD_DIR}/test_suite/no_std"
- cargo clippy -- -Dclippy

- rust: nightly
env: EMSCRIPTEN=true
script: nvm install 9 && ./travis.sh
env: EMSCRIPTEN
script:
- CARGO_WEB_RELEASE=$(curl -L -s -H Accept:application/json https://github.com/koute/cargo-web/releases/latest)
- CARGO_WEB_VERSION=$(echo "${CARGO_WEB_RELEASE}" | jq -r .tag_name)
- CARGO_WEB_URL="https://github.com/koute/cargo-web/releases/download/${CARGO_WEB_VERSION}/cargo-web-x86_64-unknown-linux-gnu.gz"

- nvm install 9
- mkdir -p ~/.cargo/bin
- curl -L "${CARGO_WEB_URL}" | gzip -d > ~/.cargo/bin/cargo-web
- chmod +x ~/.cargo/bin/cargo-web

- cd "${TRAVIS_BUILD_DIR}/test_suite"
- cargo web test --target=asmjs-unknown-emscripten --nodejs
- cargo web test --target=wasm32-unknown-emscripten --nodejs

script: ./travis.sh
script:
- cd "${TRAVIS_BUILD_DIR}/serde"
- cargo build --no-default-features
- cargo build
28 changes: 26 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,29 @@ install:

build: false

test_script:
- sh -c 'PATH=`rustc --print sysroot`/bin:$PATH ./travis.sh'
for:
- matrix:
only:
- APPVEYOR_RUST_CHANNEL: stable
test_script:
- cd %APPVEYOR_BUILD_FOLDER%\serde
- cargo build --features rc
- cargo build --no-default-features
- cd %APPVEYOR_BUILD_FOLDER%\serde_test
- cargo build
- cargo test

- matrix:
only:
- APPVEYOR_RUST_CHANNEL: nightly
test_script:
- cd %APPVEYOR_BUILD_FOLDER%\serde
- cargo build
- cargo build --no-default-features
- cargo build --no-default-features --features alloc
- cargo build --no-default-features --features rc,alloc
- cargo test --features rc,unstable
- cd %APPVEYOR_BUILD_FOLDER%\test_suite\deps
- cargo build
- cd %APPVEYOR_BUILD_FOLDER%\test_suite
- cargo test --features unstable
117 changes: 0 additions & 117 deletions travis.sh

This file was deleted.

0 comments on commit 3f0f739

Please sign in to comment.