forked from programatik29/axum-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'programatik29:master' into master
- Loading branch information
Showing
13 changed files
with
509 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: cargo | ||
directory: / | ||
schedule: | ||
interval: daily | ||
|
||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily | ||
groups: | ||
github-actions: | ||
patterns: | ||
- "*" | ||
ignore: | ||
- dependency-name: 'dtolnay/rust-toolchain' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
tags: ["*"] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
audit: | ||
name: Audit | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install `cargo-audit` | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-audit | ||
- name: Run Audit | ||
run: cargo audit -D warnings | ||
|
||
rustfmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- name: Rust Rustfmt | ||
run: cargo fmt --check | ||
|
||
clippy: | ||
name: Clippy ${{ matrix.features.name }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
features: | ||
- { features: "" } | ||
- { name: "(`tls-rustls`)", features: --features tls-rustls } | ||
- { name: "(`tls-rustls-no-provider`)", features: --features tls-rustls-no-provider } | ||
- { name: "(`tls-openssl`)", features: --features tls-openssl, openssl: true } | ||
- { name: "(`--all-features`)", features: --all-features, openssl: true } | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install OpenSSL | ||
if: matrix.features.openssl == true | ||
run: sudo apt-get install pkg-config libssl-dev | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Run Clippy | ||
run: cargo clippy --all-targets ${{ matrix.features.features }} -- -D warnings | ||
|
||
rustdoc: | ||
name: Rustdoc ${{ matrix.rust.name }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rust: | ||
- { version: stable } | ||
- { name: "with `cfg(docsrs)`", version: nightly, flags: --cfg=docsrs } | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install OpenSSL | ||
run: sudo apt-get install pkg-config libssl-dev | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust.version }} | ||
- name: Run Rustdoc | ||
env: | ||
RUSTDOCFLAGS: -D warnings ${{ matrix.rust.flags }} | ||
run: cargo doc --no-deps --document-private-items --lib --examples --all-features | ||
|
||
build: | ||
name: Build ${{ matrix.rust.name }} ${{ matrix.features.name }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rust: | ||
- { version: stable, msrv: false } | ||
- { name: "MSRV", version: 1.66, msrv: true } | ||
features: | ||
- { features: "" } | ||
- { name: "(`tls-rustls`)", features: --features tls-rustls } | ||
- { name: "(`tls-rustls-no-provider`)", features: --features tls-rustls-no-provider } | ||
- { name: "(`tls-openssl`)", features: --features tls-openssl, openssl: true } | ||
- { name: "(`--all-features`)", features: --all-features, openssl: true } | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install OpenSSL | ||
if: matrix.features.openssl == true | ||
run: sudo apt-get install pkg-config libssl-dev | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust.version }} | ||
- name: Fix MSRV dependencies | ||
if: matrix.rust.msrv == true | ||
run: | | ||
cargo update -p tokio --precise 1.38.1 | ||
cargo update -p tokio-util --precise 0.7.11 | ||
- name: Run Cargo Build | ||
run: cargo build ${{ matrix.features.features }} | ||
|
||
test: | ||
name: Test ${{ matrix.features.name }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
features: | ||
- { features: "" } | ||
- { name: "(`tls-rustls`)", features: --features tls-rustls } | ||
- { name: "(`rustls/ring`)", features: "--features tls-rustls-no-provider,rustls/ring" } | ||
- { name: "(`tls-openssl`)", features: --features tls-openssl, openssl: true } | ||
- { name: "(`--all-features`)", features: --all-features, openssl: true } | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install OpenSSL | ||
if: matrix.features.openssl == true | ||
run: sudo apt-get install pkg-config libssl-dev | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Run Cargo Tests | ||
run: cargo test --all-targets ${{ matrix.features.features }} --no-fail-fast | ||
- name: Rust Documentation Tests | ||
run: cargo test --doc ${{ matrix.features.features }} --no-fail-fast | ||
|
||
minimal-versions: | ||
name: Minimal Versions ${{ matrix.features.name }} | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: minimal-versions | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
features: | ||
- { features: "" } | ||
- { name: "(`tls-rustls`)", features: --features tls-rustls } | ||
- { name: "(`tls-rustls-no-provider`)", features: --features tls-rustls-no-provider } | ||
- { name: "(`tls-openssl`)", features: --features tls-openssl, openssl: true } | ||
- { name: "(`--all-features`)", features: --all-features, openssl: true } | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install OpenSSL | ||
if: matrix.features.openssl == true | ||
run: | | ||
sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu focal-updates main" | ||
sudo apt update | ||
sudo apt-get install --allow-downgrades pkg-config libssl-dev=1.1.1f-1ubuntu2.23 | ||
- name: Install Nightly Rust | ||
uses: dtolnay/rust-toolchain@nightly | ||
- name: Update to Minimal Versions | ||
run: cargo update -Zminimal-versions | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@1.66 | ||
- name: Run Cargo Build | ||
run: cargo build ${{ matrix.features.features }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/target | ||
/Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
edition = "2021" | ||
name = "minimal-versions" | ||
publish = false | ||
version = "0.0.0" | ||
|
||
[features] | ||
tls-rustls = ["axum-server/tls-rustls"] | ||
tls-rustls-no-provider = ["axum-server/tls-rustls-no-provider"] | ||
tls-openssl = ["axum-server/tls-openssl"] | ||
|
||
[dependencies] | ||
axum-server = { path = ".." } | ||
# `tower` v0.5.0 incorrectly only requires `tower-layer` v0.3.0 | ||
tower-layer = "0.3.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//! Testing minimal versions of dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.