diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b617b59..5d36c22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,8 +22,10 @@ jobs: uses: actions/checkout@v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + # Pinned until tauri-build is upgraded: 2.5 fails on cargo 1.100's build-dir layout. + uses: dtolnay/rust-toolchain@master with: + toolchain: 1.99.1 components: clippy - name: Setup Rust cache @@ -46,7 +48,10 @@ jobs: uses: actions/checkout@v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + # Pinned until tauri-build is upgraded: 2.5 fails on cargo 1.100's build-dir layout. + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.99.1 - name: Setup Rust cache uses: Swatinem/rust-cache@v2 @@ -107,7 +112,10 @@ jobs: uses: actions/checkout@v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + # Pinned until tauri-build is upgraded: 2.5 fails on cargo 1.100's build-dir layout. + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.99.1 - name: Setup Rust cache uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6df9bec..95bde2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,8 +25,10 @@ jobs: uses: actions/checkout@v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + # Pinned until tauri-build is upgraded: 2.5 fails on cargo 1.100's build-dir layout. + uses: dtolnay/rust-toolchain@master with: + toolchain: 1.99.1 components: rustfmt, clippy - name: Setup Rust cache @@ -107,7 +109,10 @@ jobs: cache: pnpm - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + # Pinned until tauri-build is upgraded: 2.5 fails on cargo 1.100's build-dir layout. + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.99.1 - name: Setup Rust cache uses: Swatinem/rust-cache@v2 diff --git a/src/daemon/remote/tests/convergence.rs b/src/daemon/remote/tests/convergence.rs index b95d339..ef5d022 100644 --- a/src/daemon/remote/tests/convergence.rs +++ b/src/daemon/remote/tests/convergence.rs @@ -194,13 +194,16 @@ impl Drop for Sandbox { } } -/// `localify` as `cargo test` builds it, next to this test binary's folder. +/// `localify` as `cargo test` builds it, in the profile folder above this +/// test binary: two folders up from `target/debug/deps/` before Rust 1.100, +/// four up from `target/debug/build/localify//out/` since. pub(super) fn localify_binary() -> PathBuf { - let binary = std::env::current_exe() - .ok() - .and_then(|test| Some(test.parent()?.parent()?.join("localify"))) - .filter(|binary| binary.is_file()); - binary.expect("the localify binary is built: run `cargo test`, which builds it") + let test = std::env::current_exe().expect("this test binary has a path"); + test.ancestors() + .skip(1) + .map(|folder| folder.join("localify")) + .find(|binary| binary.is_file()) + .expect("the localify binary is built: run `cargo test`, which builds it") } /// Target B's real facts and executor, over the sandbox.