Fixed screen feature flag and updated CI script (#302)

This commit is contained in:
Timon 2019-10-31 20:54:14 +01:00 committed by GitHub
parent 4ccc240866
commit 5c36790187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 13 deletions

View File

@ -48,22 +48,22 @@ jobs:
run: cargo build run: cargo build
continue-on-error: ${{ matrix.can-fail }} continue-on-error: ${{ matrix.can-fail }}
- name: Test all features - name: Test all features
run: cargo test --all-features -- --nocapture --test-threads 1 run: cargo test --all-features --no-default-features -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }} continue-on-error: ${{ matrix.can-fail }}
- name: Test cursor Feature - name: Test cursor Feature
run: cargo test --features cursor -- --nocapture --test-threads 1 run: cargo test --features cursor --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }} continue-on-error: ${{ matrix.can-fail }}
- name: Test style Feature - name: Test style Feature
run: cargo test --features style -- --nocapture --test-threads 1 run: cargo test --features style --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }} continue-on-error: ${{ matrix.can-fail }}
- name: Test terminal Feature - name: Test terminal Feature
run: cargo test --features terminal -- --nocapture --test-threads 1 run: cargo test --features terminal --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }} continue-on-error: ${{ matrix.can-fail }}
- name: Test screen Feature - name: Test screen Feature
run: cargo test --features screen -- --nocapture --test-threads 1 run: cargo test --features screen --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }} continue-on-error: ${{ matrix.can-fail }}
- name: Test input Feature - name: Test input Feature
run: cargo test --features input -- --nocapture --test-threads 1 run: cargo test --features input --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }} continue-on-error: ${{ matrix.can-fail }}
- name: Test Packaging - name: Test Packaging
if: matrix.rust == 'stable' if: matrix.rust == 'stable'

View File

@ -33,9 +33,9 @@ script:
- rustc --version - rustc --version
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then cargo fmt --all -- --check; fi - if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then cargo fmt --all -- --check; fi
- cargo build - cargo build
- cargo test --all-features -- --nocapture --test-threads 1 - cargo test --all-features --no-default-features -- --nocapture --test-threads 1
- cargo test --features cursor -- --nocapture --test-threads 1 - cargo test --features cursor --no-default-features --lib -- --nocapture --test-threads 1
- cargo test --features style -- --nocapture --test-threads 1 - cargo test --features style --no-default-features --lib -- --nocapture --test-threads 1
- cargo test --features terminal -- --nocapture --test-threads 1 - cargo test --features terminal --no-default-features --lib -- --nocapture --test-threads 1
- cargo test --features screen -- --nocapture --test-threads 1 - cargo test --features screen --no-default-features --lib -- --nocapture --test-threads 1
- cargo test --features input -- --nocapture --test-threads 1 - cargo test --features input --no-default-features --lib -- --nocapture --test-threads 1

View File

@ -16,7 +16,7 @@ default = ["cursor", "style", "terminal", "screen", "input"]
cursor = ["lazy_static", "input", "winapi/wincon", "winapi/winnt", "winapi/minwindef"] cursor = ["lazy_static", "input", "winapi/wincon", "winapi/winnt", "winapi/minwindef"]
style = ["lazy_static", "winapi/wincon"] style = ["lazy_static", "winapi/wincon"]
terminal = ["cursor"] terminal = ["cursor"]
screen = ["winapi/wincon", "winapi/minwindef"] screen = ["lazy_static", "winapi/wincon", "winapi/minwindef"]
input = ["mio", "lazy_static", "screen", "winapi/winnt", "winapi/winuser"] input = ["mio", "lazy_static", "screen", "winapi/winnt", "winapi/winuser"]
[dependencies] [dependencies]

View File

@ -1,3 +1,4 @@
#[cfg(feature = "style")]
use std::fmt::Display; use std::fmt::Display;
// TODO Should be removed? This adds just another way to achieve the same thing. // TODO Should be removed? This adds just another way to achieve the same thing.