Fix 'unexpected cfg condition value: cygwin' #211
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: "Check OS" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest, windows-latest] | |
| env: | |
| CACHE_KEY: 1 | |
| CLIPPY_LINTS: >- | |
| -D clippy::all | |
| -D deprecated-safe | |
| -D future-incompatible | |
| -D keyword-idents | |
| -D let-underscore | |
| -D nonstandard-style | |
| -D refining-impl-trait | |
| -D rust-2018-compatibility | |
| -D rust-2018-idioms | |
| -D rust-2021-compatibility | |
| -D rust-2024-compatibility | |
| -D unused | |
| -D unsafe_code | |
| -D unreachable-pub | |
| -D missing-docs | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install cargo-expand | |
| uses: baptiste0928/cargo-install@v3 | |
| with: | |
| crate: cargo-expand | |
| - name: Install wasmtime-cli | |
| uses: baptiste0928/cargo-install@v3 | |
| with: | |
| crate: wasmtime-cli | |
| - name: Cache Rust files | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/wasm32-unknown-unknown | |
| key: ${{ runner.os }}-cargo-${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-${{ env.CACHE_KEY }}- | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run tests | |
| run: cargo test --verbose | |
| - name: Clippy | |
| run: cargo clippy --examples --bins --all -- ${{ env.CLIPPY_LINTS }} | |
| - name: Clippy (all features) | |
| run: | | |
| rustup toolchain add nightly | |
| rustup component add clippy --toolchain nightly | |
| cargo +nightly clippy --all-features --examples --bins --all -- ${{ env.CLIPPY_LINTS }} | |
| - name: Build with static CRT | |
| if: matrix.os == 'ubuntu-latest' | |
| run: RUSTFLAGS="-C target-feature=+crt-static" cargo run --example example --target x86_64-unknown-linux-gnu --verbose | |
| - name: Run Wasm tests | |
| run: | | |
| rustup target add wasm32-unknown-unknown | |
| cargo build --target wasm32-unknown-unknown -p tests-wasm | |
| wasmtime run target/wasm32-unknown-unknown/debug/tests_wasm.wasm | |
| - name: Run miri test | |
| run: | | |
| rustup component add miri --toolchain nightly | |
| cd tests/edition-2018 | |
| cargo +nightly miri run |