no_std
support for the url
crate
#395
Workflow file for this run
This file contains 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: | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
jobs: | |
Test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
rust: [1.56.0, stable, beta, nightly] | |
exclude: | |
- os: macos-latest | |
rust: 1.56.0 | |
- os: windows-latest | |
rust: 1.56.0 | |
- os: macos-latest | |
rust: beta | |
- os: windows-latest | |
rust: beta | |
- os: macos-latest | |
rust: nightly | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
# Add toolchain for no_std tests | |
- run: rustup toolchain install nightly | |
- run: rustup target add aarch64-unknown-none | |
- run: cargo build --all-targets | |
# Run tests | |
- name: Run tests | |
run: cargo test | |
# Run tests enabling the serde feature | |
- name: Run tests with the serde feature | |
run: cargo test --features "url/serde,url/expose_internals" | |
# The #[debugger_visualizer] attribute is currently gated behind an unstable feature flag. | |
# In order to test the visualizers for the url crate, they have to be tested on a nightly build. | |
- name: Run debugger_visualizer tests | |
if: | | |
matrix.os == 'windows-latest' && | |
matrix.rust == 'nightly' | |
run: cargo test --test debugger_visualizer --features "url/serde,url/debugger_visualizer" -- --test-threads=1 | |
- name: Test `no_std` support | |
run: cargo test --no-default-features --features=alloc,no_std_net | |
- name: Build `aarch64-unknown-none` with `no_std` | |
run: cargo +nightly build -Zbuild-std=core,alloc --target aarch64-unknown-none -v --release --no-default-features --features=alloc,unstable | |
WASM: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: wasm32-unknown-unknown | |
- run: cargo build --target wasm32-unknown-unknown | |
Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- run: cargo fmt --all --check | |
- run: cargo clippy --workspace --all-targets -- -D warnings | |
if: always() | |
Audit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: EmbarkStudios/cargo-deny-action@v1 |