mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-07 00:00:13 +02:00
Update CI config (#650)
This commit is contained in:
+31
-23
@@ -7,6 +7,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
schedule:
|
||||||
|
- cron: '0 2 * * 0'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -Dwarnings
|
RUSTFLAGS: -Dwarnings
|
||||||
@@ -23,11 +25,11 @@ jobs:
|
|||||||
name: rustfmt
|
name: rustfmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: rustup update stable && rustup default stable
|
run: rustup update stable
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all --check
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
# # Apply clippy lints
|
# # Apply clippy lints
|
||||||
@@ -35,7 +37,7 @@ jobs:
|
|||||||
# name: clippy
|
# name: clippy
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
# steps:
|
# steps:
|
||||||
# - uses: actions/checkout@v3
|
# - uses: actions/checkout@v4
|
||||||
# - name: Apply clippy lints
|
# - name: Apply clippy lints
|
||||||
# run: cargo clippy --all-features
|
# run: cargo clippy --all-features
|
||||||
|
|
||||||
@@ -48,11 +50,11 @@ jobs:
|
|||||||
name: minrust
|
name: minrust
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Rust
|
- name: Install cargo-hack
|
||||||
run: rustup update 1.39.0 && rustup default 1.39.0
|
uses: taiki-e/install-action@cargo-hack
|
||||||
- name: Check
|
- name: Check
|
||||||
run: . ci/test-stable.sh check
|
run: cargo hack check --feature-powerset --optional-deps --rust-version
|
||||||
|
|
||||||
# Stable
|
# Stable
|
||||||
stable:
|
stable:
|
||||||
@@ -65,23 +67,27 @@ jobs:
|
|||||||
- windows-latest
|
- windows-latest
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
|
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
|
||||||
run: rustup update stable --no-self-update && rustup default stable
|
run: rustup update stable --no-self-update
|
||||||
|
- name: Install cargo-hack
|
||||||
|
uses: taiki-e/install-action@cargo-hack
|
||||||
- name: Test
|
- name: Test
|
||||||
run: . ci/test-stable.sh test
|
run: ci/test-stable.sh test
|
||||||
|
|
||||||
# Nightly
|
# Nightly
|
||||||
nightly:
|
nightly:
|
||||||
name: nightly
|
name: nightly
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: rustup update $nightly && rustup default $nightly
|
run: rustup update $nightly && rustup default $nightly
|
||||||
|
- name: Install cargo-hack
|
||||||
|
uses: taiki-e/install-action@cargo-hack
|
||||||
- name: Test
|
- name: Test
|
||||||
run: . ci/test-stable.sh test
|
run: ci/test-stable.sh test
|
||||||
|
|
||||||
# Run tests on some extra platforms
|
# Run tests on some extra platforms
|
||||||
cross:
|
cross:
|
||||||
@@ -96,13 +102,14 @@ jobs:
|
|||||||
- wasm32-unknown-unknown
|
- wasm32-unknown-unknown
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: rustup update stable && rustup default stable
|
run: rustup update stable
|
||||||
|
- name: Install cross
|
||||||
|
uses: taiki-e/install-action@cross
|
||||||
|
if: matrix.target != 'wasm32-unknown-unknown'
|
||||||
- name: cross build --target ${{ matrix.target }}
|
- name: cross build --target ${{ matrix.target }}
|
||||||
run: |
|
run: cross build --target ${{ matrix.target }}
|
||||||
cargo install cross
|
|
||||||
cross build --target ${{ matrix.target }}
|
|
||||||
if: matrix.target != 'wasm32-unknown-unknown'
|
if: matrix.target != 'wasm32-unknown-unknown'
|
||||||
# WASM support
|
# WASM support
|
||||||
- name: cargo build --target ${{ matrix.target }}
|
- name: cargo build --target ${{ matrix.target }}
|
||||||
@@ -116,18 +123,19 @@ jobs:
|
|||||||
name: tsan
|
name: tsan
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: rustup update $nightly && rustup default $nightly
|
run: rustup update $nightly && rustup default $nightly
|
||||||
- name: Install rust-src
|
- name: Install rust-src
|
||||||
run: rustup component add rust-src
|
run: rustup component add rust-src
|
||||||
- name: ASAN / TSAN
|
- name: ASAN / TSAN
|
||||||
run: . ci/tsan.sh
|
run: ci/tsan.sh
|
||||||
|
|
||||||
miri:
|
miri:
|
||||||
name: miri
|
name: miri
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Miri
|
- name: Miri
|
||||||
run: ci/miri.sh
|
run: ci/miri.sh
|
||||||
|
|
||||||
@@ -136,7 +144,7 @@ jobs:
|
|||||||
name: loom
|
name: loom
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: rustup update $nightly && rustup default $nightly
|
run: rustup update $nightly && rustup default $nightly
|
||||||
- name: Loom tests
|
- name: Loom tests
|
||||||
@@ -155,7 +163,7 @@ jobs:
|
|||||||
- loom
|
- loom
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: rustup update $nightly && rustup default $nightly
|
run: rustup update $nightly && rustup default $nightly
|
||||||
- name: Build documentation
|
- name: Build documentation
|
||||||
|
|||||||
+2
-1
@@ -5,6 +5,8 @@ name = "bytes"
|
|||||||
# - Update CHANGELOG.md.
|
# - Update CHANGELOG.md.
|
||||||
# - Create "v1.x.y" git tag.
|
# - Create "v1.x.y" git tag.
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
|
edition = "2018"
|
||||||
|
rust-version = "1.39"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
authors = [
|
authors = [
|
||||||
"Carl Lerche <[email protected]>",
|
"Carl Lerche <[email protected]>",
|
||||||
@@ -15,7 +17,6 @@ repository = "https://github.com/tokio-rs/bytes"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = ["buffers", "zero-copy", "io"]
|
keywords = ["buffers", "zero-copy", "io"]
|
||||||
categories = ["network-programming", "data-structures"]
|
categories = ["network-programming", "data-structures"]
|
||||||
edition = "2018"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
|
|||||||
Regular → Executable
-6
@@ -4,10 +4,6 @@ set -ex
|
|||||||
|
|
||||||
cmd="${1:-test}"
|
cmd="${1:-test}"
|
||||||
|
|
||||||
# Install cargo-hack for feature flag test
|
|
||||||
host=$(rustc -Vv | grep host | sed 's/host: //')
|
|
||||||
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-$host.tar.gz | tar xzf - -C ~/.cargo/bin
|
|
||||||
|
|
||||||
# Run with each feature
|
# Run with each feature
|
||||||
# * --each-feature includes both default/no-default features
|
# * --each-feature includes both default/no-default features
|
||||||
# * --optional-deps is needed for serde feature
|
# * --optional-deps is needed for serde feature
|
||||||
@@ -15,8 +11,6 @@ cargo hack "${cmd}" --each-feature --optional-deps
|
|||||||
# Run with all features
|
# Run with all features
|
||||||
cargo "${cmd}" --all-features
|
cargo "${cmd}" --all-features
|
||||||
|
|
||||||
cargo doc --no-deps --all-features
|
|
||||||
|
|
||||||
if [[ "${RUST_VERSION}" == "nightly"* ]]; then
|
if [[ "${RUST_VERSION}" == "nightly"* ]]; then
|
||||||
# Check benchmarks
|
# Check benchmarks
|
||||||
cargo check --benches
|
cargo check --benches
|
||||||
|
|||||||
Regular → Executable
Reference in New Issue
Block a user