Skip to content

Commit

Permalink
ci: add test-quinn job
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Jul 24, 2024
1 parent 1386d86 commit 038d52c
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
- loom-compile
- check-readme
- test-hyper
- test-quinn
- x86_64-fortanix-unknown-sgx
- check-redox
- wasm32-unknown-unknown
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 038d52c

Please sign in to comment.