-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It should reduce CI times when compiling the entire workspace vs compiling a single package.
- Loading branch information
1 parent
005a1ac
commit 980f069
Showing
22 changed files
with
235 additions
and
1 deletion.
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,35 @@ | ||
name: Workspace hack | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
# Check https://docs.rs/cargo-hakari/0.9.29/cargo_hakari/#installation | ||
# to learn how to install cargo-hakari locally | ||
- name: Install cargo-hakari | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-hakari | ||
- name: Verify workspace-hack | ||
run: | | ||
cd libs | ||
# Check that my-workspace-hack's Cargo.toml is up-to-date | ||
# If this fails, run `cargo hakari generate` to fix it | ||
cargo hakari generate --diff | ||
# Check that all workspace crates depend on my-workspace-hack | ||
# If this fails, run `cargo hakari manage-deps` to fix it | ||
cargo hakari manage-deps --dry-run |
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,25 @@ | ||
# This file contains settings for `cargo hakari`. | ||
# See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options. | ||
|
||
hakari-package = "workspace_hack" | ||
|
||
# Format version for hakari's output. Version 4 requires cargo-hakari 0.9.22 or above. | ||
dep-format-version = "4" | ||
|
||
# Setting workspace.resolver = "2" in the root Cargo.toml is HIGHLY recommended. | ||
# Hakari works much better with the new feature resolver. | ||
# For more about the new feature resolver, see: | ||
# https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver | ||
resolver = "2" | ||
|
||
# Add triples corresponding to platforms commonly used by developers here. | ||
# https://doc.rust-lang.org/rustc/platform-support.html | ||
platforms = [ | ||
# "x86_64-unknown-linux-gnu", | ||
# "x86_64-apple-darwin", | ||
# "aarch64-apple-darwin", | ||
# "x86_64-pc-windows-msvc", | ||
] | ||
|
||
# Write out exact versions rather than a semver range. (Defaults to false.) | ||
# exact-versions = true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,4 @@ | ||
# Avoid putting conflict markers in the generated Cargo.toml file, since their presence breaks | ||
# Cargo. | ||
# Also do not check out the file as CRLF on Windows, as that's what hakari needs. | ||
Cargo.toml merge=binary -crlf |
Oops, something went wrong.