From 57c6f3d2d6152a38888515e755423856b727fe20 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 13 Jun 2022 16:02:11 -0700 Subject: [PATCH] chore(lib): initialize repo skeleton --- .github/workflows/CI.yml | 169 +++++++++++++++++++++++++++++++++++++++ Cargo.toml | 17 ++++ README.md | 3 + src/lib.rs | 1 + 4 files changed, 190 insertions(+) create mode 100644 .github/workflows/CI.yml create mode 100644 Cargo.toml create mode 100644 README.md create mode 100644 src/lib.rs diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 00000000..0fd622c1 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,169 @@ +name: CI +on: + pull_request: + push: + branches: + - master + +env: + RUST_BACKTRACE: 1 + +jobs: + ci-pass: + name: CI is green + runs-on: ubuntu-latest + needs: + - style + - test + - msrv + - miri + - features + - doc + steps: + - run: exit 0 + + style: + name: Check Style + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt + + - name: cargo fmt --check + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + test: + name: Test ${{ matrix.rust }} on ${{ matrix.os }} + needs: [style] + strategy: + matrix: + rust: + - stable + - beta + - nightly + + os: + - ubuntu-latest + - windows-latest + - macOS-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Install Rust (${{ matrix.rust }}) + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + + - name: Test + uses: actions-rs/cargo@v1 + with: + command: test + + msrv: + name: Check MSRV (${{ matrix.rust }}) + needs: [style] + strategy: + matrix: + rust: + - 1.49 # keep in sync with MSRV.md dev doc + + os: + - ubuntu-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Install Rust (${{ matrix.rust }}) + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + + - name: Check + uses: actions-rs/cargo@v1 + with: + command: check + + miri: + name: Test with Miri + needs: [style] + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + components: miri + override: true + + - name: Test + # Can't enable tcp feature since Miri does not support the tokio runtime + run: MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test + + features: + name: features + needs: [style] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + + - name: Install cargo-hack + run: cargo install cargo-hack + + - name: check --feature-powerset + run: cargo hack check --feature-powerset --depth 2 -Z avoid-dev-deps + + doc: + name: Build docs + needs: [style, test] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + + - name: cargo doc + uses: actions-rs/cargo@v1 + with: + command: rustdoc + args: -- --cfg docsrs -D broken-intra-doc-links diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..570b39a5 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "hyper-util" +version = "0.0.0" +description = "hyper utilities" +readme = "README.md" +homepage = "https://hyper.rs" +documentation = "https://docs.rs/hyper-util" +repository = "https://github.com/hyperium/hyper-util" +license = "MIT" +authors = ["Sean McArthur "] +keywords = ["http", "hyper", "hyperium"] +categories = ["network-programming", "web-programming::http-client", "web-programming::http-server"] +edition = "2018" + +publish = false # no accidents while in dev + +[dependencies] diff --git a/README.md b/README.md new file mode 100644 index 00000000..6f2d14ab --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# hyper-util + +A collection of utilities to be do common things with hyper. diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1 @@ +