-
Notifications
You must be signed in to change notification settings - Fork 242
CI: run Clippy for all backends, rework the rustdoc job #477
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
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,94 @@ | ||
| name: Workspace | ||
|
|
||
| on: | ||
| push: | ||
| branches: master | ||
| pull_request: | ||
| branches: master | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| clippy: | ||
| name: Clippy | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| RUSTFLAGS: "-Dwarnings" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| # We need Nightly for -Zbuild-std. | ||
| # Fixed Nigthly version is used to prevent | ||
| # CI failures which are not relevant to PR changes | ||
| # on introduction of new Clippy lints. | ||
| toolchain: nightly-2024-06-11 | ||
| components: clippy,rust-src | ||
| - name: std feature | ||
| run: cargo clippy --features std | ||
| - name: custom feature | ||
| run: cargo clippy -Zbuild-std=core --target riscv32i-unknown-none-elf --features custom | ||
| - name: iOS (apple-other.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-apple-ios | ||
| - name: ESP-IDF (espidf.rs) | ||
| run: cargo clippy -Zbuild-std=core --target riscv32imc-esp-espidf | ||
| - name: Fuchsia (fuchsia.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-unknown-fuchsia | ||
| - name: OpenBSD (getentropy.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-unknown-openbsd | ||
| - name: FreeBSD (getrandom.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-unknown-freebsd | ||
| - name: Hermit (hermit.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-unknown-hermit | ||
| - name: Web WASM (js.rs) | ||
| run: cargo clippy -Zbuild-std --target wasm32-unknown-unknown --features js | ||
| - name: Linux (linux_android.rs) | ||
| run: cargo clippy --target x86_64-unknown-linux-gnu --features linux_disable_fallback | ||
| - name: Linux (linux_android_with_fallback.rs) | ||
| run: cargo clippy --target x86_64-unknown-linux-gnu | ||
| - name: NetBSD (netbsd.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-unknown-netbsd | ||
| - name: Fortranix SGX (rdrand.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-fortanix-unknown-sgx | ||
| - name: Solaris (solaris.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-pc-solaris | ||
| - name: SOLID (solid.rs) | ||
| run: cargo clippy -Zbuild-std=core --target aarch64-kmc-solid_asp3 | ||
| - name: Redox (use_file.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-unknown-redox | ||
| - name: VxWorks (vxworks.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-wrs-vxworks | ||
| - name: WASI (wasi.rs) | ||
| run: cargo clippy -Zbuild-std=core --target wasm32-wasip2 | ||
| - name: Windows 7 (windows7.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-win7-windows-msvc | ||
| - name: Windows (windows.rs) | ||
| run: cargo clippy -Zbuild-std=core --target x86_64-pc-windows-msvc | ||
|
|
||
| fmt: | ||
| name: rustfmt | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rustfmt | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: fmt | ||
| run: cargo fmt --all -- --check | ||
|
|
||
| check-doc: | ||
| name: rustdoc | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| # We need Nightly for doc_auto_cfg | ||
| toolchain: nightly-2024-06-11 | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Generate Docs | ||
| env: | ||
| RUSTDOCFLAGS: "-Dwarnings --cfg docsrs" | ||
| run: cargo doc --no-deps --features custom | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.