Skip to content

Commit

Permalink
ci: external types checking
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Oct 29, 2023
1 parent 3acdda4 commit 15d2da1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/clippy-fmt.yml
Expand Up @@ -57,6 +57,25 @@ jobs:
RUSTDOCFLAGS: -D warnings
run: cargo +nightly doc --no-deps --workspace --all-features

check-external-types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly-2023-10-10

- uses: taiki-e/cache-cargo-install-action@v1.2.2
with:
tool: cargo-check-external-types@0.1.10

- name: generate API diff
run: |
for f in $(find -mindepth 2 -maxdepth 2 -name Cargo.toml); do
cargo check-external-types --manifest-path "$f"
done
public-api-diff:
runs-on: ubuntu-latest
steps:
Expand All @@ -72,7 +91,7 @@ jobs:

- uses: taiki-e/cache-cargo-install-action@v1.2.2
with:
tool: cargo-public-api
tool: cargo-public-api@0.32.0

- name: generate API diff
run: |
Expand Down
21 changes: 21 additions & 0 deletions actix-http/Cargo.toml
Expand Up @@ -23,6 +23,27 @@ rust-version.workspace = true
# features that docs.rs will build with
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]
name = "actix_http"
path = "src/lib.rs"
Expand Down
4 changes: 3 additions & 1 deletion scripts/bump
Expand Up @@ -93,7 +93,9 @@ fi

# done; remove backup files
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

echo "manifest, changelog, and readme updated"
Expand Down

0 comments on commit 15d2da1

Please sign in to comment.