From 7540862f6364aaa49d50349bbac6c75fbeaea5ef Mon Sep 17 00:00:00 2001 From: Lokathor Date: Thu, 6 Aug 2020 16:08:40 -0600 Subject: [PATCH] update CI --- .github/workflows/rust.yml | 45 ++++++++++++++++++++++++-------------- .travis.yml | 37 ------------------------------- Cargo.toml | 14 +++++------- appveyor.yml | 32 --------------------------- 4 files changed, 34 insertions(+), 94 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7ae98f3..86a7c60 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,22 +1,35 @@ name: Rust -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -env: - CARGO_TERM_COLOR: always +on: [push] jobs: - build: - + build_test: runs-on: ubuntu-latest - + strategy: + matrix: + rust: + - 1.34.0 + - stable + - beta + - nightly steps: - - uses: actions/checkout@v2 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + - name: Test The Basics Everywhere + uses: actions-rs/cargo@v1 + with: + command: test + - name: Test Stable and Later Features + if: matrix.rust != '1.34.0' + uses: actions-rs/cargo@v1 + with: + command: test + args: --features=alloc --features=grab_spare_slice --features=rustc_1_40 + - name: Test Nightly Features + if: matrix.rust == 'nightly' + uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e63e2c1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ - -git: - quiet: true - -language: rust - -cache: - cargo - -rust: - - 1.36.0 - - stable - -matrix: - include: - - { os: osx, rust: 1.36.0 } - - { os: linux, rust: 1.36.0 } - - { os: linux, rust: stable } - - { os: linux, rust: nightly } - -script: - - cargo build - - cargo test - - cargo build --features="alloc" - - cargo test --features="alloc" - - | - if [[ $TRAVIS_RUST_VERSION == "nightly" ]] - then - cargo build --features="nightly_slice_partition_dedup" - cargo test --features="nightly_slice_partition_dedup" - cargo build --features="nightly_const_generics" - cargo test --features="nightly_const_generics" - cargo build --features="experimental_write_impl" - cargo test --features="experimental_write_impl" - cargo build --features="experimental_array_set" - cargo test --features="experimental_array_set" - fi diff --git a/Cargo.toml b/Cargo.toml index 2dac02b..e078d4c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,11 @@ alloc = [] # "active" portion of an `ArrayVec` or `SliceVec`. grab_spare_slice = [] +# features that require rustc 1.40 +# use Vec::append if possible in TinyVec::append - 1.37 +# DoubleEndedIterator::nth_back - 1.40 +rustc_1_40 = [] + # allow use of nightly feature `slice_partition_dedup`, # will become useless once that is stabilized: # https://github.com/rust-lang/rust/issues/54279 @@ -41,15 +46,6 @@ experimental_write_impl = [] # small size without allocation. experimental_array_set = [] -# features that require rustc 1.40 -# use Vec::append if possible in TinyVec::append - 1.37 -# DoubleEndedIterator::nth_back - 1.40 -rustc_1_40 = [] - -[badges] -appveyor = { repository = "Lokathor/tinyvec" } -travis-ci = { repository = "Lokathor/tinyvec" } - [package.metadata.docs.rs] all-features = true diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 290c95c..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,32 +0,0 @@ - -os: Visual Studio 2015 - -matrix: - fast_finish: true - -environment: - matrix: - - channel: 1.36.0 - target: i686-pc-windows-msvc - - channel: 1.36.0 - target: x86_64-pc-windows-msvc - - channel: 1.36.0 - target: i686-pc-windows-gnu - - channel: 1.36.0 - target: x86_64-pc-windows-gnu - -install: - # Setup Rust - - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - - rustup-init -y --default-toolchain %channel% --default-host %target% - - set PATH=%PATH%;%USERPROFILE%\.cargo\bin - - rustc -vV - - cargo -vV - -build: false - -test_script: - - cargo build - - cargo test - - cargo build --features="alloc" - - cargo test --features="alloc"