Skip to content

Commit

Permalink
Combine blocking and tokio into a matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenperera committed Oct 13, 2024
1 parent 3f88bf4 commit adc2d40
Showing 1 changed file with 14 additions and 101 deletions.
115 changes: 14 additions & 101 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,25 @@ env:
CARGO_TERM_COLOR: always

jobs:
build-test-blocking:
name: Build & Test Blocking
build-test:
name: Build & Test ${{ matrix.runtime }}
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- version: stable # STABLE
- version: 1.63.0 # MSRV
runtime:
- blocking
- tokio
- async-std
features:
- default
- async
- async-https
- async-https-native
- async-https-rustls
- async-https-rustls-manual-roots
- blocking
- blocking-https
- blocking-https-rustls
Expand All @@ -29,7 +38,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Generate cache key
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
run: echo "${{ matrix.rust.version }} ${{ matrix.runtime }} ${{ matrix.features }}" | tee .cache_key
- name: Rust Cache
uses: actions/cache@v3
with:
Expand All @@ -55,108 +64,12 @@ jobs:
cargo update -p url --precise "2.5.0"
cargo update -p tokio --precise "1.38.1"
cargo update -p tokio-util --precise "0.7.11"
- name: Build
run: cargo build --features ${{ matrix.features }} --no-default-features
- name: Test
run: cargo test --features ${{ matrix.features }} --no-default-features -- --test-threads=1
build-test-tokio:
name: Build & Test Tokio
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- version: stable # STABLE
- version: 1.63.0 # MSRV
features:
- async
- async-https
- async-https-native
- async-https-rustls
- async-https-rustls-manual-roots
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate cache key
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
- name: Rust Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust.version }}
- name: Set profile
run: rustup set profile minimal
- name: Update toolchain
run: rustup update
- name: Pin dependencies for MSRV
if: matrix.rust.version == '1.63.0'
run: |
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
cargo update -p time --precise "0.3.20"
cargo update -p home --precise 0.5.5
cargo update -p url --precise "2.5.0"
cargo update -p tokio --precise "1.38.1"
cargo update -p tokio-util --precise "0.7.11"
- name: Build
run: cargo build --features ${{ matrix.features }} tokio --no-default-features
- name: Test
run: cargo test --features ${{ matrix.features }} tokio --no-default-features -- --test-threads=1
run: cargo build --features ${{ matrix.features }},${{ matrix.runtime != 'blocking' && matrix.runtime || '' }} --no-default-features

build-test-async-std:
name: Build & Test Async-std
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- version: stable # STABLE
- version: 1.63.0 # MSRV
features:
- async
- async-https
- async-https-native
- async-https-rustls
- async-https-rustls-manual-roots
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate cache key
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
- name: Rust Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust.version }}
- name: Set profile
run: rustup set profile minimal
- name: Update toolchain
run: rustup update
- name: Pin dependencies for MSRV
if: matrix.rust.version == '1.63.0'
run: |
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
cargo update -p time --precise "0.3.20"
cargo update -p home --precise 0.5.5
cargo update -p url --precise "2.5.0"
cargo update -p tokio --precise "1.38.1"
cargo update -p tokio-util --precise "0.7.11"
- name: Build
run: cargo build --features ${{ matrix.features }} async-std --no-default-features
- name: Test
run: cargo test --features ${{ matrix.features }} async-std --no-default-features -- --test-threads=1
run: cargo test --features ${{ matrix.features }},${{ matrix.runtime != 'blocking' && matrix.runtime || '' }} --no-default-features -- --test-threads=1

fmt:
name: Rust Formatting
Expand Down

0 comments on commit adc2d40

Please sign in to comment.