From 038d52c5cafa244eb14b85d9cf3e9894fd436621 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 24 Jul 2024 15:17:11 +0200 Subject: [PATCH] ci: add test-quinn job --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a2e81afdfd..d1c2a6bc259 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,7 @@ jobs: - loom-compile - check-readme - test-hyper + - test-quinn - x86_64-fortanix-unknown-sgx - check-redox - wasm32-unknown-unknown @@ -862,6 +863,58 @@ jobs: run: cargo test --features full working-directory: hyper + test-quinn: + name: Test Quinn + needs: basics + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - windows-latest + - ubuntu-latest + - macos-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust ${{ env.rust_stable }} + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.rust_stable }} + + - name: Clone Quinn + run: git clone https://github.com/quinn-rs/quinn.git + + - name: Checkout the latest release because HEAD maybe contains breakage. + run: | + set -x + tag=$(git describe --abbrev=0 --tags) + git checkout "${tag}" + working-directory: quinn + + - name: Patch Quinn to use tokio from this repository + run: | + set -x + echo '[workspace]' >>Cargo.toml + echo '[patch.crates-io]' >>Cargo.toml + echo 'tokio = { path = "../tokio" }' >>Cargo.toml + echo 'tokio-util = { path = "../tokio-util" }' >>Cargo.toml + echo 'tokio-stream = { path = "../tokio-stream" }' >>Cargo.toml + echo 'tokio-test = { path = "../tokio-test" }' >>Cargo.toml + git diff + working-directory: quinn + + - uses: Swatinem/rust-cache@v2 + with: + # The cargo workspaces and target directory configuration. + # These entries are separated by newlines and have the form + # `$workspace -> $target`. The `$target` part is treated as a directory + # relative to the `$workspace` and defaults to "target" if not explicitly given. + # default: ". -> target" + workspaces: "./quinn" + + - name: Test Quinn + working-directory: quinn + run: cargo test --all-features + x86_64-fortanix-unknown-sgx: name: build tokio for x86_64-fortanix-unknown-sgx needs: basics