From 2824a85bbfd56c41ff84d252f1c72c1f658cbd89 Mon Sep 17 00:00:00 2001 From: tison Date: Sat, 25 May 2024 16:25:55 +0800 Subject: [PATCH 1/2] Config rust-version at Cargo.toml Signed-off-by: tison --- .github/workflows/CI.yml | 37 ++++--------------------------------- Cargo.toml | 1 + 2 files changed, 5 insertions(+), 33 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d80b9fb..9d6de74 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,11 +28,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - - run: cargo fmt --all --check test: @@ -40,26 +38,15 @@ jobs: needs: [style] strategy: matrix: - rust: - - stable - - beta - - nightly - - os: - - ubuntu-latest - - windows-latest - - macOS-latest - + rust: [ stable, beta, nightly ] + os: [ ubuntu-latest, windows-latest, macos-latest ] runs-on: ${{ matrix.os }} - steps: - uses: actions/checkout@v4 - - name: Install Rust (${{ matrix.rust }}) uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo test --all-features msrv: @@ -67,36 +54,25 @@ jobs: needs: [style] strategy: matrix: - rust: - - 1.63 # keep in sync with MSRV.md dev doc - - os: - - ubuntu-latest - - runs-on: ${{ matrix.os }} - + rust: [ 1.63 ] # keep in sync with 'rust-version' in Cargo.toml + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install Rust (${{ matrix.rust }}) uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --features full miri: name: Test with Miri needs: [style] runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly with: components: miri - - name: Test env: # Can't enable tcp feature since Miri does not support the tokio runtime @@ -109,11 +85,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - uses: taiki-e/install-action@cargo-hack - - run: cargo hack --no-dev-deps check --feature-powerset --depth 2 semver: @@ -134,7 +107,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly - - run: cargo rustdoc -- --cfg docsrs -D rustdoc::broken-intra-doc-links diff --git a/Cargo.toml b/Cargo.toml index c5a3c77..9e7758d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ authors = ["Sean McArthur "] keywords = ["http", "hyper", "hyperium"] categories = ["network-programming", "web-programming::http-client", "web-programming::http-server"] edition = "2021" +rust-version = "1.63" [package.metadata.docs.rs] features = ["full"] From a9e9b88928d959148b5ce7ae2661e88b26d0c2fd Mon Sep 17 00:00:00 2001 From: tison Date: Sat, 25 May 2024 18:31:38 +0800 Subject: [PATCH 2/2] use bullet list Signed-off-by: tison --- .github/workflows/CI.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9d6de74..30d9018 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -38,8 +38,14 @@ jobs: needs: [style] strategy: matrix: - rust: [ stable, beta, nightly ] - os: [ ubuntu-latest, windows-latest, macos-latest ] + rust: + - stable + - beta + - nightly + os: + - ubuntu-latest + - windows-latest + - macos-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4