diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index 766eaf6..da7da52 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -2,16 +2,15 @@ name: Rust on: push: - branches: [ "master" ] + branches: ["master"] pull_request: - branches: [ "master" ] + branches: ["master"] env: CARGO_TERM_COLOR: always jobs: build-test: - runs-on: ubuntu-latest strategy: matrix: @@ -27,53 +26,95 @@ jobs: - async-https-native - async-https-rustls - async-https-rustls-manual-roots + steps: + - uses: actions/checkout@v3 + + - name: Generate cache key + run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key + + - name: 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: Set default toolchain + run: rustup default ${{ matrix.rust.version }} + + - name: Set profile + run: rustup set profile minimal + + - name: Add clippy + if: ${{ matrix.rust.clippy }} + run: rustup component add clippy + + - name: Update toolchain + run: rustup update + + - name: pin dependencies + if: matrix.rust.version == '1.63.0' + run: | + cargo update -p home --precise 0.5.5 + + - name: Build + run: cargo build --features ${{ matrix.features }} --no-default-features + + - name: Clippy + if: ${{ matrix.rust.clippy }} + run: cargo clippy --all-targets --features ${{ matrix.features }} --no-default-features -- -D warnings + + - name: Test + run: cargo test --features ${{ matrix.features }} --no-default-features + + build-arti-hyper-feature-test: + # It has it's own job to running tests, because arti-client does not support the MSRV. + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - version: stable # STABLE + clippy: true + features: - async-arti-hyper - async-arti-hyper-native - async-arti-hyper-rustls steps: - - uses: actions/checkout@v3 - - name: Generate cache key - run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key - - name: 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: Set default toolchain - run: rustup default ${{ matrix.rust.version }} - - name: Set profile - run: rustup set profile minimal - - name: Add clippy - if: ${{ matrix.rust.clippy }} - run: rustup component add clippy - - name: Update toolchain - run: rustup update - - name: pin dependencies - if: matrix.rust.version == '1.63.0' - run: | - cargo update -p home --precise 0.5.5 - cargo update -p tor-dirclient --precise 0.6.3 - cargo update -p tor-config --precise 0.8.0 - cargo update -p tor-netdoc --precise 0.6.3 - cargo update -p tor-dirmgr --precise 0.9.3 - cargo update -p regex --precise 1.9.6 - cargo update -p zstd-sys --precise 2.0.8+zstd.1.5.5 - cargo update -p time:0.3.31 --precise 0.3.20 - cargo update -p tor-error --precise 0.4.1 - cargo update -p toml:0.7.8 --precise 0.7.3 - cargo update -p toml_edit --precise 0.19.8 - cargo update -p winnow --precise 0.4.1 - cargo update -p serde_spanned --precise 0.6.1 - cargo update -p backtrace --precise 0.3.68 - cargo update -p toml_datetime --precise 0.6.1 - cargo update -p tinystr --precise 0.7.1 - - name: Build - run: cargo build --features ${{ matrix.features }} --no-default-features - - name: Clippy - if: ${{ matrix.rust.clippy }} - run: cargo clippy --all-targets --features ${{ matrix.features }} --no-default-features -- -D warnings - - name: Test - run: cargo test --features ${{ matrix.features }} --no-default-features -- --include-ignored + - uses: actions/checkout@v3 + + - name: Generate cache key + run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key + + - name: 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: Set default toolchain + run: rustup default ${{ matrix.rust.version }} + + - name: Set profile + run: rustup set profile minimal + + - name: Add clippy + if: ${{ matrix.rust.clippy }} + run: rustup component add clippy + + - name: Update toolchain + run: rustup update + + - name: Build + run: cargo build --features ${{ matrix.features }} --no-default-features + + - name: Clippy + if: ${{ matrix.rust.clippy }} + run: cargo clippy --all-targets --features ${{ matrix.features }} --no-default-features -- -D warnings + + - name: Test + run: cargo test --features ${{ matrix.features }} --no-default-features -- --include-ignored diff --git a/Cargo.toml b/Cargo.toml index 5f0a1e4..b4df94d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,9 +26,9 @@ log = "^0.4" ureq = { version = "2.5.0", optional = true, features = ["json"]} reqwest = { version = "0.11", optional = true, default-features = false, features = ["json"] } hyper = { version = "0.14", optional = true, features = ["http1", "client", "runtime"], default-features = false } -arti-hyper = { version = "0.8.3", optional = true, features = ["default"] } -arti-client = { version = "0.8.3", optional = true } -tor-rtcompat = { version = "0.8.2", optional = true, features = ["tokio"]} +arti-hyper = { version = "0.13.0", optional = true, features = ["default"] } +arti-client = { version = "0.13.0", optional = true } +tor-rtcompat = { version = "0.9.7", optional = true, features = ["tokio"]} tls-api = { version = "0.9.0", optional = true } tls-api-native-tls = { version = "0.9.0", optional = true } ahash = { version = "=0.8.6", optional = true } # ahash 0.8.7 version don't work with our MSRV on aarch64, check: https://github.com/tkaitchuck/aHash/issues/195