Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that the core-graphics crate does not trigger false-positives. #198

Merged
merged 2 commits into from
Nov 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 44 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
needs:
- lint
- rust-tests
- run-on-crate
- run-on-rust-libp2p
- run-on-core-graphics
steps:
- run: exit 0

Expand Down Expand Up @@ -104,9 +105,13 @@ jobs:
- name: test
run: cargo test

# Run cargo-semver-checks on a crate with no semver violations,
# to make sure there are no false-positives.
run-on-crate:
run-on-rust-libp2p:
# Run cargo-semver-checks on a crate with no semver violations,
# to make sure there are no false-positives.
#
# cargo-semver-checks previously reported a false-positive here,
# since an enum variant in the crate was included by a feature:
# /~https://github.com/obi1kenobi/cargo-semver-check/issues/147
name: Run cargo-semver-checks on rust-libp2p 0.47.0
runs-on: ubuntu-latest
steps:
Expand All @@ -115,8 +120,6 @@ jobs:
with:
persist-credentials: false

# In this particular version, a feature adds an enum variant.
# Reference: /~https://github.com/obi1kenobi/cargo-semver-check/issues/147
Comment on lines -118 to -119
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just moved all the comments describing what's going on to the same place.

- name: Checkout rust-libp2p
uses: actions/checkout@v3
with:
Expand All @@ -129,7 +132,6 @@ jobs:
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We didn't actually use rustfmt or clippy here, so we shouldn't install them.

profile: minimal
override: true

Expand All @@ -140,11 +142,45 @@ jobs:
- name: Run semver-checks
run: cargo run semver-checks check-release --manifest-path="crate/core/Cargo.toml"

# Test passing package name explicitly
# Test passing package name explicitly.
# It was previously possible to make the command above work while the one here failed.
# Reference: /~https://github.com/obi1kenobi/cargo-semver-checks/issues/174
- name: Run semver-checks (alternative command)
run: cargo run semver-checks check-release --manifest-path="crate/core/Cargo.toml" --package="libp2p-core"

run-on-core-graphics:
# Run cargo-semver-checks on a crate with no semver violations,
# to make sure there are no false-positives.
#
# cargo-semver-checks previously reported a false-positive here,
# due to multiple methods by the same name being defined on the same type.
# /~https://github.com/obi1kenobi/cargo-semver-checks/issues/193
name: Run cargo-semver-checks on core-graphics
runs-on: macos-latest
steps:
- name: Checkout cargo-semver-checks
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Checkout rust-libp2p
uses: actions/checkout@v3
with:
persist-credentials: false
repository: 'servo/core-foundation-rs'
ref: '786895643140fa0ee4f913d7b4aeb0c4626b2085'
path: 'crate'

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Run semver-checks
run: cargo run semver-checks check-release --manifest-path="crate/core-graphics/Cargo.toml"

publish:
name: Publish to crates.io
runs-on: ubuntu-latest
Expand Down