Skip to content

Commit

Permalink
Fix cargo patch paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nullstalgia committed Nov 21, 2024
1 parent c69ba51 commit 62347b3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
action:
- command: build
args: --release
- command: fmt
args: --all -- --check --color always
# - command: fmt
# args: --all -- --check --color always
# - command: clippy
# args: --all-targets --all-features --workspace -- -D warnings
steps:
Expand All @@ -38,7 +38,9 @@ jobs:
ldproxy: true
- name: Enable caching
uses: Swatinem/rust-cache@v2
- name: Patch idf-svc
run: cargo run --manifest-path ./cargo-patch-crate-fork/Cargo.toml --target x86_64-unknown-linux-gnu
with:
cache-on-failure: "true"
# - name: Patch idf-svc
# run: cargo run --manifest-path ./cargo-patch-crate-fork/Cargo.toml --target x86_64-unknown-linux-gnu
- name: Run command
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ embassy = [
"esp-idf-svc/embassy-time-driver",
]

# [patch.'https://github.com/esp-rs/esp-idf-svc']
# esp-idf-svc = { path = "./target/patch/ad1c836" }

[patch.crates-io]
# esp-idf-svc = { git = "https://github.com/esp-rs/esp-idf-svc", rev = "ad1c836718ad5abf6cf09b155b791d8fe7efd571" }
esp-idf-svc = { path = "./target/patch/ad1c836" }
esp-idf-svc = { git = "https://github.com/nullstalgia/esp-idf-svc", rev = "1f2c2c253acc11aa71946c31a1ce38ff4fffc067" }
# esp-idf-svc = { path = "./target/patch/ad1c836" }
# esp-idf-svc = { path = "../esp-idf-svc" }
esp-idf-hal = { git = "https://github.com/esp-rs/esp-idf-hal", rev = "72f6448c6498fb3f1234db1ff5c59a2febed5ca5" }

Expand All @@ -49,8 +51,8 @@ esp-idf-hal = { git = "https://github.com/esp-rs/esp-idf-hal", rev = "72f6448c64
[dependencies]
log = "0.4"
# esp-idf-svc = { version = "0.49", default-features = false }
# esp-idf-svc = { git = "https://github.com/esp-rs/esp-idf-svc", rev = "ad1c836718ad5abf6cf09b155b791d8fe7efd571", default-features = false }
esp-idf-svc = { path = "./target/patch/ad1c836" }
esp-idf-svc = { git = "https://github.com/nullstalgia/esp-idf-svc", rev = "1f2c2c253acc11aa71946c31a1ce38ff4fffc067", default-features = false }
# esp-idf-svc = { path = "./target/patch/ad1c836" }
# esp-idf-svc = { path = "../esp-idf-svc" }
# esp-idf-hal = { version = "0.44", default-features = false }
esp-idf-hal = { git = "https://github.com/esp-rs/esp-idf-hal", rev = "72f6448c6498fb3f1234db1ff5c59a2febed5ca5", default-features = false }
Expand Down Expand Up @@ -78,11 +80,11 @@ cstr = "0.2.12"
# embedded-text = { version = "0.7.2", features = ["ansi"] }
# embedded-menu = "0.6.1"
# gfx-xtra = "0.2.0"
kolibri-embedded-gui = "0.0.0-alpha.1"
# kolibri-embedded-gui = "0.0.0-alpha.1"
bitbang-hal = { path = "bitbang-hal-fork" }

[build-dependencies]
embuild = { version = "0.32.0", features = ["espidf"] }
cc = "=1.1.30" # Necessary until a new version of `esp-idf-sys` is released (not my comment)
# patch-crate = "0.1" # Used to `log` -> `::log` in `esp-idf-svc`
patch-crate = { path = "./cargo-patch-crate-fork" }
# patch-crate = { path = "./cargo-patch-crate-fork" }
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fn main() {
println!("cargo:rerun-if-changed=Cargo.toml");
patch_crate::run().expect("Failed while patching");
// println!("cargo:rerun-if-changed=Cargo.toml");
// patch_crate::run().expect("Failed while patching");

embuild::espidf::sysenv::output();
}

0 comments on commit 62347b3

Please sign in to comment.