mirror of
https://github.com/actix/actix-web.git
synced 2024-06-12 10:19:36 +00:00
ci: external types checking
This commit is contained in:
parent
3acdda48e0
commit
a140793706
|
@ -17,7 +17,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
- name: Install Rust (nightly)
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
|
@ -32,7 +33,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
- name: Install Rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||||
with:
|
with:
|
||||||
components: clippy
|
components: clippy
|
||||||
|
|
||||||
|
@ -47,7 +49,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
- name: Install Rust (nightly)
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
components: rust-docs
|
components: rust-docs
|
||||||
|
@ -57,6 +60,29 @@ jobs:
|
||||||
RUSTDOCFLAGS: -D warnings
|
RUSTDOCFLAGS: -D warnings
|
||||||
run: cargo +nightly doc --no-deps --workspace --all-features
|
run: cargo +nightly doc --no-deps --workspace --all-features
|
||||||
|
|
||||||
|
check-external-types:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Rust (nightly-2023-10-10)
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||||
|
with:
|
||||||
|
toolchain: nightly-2023-10-10
|
||||||
|
|
||||||
|
- name: Install just
|
||||||
|
uses: taiki-e/install-action@v2.20.2
|
||||||
|
with:
|
||||||
|
tool: just
|
||||||
|
|
||||||
|
- name: Install cargo-check-external-types
|
||||||
|
uses: taiki-e/cache-cargo-install-action@v1.2.2
|
||||||
|
with:
|
||||||
|
tool: cargo-check-external-types@0.1.10
|
||||||
|
|
||||||
|
- name: check external types
|
||||||
|
run: just check-external-types-all
|
||||||
|
|
||||||
public-api-diff:
|
public-api-diff:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -66,13 +92,15 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
- name: Install Rust (nightly-2023-08-25)
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||||
with:
|
with:
|
||||||
toolchain: nightly-2023-08-25
|
toolchain: nightly-2023-08-25
|
||||||
|
|
||||||
- uses: taiki-e/cache-cargo-install-action@v1.2.2
|
- name: Install cargo-public-api
|
||||||
|
uses: taiki-e/cache-cargo-install-action@v1.2.2
|
||||||
with:
|
with:
|
||||||
tool: cargo-public-api
|
tool: cargo-public-api@0.32.0
|
||||||
|
|
||||||
- name: generate API diff
|
- name: generate API diff
|
||||||
run: |
|
run: |
|
|
@ -23,6 +23,27 @@ rust-version.workspace = true
|
||||||
# features that docs.rs will build with
|
# features that docs.rs will build with
|
||||||
features = ["http2", "ws", "openssl", "rustls-0_20", "rustls-0_21", "compress-brotli", "compress-gzip", "compress-zstd"]
|
features = ["http2", "ws", "openssl", "rustls-0_20", "rustls-0_21", "compress-brotli", "compress-gzip", "compress-zstd"]
|
||||||
|
|
||||||
|
[package.metadata.cargo_check_external_types]
|
||||||
|
allowed_external_types = [
|
||||||
|
"actix_codec::*",
|
||||||
|
"actix_service::*",
|
||||||
|
"actix_tls::*",
|
||||||
|
"actix_utils::*",
|
||||||
|
"bytes::*",
|
||||||
|
"bytestring::*",
|
||||||
|
"encoding_rs::*",
|
||||||
|
"futures_core::*",
|
||||||
|
"h2::*",
|
||||||
|
"http::*",
|
||||||
|
"httparse::*",
|
||||||
|
"language_tags::*",
|
||||||
|
"mime::*",
|
||||||
|
"openssl::*",
|
||||||
|
"rustls::*",
|
||||||
|
"tokio_util::*",
|
||||||
|
"tokio::*",
|
||||||
|
]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "actix_http"
|
name = "actix_http"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
7
justfile
7
justfile
|
@ -9,3 +9,10 @@ doc:
|
||||||
doc-watch:
|
doc-watch:
|
||||||
RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --features=rustls,openssl --open
|
RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --features=rustls,openssl --open
|
||||||
cargo watch -- RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --features=rustls,openssl
|
cargo watch -- RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --features=rustls,openssl
|
||||||
|
|
||||||
|
check-external-types-all:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euxo pipefail
|
||||||
|
for f in $(find . -mindepth 2 -maxdepth 2 -name Cargo.toml); do
|
||||||
|
cargo +nightly check-external-types --manifest-path "$f"
|
||||||
|
done
|
||||||
|
|
|
@ -93,7 +93,9 @@ fi
|
||||||
|
|
||||||
# done; remove backup files
|
# done; remove backup files
|
||||||
rm -f $CARGO_MANIFEST.bak
|
rm -f $CARGO_MANIFEST.bak
|
||||||
rm -f $CHANGELOG_FILE.bak
|
if [ -n "${CHANGELOG_FILE-}" ]; then
|
||||||
|
rm -f $CHANGELOG_FILE.bak
|
||||||
|
fi
|
||||||
rm -f $README_FILE.bak
|
rm -f $README_FILE.bak
|
||||||
|
|
||||||
echo "manifest, changelog, and readme updated"
|
echo "manifest, changelog, and readme updated"
|
||||||
|
|
Loading…
Reference in a new issue