From f0731112a5554dd26a36a9777d53a766106cf4ec Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 6 Nov 2026 11:34:18 -0800 Subject: [PATCH] fix(ci): run the recorder's macOS tests in the native dev shell The step ran `cargo nextest` in `nix develop`, whose default shell exports CARGO_BUILD_TARGET=x86_64-pc-windows-msvc for the Windows cross build. On the macOS runner that made cargo build the recorder's test executables for Windows, and nextest then failed to list them: for `komorebi-recorder::assert`, command `.../target/x86_64-pc-windows-msvc/debug/deps/assert-ce31ab528bf795df.exe --list --format terse` exited with exit code 126 ... cannot execute binary file Use `nix develop .#native`, the shell without the cross environment that exists for exactly these `cargo -p komorebi-` commands. The schemas step keeps the default shell: `just jsonschema` runs cargo through `env -u CARGO_BUILD_TARGET`. docs/dev/ci.md notes the shell. --- .github/workflows/_macos.yaml | 5 +++-- docs/dev/ci.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_macos.yaml b/.github/workflows/_macos.yaml index 1c217b7d..d98ddd97 100644 --- a/.github/workflows/_macos.yaml +++ b/.github/workflows/_macos.yaml @@ -31,11 +31,12 @@ jobs: - name: The macOS checks run: nix build -L --no-link .#checkSets.macos-lint .#checkSets.macos-test .#checkSets.macos-options # the recorder's tests of the macOS sources (oslog, av, capture, platform, power, system state): the - # filterset is tools/test-partition's + # filterset is tools/test-partition's. It runs in the native shell: the default one exports + # CARGO_BUILD_TARGET=x86_64-pc-windows-msvc, and nextest cannot list the tests of a Windows .exe on a Mac - name: The recorder's macOS tests run: | # shellcheck disable=SC2016 - nix develop --command bash -c 'cargo nextest run --locked -p komorebi-recorder -E "$(tools/test-partition expr recorder-macos)"' + nix develop .#native --command bash -c 'cargo nextest run --locked -p komorebi-recorder -E "$(tools/test-partition expr recorder-macos)"' - name: The binaries run: | nix build -L --no-link --print-out-paths .#komorebi .#komorebic .#komorebi-bar | diff --git a/docs/dev/ci.md b/docs/dev/ci.md index 12a8a57c..e08bccba 100644 --- a/docs/dev/ci.md +++ b/docs/dev/ci.md @@ -27,7 +27,7 @@ each is `success` or `skipped`: it is the only check a ruleset needs to require. | 3 | `test` (4 legs) | ubuntu-24.04, nix | `checkSets.{linux-test,windows-test,recorder-test,nixgen-test}`: Linux tests, the Windows test executables cross-built (not run), the recorder's and nixgen's tests | always | | 3 | `windows-native-test` | windows-latest | `cargo nextest` of the `windows` and `os_sensitive` classes of `tools/test-partition` | Windows or shared paths | | 3 | `windows-native-test-arm` | windows-11-arm | the same on ARM | label `ci:win-arm`; a push to master with Windows paths; by hand | -| 3 | `macos-hosted` | macos-latest (`_macos.yaml`) | the macOS checks, the recorder's macOS tests, the binaries, the schemas | macOS paths | +| 3 | `macos-hosted` | macos-latest (`_macos.yaml`) | the macOS checks, the recorder's macOS tests (in `nix develop .#native`: the default shell builds for Windows), the binaries, the schemas | macOS paths | | 4 | `discover`, `vm-fast` | ubuntu-24.04, KVM | the fast tier of the KDE VM suites, one machine each (`max-parallel: 8`, 45 minutes), a machine with no KVM drawn again (`_vm.yaml`, see KVM) | Linux paths; label `ci:vm`; every push to master | Beside the ladder: