36 Commits

Author SHA1 Message Date
Dave Rolsky
9a1618ffb7 Add a newline after each rust-cache parameter when running them to GITHUB_OUTPUT
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true cross-version:19be834 expect-cross:--expect-cross expect-cross-version:19be834 expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 with cross 19be834 (no cache) runs-on:ubuntu-24.04 targ… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true cross-version:v0.2.3 expect-cross:--expect-cross expect-cross-version:0.2.3 expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 with cross v0.2.3 (no cache) runs-on:ubuntu-24.04 target:a… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true expect-cross:--expect-cross expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 (no cache) runs-on:ubuntu-24.04 target:aarch64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross:--expect-cross expect-file-re:x86-64.+FreeBSD expect-stripped: name:FreeBSD-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-freebsd]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross:--expect-cross expect-file-re:x86-64.+NetBSD expect-stripped: name:NetBSD-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-netbsd]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true cross-version:19be834 expect-cross:--expect-cross expect-cross-version:19be834 expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 with cross 19be834 runs-on:ubuntu-24.04 target:aarch64-u… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true cross-version:v0.2.3 expect-cross:--expect-cross expect-cross-version:0.2.3 expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 with cross v0.2.3 runs-on:ubuntu-24.04 target:aarch64-unkno… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped name:Linux-x86_64 (beta) runs-on:ubuntu-24.04 target:x86_64-unknown-linux-musl toolchain:beta]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped name:Linux-x86_64 (nightly) runs-on:ubuntu-24.04 target:x86_64-unknown-linux-musl toolchain:nightly]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped name:Linux-x86_64 (stable 8 months ago) runs-on:ubuntu-24.04 target:x86_64-unknown-linux-gnu toolchain:stable 8 months … (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped name:Linux-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:32.+ARM expect-stripped: name:Linux-arm runs-on:ubuntu-24.04 target:arm-unknown-linux-gnueabi]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:32.+PowerPC expect-stripped: name:Linux-powerpc runs-on:ubuntu-24.04 target:powerpc-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+PowerPC expect-stripped: name:Linux-powerpc64 runs-on:ubuntu-24.04 target:powerpc64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+PowerPC expect-stripped: name:Linux-powerpc64le runs-on:ubuntu-24.04 target:powerpc64le-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+RISC-V expect-stripped: name:Linux-riscv64 runs-on:ubuntu-24.04 target:riscv64gc-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+S/390 expect-stripped: name:Linux-s390x runs-on:ubuntu-24.04 target:s390x-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+80386 expect-stripped: name:Linux-i586 runs-on:ubuntu-24.04 target:i586-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+80386 expect-stripped: name:Linux-i686 runs-on:ubuntu-24.04 target:i686-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+x86-64 expect-stripped: force-use-cross:true name:Linux-x86_64 (force cross) runs-on:ubuntu-24.04 target:x86_64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 runs-on:ubuntu-24.04 target:aarch64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test validate-inputs (push) Failing after 0s
Self-test / Test a "cargo foo" command (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross: expect-file-re:Mach-O.+arm64 expect-stripped:--expect-stripped name:macOS-aarch64 runs-on:macOS-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross: expect-file-re:Windows.+ARM64 expect-stripped: name:Windows-aarch64 runs-on:windows-latest target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:Mach-O.+x86_64 expect-stripped:--expect-stripped name:macOS-x86_64 runs-on:macOS-latest target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:Windows.+Intel i386 expect-stripped:--expect-stripped name:Windows-i686 runs-on:windows-latest target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:aarch64 expect-stripped:--expect-stripped name:Linux-aarch64 with arm64 host runs-on:ubuntu-24.04-arm target:aarch64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-file-re:Windows.+x86-64 expect-stripped:--expect-stripped name:Windows-x86_64 runs-on:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
This fixes a bug where setting anything in `rust-cache-parameters` caused the input to the
`rust-cache` to be broken.
2025-07-20 13:02:30 -05:00
Dave Rolsky
1db091d29d Add community health docs 2025-06-19 14:25:28 -05:00
DanielHabenicht
a448c4b137 Fix README.md to not use non-existent matrix key 2025-04-12 09:17:24 -05:00
Dave Rolsky
f7da401093 Add release date for 1.0.4
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true cross-version:19be834 expect-cross:--expect-cross expect-cross-version:19be834 expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 with cross 19be834 (no cache) runs-on:ubuntu-24.04 targ… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true cross-version:v0.2.3 expect-cross:--expect-cross expect-cross-version:0.2.3 expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 with cross v0.2.3 (no cache) runs-on:ubuntu-24.04 target:a… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true expect-cross:--expect-cross expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 (no cache) runs-on:ubuntu-24.04 target:aarch64-unknown-linux-gnu]) (push) Failing after 1s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross:--expect-cross expect-file-re:x86-64.+FreeBSD expect-stripped: name:FreeBSD-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-freebsd]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross:--expect-cross expect-file-re:x86-64.+NetBSD expect-stripped: name:NetBSD-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-netbsd]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true cross-version:19be834 expect-cross:--expect-cross expect-cross-version:19be834 expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 with cross 19be834 runs-on:ubuntu-24.04 target:aarch64-u… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true cross-version:v0.2.3 expect-cross:--expect-cross expect-cross-version:0.2.3 expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 with cross v0.2.3 runs-on:ubuntu-24.04 target:aarch64-unkno… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped name:Linux-x86_64 (beta) runs-on:ubuntu-24.04 target:x86_64-unknown-linux-musl toolchain:beta]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped name:Linux-x86_64 (nightly) runs-on:ubuntu-24.04 target:x86_64-unknown-linux-musl toolchain:nightly]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped name:Linux-x86_64 (stable 8 months ago) runs-on:ubuntu-24.04 target:x86_64-unknown-linux-gnu toolchain:stable 8 months … (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped name:Linux-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:32.+ARM expect-stripped: name:Linux-arm runs-on:ubuntu-24.04 target:arm-unknown-linux-gnueabi]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:32.+PowerPC expect-stripped: name:Linux-powerpc runs-on:ubuntu-24.04 target:powerpc-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+PowerPC expect-stripped: name:Linux-powerpc64 runs-on:ubuntu-24.04 target:powerpc64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+PowerPC expect-stripped: name:Linux-powerpc64le runs-on:ubuntu-24.04 target:powerpc64le-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+RISC-V expect-stripped: name:Linux-riscv64 runs-on:ubuntu-24.04 target:riscv64gc-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+S/390 expect-stripped: name:Linux-s390x runs-on:ubuntu-24.04 target:s390x-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+80386 expect-stripped: name:Linux-i586 runs-on:ubuntu-24.04 target:i586-unknown-linux-gnu]) (push) Failing after -1s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+80386 expect-stripped: name:Linux-i686 runs-on:ubuntu-24.04 target:i686-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+x86-64 expect-stripped: force-use-cross:true name:Linux-x86_64 (force cross) runs-on:ubuntu-24.04 target:x86_64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:aarch64 expect-stripped: name:Linux-aarch64 runs-on:ubuntu-24.04 target:aarch64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test validate-inputs (push) Failing after 0s
Self-test / Test a "cargo foo" command (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross: expect-file-re:Mach-O.+arm64 expect-stripped:--expect-stripped name:macOS-aarch64 runs-on:macOS-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross: expect-file-re:Windows.+ARM64 expect-stripped: name:Windows-aarch64 runs-on:windows-latest target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:Mach-O.+x86_64 expect-stripped:--expect-stripped name:macOS-x86_64 runs-on:macOS-latest target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:Windows.+Intel i386 expect-stripped:--expect-stripped name:Windows-i686 runs-on:windows-latest target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:aarch64 expect-stripped:--expect-stripped name:Linux-aarch64 with arm64 host runs-on:ubuntu-24.04-arm target:aarch64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-file-re:Windows.+x86-64 expect-stripped:--expect-stripped name:Windows-x86_64 runs-on:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
2025-04-12 09:14:40 -05:00
Dave Rolsky
ea9defd544 Allow any command to support things like cargo-deb 2025-04-12 09:06:04 -05:00
Dave Rolsky
7cb7930e5c Rename platform_name -> name in test matrix 2025-04-12 09:04:33 -05:00
Dave Rolsky
f6a193191b Upload compiled binaries for each test in the matrix 2025-04-12 09:04:33 -05:00
Dave Rolsky
91c5b34b70 Update tests to account for changes in file output on Windows 2025-04-12 09:04:33 -05:00
Dave Rolsky
ddb18cfff9 Always print output file in test code 2025-04-12 09:04:33 -05:00
Dave Rolsky
329eb5fa43 Improve test output when file command output does not match expected regex 2025-04-12 09:04:33 -05:00
Dave Rolsky
56f0ba980e Remove validation of the toolchain input
The `dtolnay/rust-toolchain` action accepts a lot of options, including things like "stable 8 weeks
ago". Instead of trying to have this action validate the input, we'll leave it to
`dtolnay/rust-toolchain`.

This also adds tests using non-stable toolchains.
2025-04-12 09:04:33 -05:00
Dave Rolsky
e2ab1c3836 Update changes with more details on Linux ARM support
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true cross-version:19be834 expect-cross:--expect-cross expect-cross-version:19be834 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross 19be834 (no cache) runs-on:ubuntu-2… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true cross-version:v0.2.3 expect-cross:--expect-cross expect-cross-version:0.2.3 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross v0.2.3 (no cache) runs-on:ubuntu-24.04… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true expect-cross:--expect-cross expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 (no cache) runs-on:ubuntu-24.04 target:aarch64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross:--expect-cross expect-file-re:x86-64.+FreeBSD expect-stripped: platform_name:FreeBSD-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-freebsd]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross:--expect-cross expect-file-re:x86-64.+NetBSD expect-stripped: platform_name:NetBSD-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-netbsd]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true cross-version:19be834 expect-cross:--expect-cross expect-cross-version:19be834 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross 19be834 runs-on:ubuntu-24.04 target:… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true cross-version:v0.2.3 expect-cross:--expect-cross expect-cross-version:0.2.3 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross v0.2.3 runs-on:ubuntu-24.04 target:aarc… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped platform_name:Linux-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:32.+ARM expect-stripped: platform_name:Linux-arm runs-on:ubuntu-24.04 target:arm-unknown-linux-gnueabi]) (push) Failing after 1s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:32.+PowerPC expect-stripped: platform_name:Linux-powerpc runs-on:ubuntu-24.04 target:powerpc-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+PowerPC expect-stripped: platform_name:Linux-powerpc64 runs-on:ubuntu-24.04 target:powerpc64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+PowerPC expect-stripped: platform_name:Linux-powerpc64le runs-on:ubuntu-24.04 target:powerpc64le-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+RISC-V expect-stripped: platform_name:Linux-riscv64 runs-on:ubuntu-24.04 target:riscv64gc-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+S/390 expect-stripped: platform_name:Linux-s390x runs-on:ubuntu-24.04 target:s390x-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+80386 expect-stripped: platform_name:Linux-i586 runs-on:ubuntu-24.04 target:i586-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+80386 expect-stripped: platform_name:Linux-i686 runs-on:ubuntu-24.04 target:i686-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+x86-64 expect-stripped: force-use-cross:true platform_name:Linux-x86_64 (force cross) runs-on:ubuntu-24.04 target:x86_64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 runs-on:ubuntu-24.04 target:aarch64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test validate-inputs (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross: expect-file-re:Aarch64.+Windows expect-stripped: platform_name:Windows-aarch64 runs-on:windows-latest target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross: expect-file-re:Mach-O.+arm64 expect-stripped:--expect-stripped platform_name:macOS-aarch64 runs-on:macOS-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:80386.+Windows expect-stripped:--expect-stripped platform_name:Windows-i686 runs-on:windows-latest target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:Mach-O.+x86_64 expect-stripped:--expect-stripped platform_name:macOS-x86_64 runs-on:macOS-latest target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:aarch64 expect-stripped:--expect-stripped platform_name:Linux-aarch64 with arm64 host runs-on:ubuntu-24.04-arm target:aarch64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-file-re:x86-64.+Windows expect-stripped:--expect-stripped platform_name:Windows-x86_64 runs-on:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
2025-02-17 13:31:48 -06:00
Dave Rolsky
d2db46a173 Add release date for 1.0.3 2025-02-17 13:29:49 -06:00
Dave Rolsky
83dc934d7f Add partial support for cross-compiling on Linux ARM runners
Until https://github.com/cross-rs/cross/issues/1628 is resolved, running cross on Linux ARM also
requires the user to provide a custom Docker image, so this is only sort of usable.
2025-02-17 13:28:30 -06:00
Dave Rolsky
601d02e82d Add release date for 1.0.2
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true cross-version:19be834 expect-cross:--expect-cross expect-cross-version:19be834 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross 19be834 (no cache) runs-on:ubuntu-2… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true cross-version:v0.2.3 expect-cross:--expect-cross expect-cross-version:0.2.3 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross v0.2.3 (no cache) runs-on:ubuntu-24.04… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true expect-cross:--expect-cross expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 (no cache) runs-on:ubuntu-24.04 target:aarch64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross:--expect-cross expect-file-re:x86-64.+FreeBSD expect-stripped: platform_name:FreeBSD-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-freebsd]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross:--expect-cross expect-file-re:x86-64.+NetBSD expect-stripped: platform_name:NetBSD-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-netbsd]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true cross-version:19be834 expect-cross:--expect-cross expect-cross-version:19be834 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross 19be834 runs-on:ubuntu-24.04 target:… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true cross-version:v0.2.3 expect-cross:--expect-cross expect-cross-version:0.2.3 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross v0.2.3 runs-on:ubuntu-24.04 target:aarc… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped platform_name:Linux-x86_64 runs-on:ubuntu-24.04 target:x86_64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:32.+ARM expect-stripped: platform_name:Linux-arm runs-on:ubuntu-24.04 target:arm-unknown-linux-gnueabi]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:32.+PowerPC expect-stripped: platform_name:Linux-powerpc runs-on:ubuntu-24.04 target:powerpc-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+PowerPC expect-stripped: platform_name:Linux-powerpc64 runs-on:ubuntu-24.04 target:powerpc64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+PowerPC expect-stripped: platform_name:Linux-powerpc64le runs-on:ubuntu-24.04 target:powerpc64le-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+RISC-V expect-stripped: platform_name:Linux-riscv64 runs-on:ubuntu-24.04 target:riscv64gc-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+S/390 expect-stripped: platform_name:Linux-s390x runs-on:ubuntu-24.04 target:s390x-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+80386 expect-stripped: platform_name:Linux-i586 runs-on:ubuntu-24.04 target:i586-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+80386 expect-stripped: platform_name:Linux-i686 runs-on:ubuntu-24.04 target:i686-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+x86-64 expect-stripped: force-use-cross:true platform_name:Linux-x86_64 (force cross) runs-on:ubuntu-24.04 target:x86_64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 runs-on:ubuntu-24.04 target:aarch64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test validate-inputs (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross: expect-file-re:Aarch64.+Windows expect-stripped: platform_name:Windows-aarch64 runs-on:windows-latest target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross: expect-file-re:Mach-O.+arm64 expect-stripped:--expect-stripped platform_name:macOS-aarch64 runs-on:macOS-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:80386.+Windows expect-stripped:--expect-stripped platform_name:Windows-i686 runs-on:windows-latest target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:Mach-O.+x86_64 expect-stripped:--expect-stripped platform_name:macOS-x86_64 runs-on:macOS-latest target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-file-re:x86-64.+Windows expect-stripped:--expect-stripped platform_name:Windows-x86_64 runs-on:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
2025-02-16 11:30:23 -06:00
Dave Rolsky
2c7c51e283 Tweak matrix description for test case 2025-02-16 11:22:07 -06:00
Dave Rolsky
9a022034a6 Add comment to remind myself why we need cross for Linux i586/i686 targets 2025-02-16 11:15:45 -06:00
Dave Rolsky
dc1022bc69 Mostly use GNU targets on Linux
This avoids having to install the `musl-tools`, which in turn speeds test runs up a little bit.
2025-02-16 11:15:44 -06:00
Dave Rolsky
b4ab796093 Fix typo in Changes.md 2025-02-16 11:15:21 -06:00
Dave Rolsky
b094471e7c Improve run-test assertion output 2025-02-16 11:15:21 -06:00
Dave Rolsky
885ad4bc41 Fix validator to always print input names with dashes in errors 2025-02-16 11:15:21 -06:00
Dave Rolsky
c40b27b8f9 Add a force-use-cross input 2025-02-16 11:15:19 -06:00
Dave Rolsky
7619b10b9f Add more newlines in action.yml 2025-02-16 10:28:55 -06:00
Dave Rolsky
a72a5f146c Update README.md to use ubuntu-24.04 in examples 2025-02-15 12:54:54 -06:00
Dave Rolsky
f0ceffbf58 Update all CI jobs using ubuntu to 24.04 2025-02-15 12:54:42 -06:00
Dave Rolsky
c04b5a0b3e Add docs on using mise 2025-02-09 17:55:51 -06:00
Dave Rolsky
e10d0dcde7 Add release date for v1.0.1
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true cross-version:19be834 expect-cross:--expect-cross expect-cross-version:19be834 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross 19be834 runs-on:ubuntu-22.04 target… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true cross-version:v0.2.3 expect-cross:--expect-cross expect-cross-version:0.2.3 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross v0.2.3 (no cache) runs-on:ubuntu-22.04… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:false can-execute:true expect-cross:--expect-cross expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 (no cache) runs-on:ubuntu-22.04 target:aarch64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross:--expect-cross expect-file-re:x86-64.+FreeBSD expect-stripped: platform_name:FreeBSD-x86_64 runs-on:ubuntu-22.04 target:x86_64-unknown-freebsd]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross:--expect-cross expect-file-re:x86-64.+NetBSD expect-stripped: platform_name:NetBSD-x86_64 runs-on:ubuntu-22.04 target:x86_64-unknown-netbsd]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true cross-version:19be834 expect-cross:--expect-cross expect-cross-version:19be834 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross 19be834 runs-on:ubuntu-22.04 target:… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true cross-version:v0.2.3 expect-cross:--expect-cross expect-cross-version:0.2.3 expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 with cross v0.2.3 runs-on:ubuntu-22.04 target:aarc… (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:ELF.+x86-64 expect-stripped:--expect-stripped platform_name:Linux-x86_64 runs-on:ubuntu-22.04 target:x86_64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:32.+ARM expect-stripped: platform_name:Linux-arm runs-on:ubuntu-22.04 target:arm-unknown-linux-musleabi]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:32.+PowerPC expect-stripped: platform_name:Linux-powerpc runs-on:ubuntu-22.04 target:powerpc-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+PowerPC expect-stripped: platform_name:Linux-powerpc64 runs-on:ubuntu-22.04 target:powerpc64-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+PowerPC expect-stripped: platform_name:Linux-powerpc64le runs-on:ubuntu-22.04 target:powerpc64le-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+RISC-V expect-stripped: platform_name:Linux-riscv64 runs-on:ubuntu-22.04 target:riscv64gc-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:64.+S/390 expect-stripped: platform_name:Linux-s390x runs-on:ubuntu-22.04 target:s390x-unknown-linux-gnu]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+80386 expect-stripped: platform_name:Linux-i586 runs-on:ubuntu-22.04 target:i586-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:ELF.+80386 expect-stripped: platform_name:Linux-i686 runs-on:ubuntu-22.04 target:i686-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross:--expect-cross expect-file-re:aarch64 expect-stripped: platform_name:Linux-aarch64 runs-on:ubuntu-22.04 target:aarch64-unknown-linux-musl]) (push) Failing after 0s
Self-test / Test validate-inputs (push) Failing after 0s
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross: expect-file-re:Aarch64.+Windows expect-stripped: platform_name:Windows-aarch64 runs-on:windows-latest target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:false expect-cross: expect-file-re:Mach-O.+arm64 expect-stripped:--expect-stripped platform_name:macOS-aarch64 runs-on:macOS-latest target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:80386.+Windows expect-stripped:--expect-stripped platform_name:Windows-i686 runs-on:windows-latest target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-cross: expect-file-re:Mach-O.+x86_64 expect-stripped:--expect-stripped platform_name:macOS-x86_64 runs-on:macOS-latest target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test action (map[cache-cross-binary:true can-execute:true expect-file-re:x86-64.+Windows expect-stripped:--expect-stripped platform_name:Windows-x86_64 runs-on:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
2025-01-20 22:25:51 -06:00
Dave Rolsky
52839d91bd Fix bug where we would try to use cross on ARM hosts for all targets
If the target is ARM and the host is ARM, this should work with just `cargo`. I'm not sure if this
works for all ARM host/target combos, or if the CPU architecture must be an exact match.

But it doesn't really matter too much, since at least for now there's no ARM builds for
`cross` (https://github.com/cross-rs/cross/issues/1612). So even if cross-compilation doesn't work
natively, we couldn't use `cross` in this case either.

I also rewrote the `set-cross-compile.sh` in Python. By "I", I mean I had Claude do it and then I
tweaked it.
2025-01-20 20:47:52 -06:00
莯凛
5b5d0b578b Add some more details to the docs about environment variables 2025-01-20 14:26:41 -06:00
Dave Rolsky
02bec77bb9 Remove pointless skip_tests key in README.md example 2025-01-20 11:54:32 -06:00
Dave Rolsky
67b2637704 Document setting the env key when using this action
This addresses #36.
2025-01-20 11:53:51 -06:00
Dave Rolsky
cd04d1a926 Update README.md to talk about weird issue I saw with caching multiple crates 2025-01-11 13:01:14 -06:00
Dave Rolsky
242cf4bba9 Rename all matrix keys to use dashes instead of underscores 2025-01-11 12:55:43 -06:00
Dave Rolsky
8a64ff717c Run tests twice, one for main crate and once for subcrate
It seems like restoring the cache for subcrate deletes sometimes removes the compiled binaries for
the parent crate. I'm not sure what's going on here, as it doesn't happen every time.
2025-01-11 12:55:43 -06:00
Dave Rolsky
a8c1049914 Fix version for shellcheck 2025-01-11 12:55:43 -06:00
Dave Rolsky
c76d836532 Fix url to download files for NetBSD issue workaround 2025-01-11 12:55:43 -06:00
19 changed files with 732 additions and 328 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
github: autarch

View File

@@ -8,7 +8,7 @@ env:
jobs:
lint:
name: Check that code is lint clean using precious
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install mise

View File

@@ -11,210 +11,278 @@ jobs:
fail-fast: false
matrix:
platform:
- platform_name: FreeBSD-x86_64
runs-on: ubuntu-22.04
- name: FreeBSD-x86_64
runs-on: ubuntu-24.04
target: x86_64-unknown-freebsd
cache-cross-binary: true
expect_file_re: "x86-64.+FreeBSD"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: false
expect-file-re: "x86-64.+FreeBSD"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: false
- platform_name: Linux-x86_64
runs-on: ubuntu-22.04
- name: Linux-x86_64
runs-on: ubuntu-24.04
# It's important to use a musl target here to make sure that the step to install
# musl-tools works.
target: x86_64-unknown-linux-musl
cache-cross-binary: true
expect_file_re: "ELF.+x86-64"
expect_cross: ""
expect_stripped: "--expect-stripped"
can_execute: true
expect-file-re: "ELF.+x86-64"
expect-cross: ""
expect-stripped: "--expect-stripped"
can-execute: true
- platform_name: Linux-aarch64
runs-on: ubuntu-22.04
- name: Linux-x86_64 (beta)
runs-on: ubuntu-24.04
target: x86_64-unknown-linux-musl
toolchain: beta
cache-cross-binary: true
expect-file-re: "ELF.+x86-64"
expect-cross: ""
expect-stripped: "--expect-stripped"
can-execute: true
- name: Linux-x86_64 (nightly)
runs-on: ubuntu-24.04
target: x86_64-unknown-linux-musl
toolchain: nightly
cache-cross-binary: true
expect-file-re: "ELF.+x86-64"
expect-cross: ""
expect-stripped: "--expect-stripped"
can-execute: true
- name: Linux-x86_64 (force cross)
runs-on: ubuntu-24.04
target: x86_64-unknown-linux-gnu
force-use-cross: true
cache-cross-binary: true
expect-file-re: "ELF.+x86-64"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- name: Linux-x86_64 (stable 8 months ago)
runs-on: ubuntu-24.04
target: x86_64-unknown-linux-gnu
toolchain: "stable 8 months ago"
cache-cross-binary: true
expect-file-re: "ELF.+x86-64"
expect-cross: ""
expect-stripped: "--expect-stripped"
can-execute: true
- name: Linux-aarch64
runs-on: ubuntu-24.04
target: aarch64-unknown-linux-musl
cache-cross-binary: true
expect_file_re: "aarch64"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: true
expect-file-re: "aarch64"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- platform_name: Linux-aarch64 (no cache)
runs-on: ubuntu-22.04
target: aarch64-unknown-linux-musl
- name: Linux-aarch64 (no cache)
runs-on: ubuntu-24.04
target: aarch64-unknown-linux-gnu
cache-cross-binary: false
expect_file_re: "aarch64"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: true
expect-file-re: "aarch64"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- platform_name: Linux-aarch64 with cross v0.2.3
runs-on: ubuntu-22.04
target: aarch64-unknown-linux-musl
- name: Linux-aarch64 with cross v0.2.3
runs-on: ubuntu-24.04
target: aarch64-unknown-linux-gnu
cross-version: "v0.2.3"
cache-cross-binary: true
expect_file_re: "aarch64"
expect_cross: "--expect-cross"
expect_cross_version: "0.2.3"
expect_stripped: ""
can_execute: true
expect-file-re: "aarch64"
expect-cross: "--expect-cross"
expect-cross-version: "0.2.3"
expect-stripped: ""
can-execute: true
- platform_name: Linux-aarch64 with cross v0.2.3 (no cache)
runs-on: ubuntu-22.04
target: aarch64-unknown-linux-musl
- name: Linux-aarch64 with cross v0.2.3 (no cache)
runs-on: ubuntu-24.04
target: aarch64-unknown-linux-gnu
cross-version: "v0.2.3"
cache-cross-binary: false
expect_file_re: "aarch64"
expect_cross: "--expect-cross"
expect_cross_version: "0.2.3"
expect_stripped: ""
can_execute: true
expect-file-re: "aarch64"
expect-cross: "--expect-cross"
expect-cross-version: "0.2.3"
expect-stripped: ""
can-execute: true
- platform_name: Linux-aarch64 with cross 19be834
runs-on: ubuntu-22.04
target: aarch64-unknown-linux-musl
- name: Linux-aarch64 with cross 19be834
runs-on: ubuntu-24.04
target: aarch64-unknown-linux-gnu
cross-version: "19be834"
cache-cross-binary: true
expect_file_re: "aarch64"
expect_cross: "--expect-cross"
expect_cross_version: "19be834"
expect_stripped: ""
can_execute: true
expect-file-re: "aarch64"
expect-cross: "--expect-cross"
expect-cross-version: "19be834"
expect-stripped: ""
can-execute: true
- platform_name: Linux-aarch64 with cross 19be834
runs-on: ubuntu-22.04
target: aarch64-unknown-linux-musl
- name: Linux-aarch64 with cross 19be834 (no cache)
runs-on: ubuntu-24.04
target: aarch64-unknown-linux-gnu
cross-version: "19be834"
cache-cross-binary: false
expect_file_re: "aarch64"
expect_cross: "--expect-cross"
expect_cross_version: "19be834"
expect_stripped: ""
can_execute: true
expect-file-re: "aarch64"
expect-cross: "--expect-cross"
expect-cross-version: "19be834"
expect-stripped: ""
can-execute: true
- platform_name: Linux-arm
runs-on: ubuntu-22.04
target: arm-unknown-linux-musleabi
- name: Linux-aarch64 with arm64 host
runs-on: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "32.+ARM"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: true
expect-file-re: "aarch64"
expect-cross: ""
expect-stripped: "--expect-stripped"
can-execute: true
- platform_name: Linux-i586
runs-on: ubuntu-22.04
target: i586-unknown-linux-musl
# This fails because of some sort of weird bug in cross. See
# https://github.com/cross-rs/cross/issues/1628 for more details. Until that's fixed
# cross-compiling on Linux ARM won't work without a custom Docker image, which I don't
# want to do just for the sake of testing this.
#
# - name: Linux-aarch64 with arm64 host compile to x86-64
# runs-on: ubuntu-24.04-arm
# target: x86_64-unknown-linux-gnu
# # Until cross produces arm64 binary releases we _have_ to set this when running on
# # arm64.
# cross-version: "c7dee4d"
# cache-cross-binary: true
# expect-file-re: "ELF.+x86-64"
# expect-cross: "--expect-cross"
# expect-stripped: ""
# can-execute: true
- name: Linux-arm
runs-on: ubuntu-24.04
target: arm-unknown-linux-gnueabi
cache-cross-binary: true
expect_file_re: "ELF.+80386"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: true
expect-file-re: "32.+ARM"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- platform_name: Linux-i686
runs-on: ubuntu-22.04
target: i686-unknown-linux-musl
- name: Linux-i586
runs-on: ubuntu-24.04
target: i586-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "ELF.+80386"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: true
expect-file-re: "ELF.+80386"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- platform_name: Linux-powerpc
runs-on: ubuntu-22.04
- name: Linux-i686
runs-on: ubuntu-24.04
target: i686-unknown-linux-gnu
cache-cross-binary: true
expect-file-re: "ELF.+80386"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- name: Linux-powerpc
runs-on: ubuntu-24.04
target: powerpc-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "32.+PowerPC"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: true
expect-file-re: "32.+PowerPC"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- platform_name: Linux-powerpc64
runs-on: ubuntu-22.04
- name: Linux-powerpc64
runs-on: ubuntu-24.04
target: powerpc64-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "64.+PowerPC"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: true
expect-file-re: "64.+PowerPC"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- platform_name: Linux-powerpc64le
runs-on: ubuntu-22.04
- name: Linux-powerpc64le
runs-on: ubuntu-24.04
target: powerpc64le-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "64.+PowerPC"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: true
expect-file-re: "64.+PowerPC"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- platform_name: Linux-riscv64
runs-on: ubuntu-22.04
- name: Linux-riscv64
runs-on: ubuntu-24.04
target: riscv64gc-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "64.+RISC-V"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: true
expect-file-re: "64.+RISC-V"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- platform_name: Linux-s390x
runs-on: ubuntu-22.04
- name: Linux-s390x
runs-on: ubuntu-24.04
target: s390x-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "64.+S/390"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: true
expect-file-re: "64.+S/390"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: true
- platform_name: NetBSD-x86_64
runs-on: ubuntu-22.04
- name: NetBSD-x86_64
runs-on: ubuntu-24.04
target: x86_64-unknown-netbsd
cache-cross-binary: true
expect_file_re: "x86-64.+NetBSD"
expect_cross: "--expect-cross"
expect_stripped: ""
can_execute: false
expect-file-re: "x86-64.+NetBSD"
expect-cross: "--expect-cross"
expect-stripped: ""
can-execute: false
- platform_name: Windows-aarch64
- name: Windows-aarch64
runs-on: windows-latest
target: aarch64-pc-windows-msvc
cache-cross-binary: true
expect_file_re: "Aarch64.+Windows"
expect_cross: ""
expect_stripped: ""
can_execute: false
expect-file-re: "Windows.+ARM64"
expect-cross: ""
expect-stripped: ""
can-execute: false
- platform_name: Windows-i686
- name: Windows-i686
runs-on: windows-latest
target: i686-pc-windows-msvc
cache-cross-binary: true
expect_file_re: "80386.+Windows"
expect_cross: ""
expect_stripped: "--expect-stripped"
can_execute: true
expect-file-re: "Windows.+Intel i386"
expect-cross: ""
expect-stripped: "--expect-stripped"
can-execute: true
- platform_name: Windows-x86_64
- name: Windows-x86_64
runs-on: windows-latest
target: x86_64-pc-windows-msvc
cache-cross-binary: true
expect_file_re: "x86-64.+Windows"
expect_stripped: "--expect-stripped"
can_execute: true
expect-file-re: "Windows.+x86-64"
expect-stripped: "--expect-stripped"
can-execute: true
- platform_name: macOS-x86_64
- name: macOS-x86_64
runs-on: macOS-latest
target: x86_64-apple-darwin
cache-cross-binary: true
expect_file_re: "Mach-O.+x86_64"
expect_cross: ""
expect_stripped: "--expect-stripped"
can_execute: true
expect-file-re: "Mach-O.+x86_64"
expect-cross: ""
expect-stripped: "--expect-stripped"
can-execute: true
- platform_name: macOS-aarch64
- name: macOS-aarch64
runs-on: macOS-latest
target: aarch64-apple-darwin
cache-cross-binary: true
expect_file_re: "Mach-O.+arm64"
expect_cross: ""
expect_stripped: "--expect-stripped"
can_execute: false
expect-file-re: "Mach-O.+arm64"
expect-cross: ""
expect-stripped: "--expect-stripped"
can-execute: false
runs-on: ${{ matrix.platform.runs-on }}
steps:
@@ -229,60 +297,53 @@ jobs:
uses: ./
with:
command: both
force-use-cross: ${{ matrix.platform.force-use-cross || false }}
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.platform.toolchain || 'stable' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.platform.can_execute }}
if: ${{ matrix.platform.can-execute }}
- name: Run test command
uses: ./
with:
command: test
force-use-cross: ${{ matrix.platform.force-use-cross || false }}
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.platform.toolchain || 'stable' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.platform.can_execute }}
if: ${{ matrix.platform.can-execute }}
- name: Run test command with args
uses: ./
with:
command: test
force-use-cross: ${{ matrix.platform.force-use-cross || false }}
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.platform.toolchain || 'stable' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
args: "-- --ignored"
if: ${{ matrix.platform.can_execute }}
if: ${{ matrix.platform.can-execute }}
- name: Run build command
uses: ./
with:
command: build
force-use-cross: ${{ matrix.platform.force-use-cross || false }}
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.platform.toolchain || 'stable' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strip: true
- name: Run build command for subdir
uses: ./
with:
command: build
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
working-directory: subcrate
target: ${{ matrix.platform.target }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strip: true
- name: Run bench command
uses: ./
with:
command: bench
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
target: ${{ matrix.platform.target }}
working-directory: bench
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.platform.can_execute }}
- name: Check binary and cross on ${{ matrix.platform.platform_name }}
# This is the default cache-provider. This is just added to make sure that we handle
# additional rust-cache parameters properly. See
# https://github.com/houseabsolute/actions-rust-cross/issues/46 for an example of how this
# was broken.
rust-cache-parameters: '{ "cache-provider": "github" }'
- name: Check binary and cross for main crate on ${{ matrix.platform.name }}
shell: bash
run: |
set -e
@@ -290,17 +351,95 @@ jobs:
cargo run --manifest-path ./run-tests/Cargo.toml -- \
--checkout-root "$PWD" \
--target "${{ matrix.platform.target }}" \
--expect-file-re "${{ matrix.platform.expect_file_re }}" \
--expect-cross-version "${{ matrix.platform.expect_cross_version }}" \
${{ matrix.platform.expect_cross }} \
${{ matrix.platform.expect_stripped }}
--expect-file-re "${{ matrix.platform.expect-file-re }}" \
--expect-cross-version "${{ matrix.platform.expect-cross-version }}" \
${{ matrix.platform.expect-cross }} \
${{ matrix.platform.expect-stripped }}
- name: Run build command for subdir
uses: ./
with:
command: build
force-use-cross: ${{ matrix.platform.force-use-cross || false }}
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
working-directory: subcrate
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.platform.toolchain || 'stable' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strip: true
- name: Check binary and cross for subcrate on ${{ matrix.platform.name }}
shell: bash
run: |
set -e
set -x
cargo run --manifest-path ./run-tests/Cargo.toml -- \
--checkout-root "$PWD" \
--target "${{ matrix.platform.target }}" \
--expect-file-re "${{ matrix.platform.expect-file-re }}" \
--expect-cross-version "${{ matrix.platform.expect-cross-version }}" \
${{ matrix.platform.expect-cross }} \
${{ matrix.platform.expect-stripped }} \
--is-subcrate
- name: Run bench command
uses: ./
with:
command: bench
force-use-cross: ${{ matrix.platform.force-use-cross || false }}
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
target: ${{ matrix.platform.target }}
working-directory: bench
toolchain: ${{ matrix.platform.toolchain || 'stable' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.platform.can-execute }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-${{ matrix.platform.name }}
path: |
target/${{ matrix.platform.target }}/debug/bin*
subcrate/target/${{ matrix.platform.target }}/debug/subcrate
test-validate-inputs:
name: Test validate-inputs
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run tests
shell: bash
run: ./validate-inputs.py --test
test-other-cargo-commands:
name: Test a "cargo foo" command
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Copy test project to root
shell: bash
run: |
cp -a test-project/* .
rm -fr test-project
- name: Create cargo-foo command
shell: bash
run: |
set -e
set -x
dir="${{ github.workspace }}/bin"
mkdir -p "$dir"
bin="$dir/cargo-foo"
echo "#!/bin/bash" >> "$bin"
echo "echo 'This is cargo-foo!'" >> "$bin"
echo "exit 0" >> "$bin"
chmod 0755 "$bin"
echo "PATH=$dir:$PATH" >> "$GITHUB_ENV"
- name: Run cargo-foo command
uses: ./
with:
command: foo
target: x86_64-unknown-linux-gnu

20
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,20 @@
# Contributing
Thank you for your interest in contributing to this project. This file contains instructions that
will help you work with the source code.
Please note that if you have any questions or difficulties, you can reach the maintainer through
GitHub Issues. Filing an issue is the preferred method for reporting bugs or issues with the
development tool configuration for this project.
If you'd like to suggest a small change, you can do that by directly creating a
[Pull Request](https://docs.github.com/en/pull-requests). For larger changes, you are encouraged to
file an issue first, so we can discuss the change before you spend too much time implementing it.
Please note that the maintainer, Dave Rolsky (@autarch), mostly works on his FOSS projects in his
free time, which means on weekends and days off. However, he does not work on these things _every_
weekend, so it may be a little while before you get a response to your issue or PR.
If it's been more than 3 weeks since you submitted an issue or PR, feel free to comment on the
submission to nudge the maintainer, who is probably getting sucked into some new video game and
spending all his time there.

View File

@@ -1,3 +1,38 @@
## 1.0.5 - 2025-07-20
- Fixed a bug in the handling of the `rust-cache-parameters` input. If anything was specified for
this, it would end up providing a broken config to the `Swatinem/rust-cache` action. Reported by
@SinTan1729 (Sayantan Santra). GH #46.
## 1.0.4 - 2025-04-12
- Removed validation for the `toolchain` input. The
[dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) accepts a lot of different
options that this action wasn't allowing. It's simpler and more flexible to just let that action
handle validation. Requested by @axos88 (Akos Vandra-Meyer). GH #42.
- Removed validation for the `command` input. This allows you to use this action with any `cargo`
extension command, like `cargo-deb`. Setting `command` to `both` is still supported and will run
the `build` and `test` commands. Requested by @bvaisvil (Benjamin Vaisvil). GH #43.
## 1.0.3 - 2025-02-17
- Fixed a bug when running with a Linux ARM host where the action would use a cached `cross`
download for x86-64 Linux (or vice versa). Now the cache key for the `cross` binary includes both
the runner's architecture in addition to its OS.
- This release partially support running on Linxu ARM, but see the `README.md` file for details on
this.
## 1.0.2 - 2025-02-16
- Added a new `force-use-cross` input, which does what it says. It will force the use of `cross`
even when it is not required for given platform/target combination. Note that this only works on
Linux hosts.
## 1.0.1 - 2025-01-20
- Fixed a bug where this action would attempt to use `cross` when compiling for an ARM Linux target
on an ARM Linux host.
## 1.0.0 - 2025-01-11
The addition of caching is a significant behavior change for this action, so the version has been
@@ -27,7 +62,7 @@ bumped to v1.0.0 because of this change.
- This action will now configure and use `Swatinem/rust-cache` by default for you. It will include
the `target` parameter as part of the cache key automatically. Suggested by @jennydaman (Jennings
Zhang). GH #23.
- This action now validates its input and will exit early if they are not valid. GH #35.
- This action now validates its inputs and will exit early if they are not valid. GH #35.
## 0.0.17 - 2024-11-23

12
GOVERNANCE.md Normal file
View File

@@ -0,0 +1,12 @@
# Project Governance
This repository works through the BDFL Benevolent Dictator For Life - model. That means that a
single maintainer, Dave Rolsky (@autarch), holds all of the admin keys and write access for this
repository. Other users are encouraged to open issues, submit Pull Requests, and to ask for
recognition as maintainers, but all decisions ultimately lie with the core maintainer.
This maintainer is open to others joining on the admin team for this repository, but prospective
admins will need a track record of contributions in the form of PRs and issue responses first.
Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for more details on how to file issues and
PRs for this project.

135
README.md
View File

@@ -14,20 +14,19 @@ jobs:
matrix:
platform:
- os-name: FreeBSD-x86_64
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
target: x86_64-unknown-freebsd
skip_tests: true
- os-name: Linux-x86_64
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
target: x86_64-unknown-linux-musl
- os-name: Linux-aarch64
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
target: aarch64-unknown-linux-musl
- os-name: Linux-riscv64
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
target: riscv64gc-unknown-linux-gnu
- os-name: Windows-x86_64
@@ -47,7 +46,7 @@ jobs:
- name: Build binary
uses: houseabsolute/actions-rust-cross@v1
with:
command: ${{ matrix.platform.command }}
command: build
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
@@ -61,7 +60,7 @@ jobs:
Note that for Linux or BSD targets, you should always set the `runs-on` key to a Linux x86-64
architecture runner.
If you _only_ want to do native ARM compilation, for example using the `ubuntu-latest-arm` runner,
If you _only_ want to do native ARM compilation, for example using the `ubuntu-24.04-arm` runner,
then there's no need to use this action. However, if you want to compile for _many_ platforms,
including Linux ARM, using this action will simplify your config. This action is only tested on
Ubuntu x86-64, Windows, and macOS runners.
@@ -70,18 +69,39 @@ Ubuntu x86-64, Windows, and macOS runners.
This action takes the following parameters:
| Key | Type | Required? | Description |
| ----------------------- | -------------------------------------------------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command` | string (one of `build`, `test`, `both` (build and test), or `bench`) | no | The command(s) to run. The default is `build`. Running the `test` command will fail with \*BSD targets and non-x86 Windows. |
| `target` | string | yes | The target triple to compile for. This should be one of the targets found by running `rustup target list`. |
| `working-directory` | string | no | The working directory in which to run the `cargo` or `cross` commands. Defaults to the current directory (`.`). |
| `toolchain` | string (one of `stable`, `beta`, or `nightly`) | no | The Rust toolchain version to install. The default is `stable`. |
| `GITHUB_TOKEN` | string | no | Defaults to the value of `${{ github.token }}`. |
| `args` | string | no | A string-separated list of arguments to be passed to `cross build`, like `--release --locked`. |
| `strip` | boolean (`true` or `false`) | no | If this is true, then the resulting binaries will be stripped if possible. This is only possible for binaries which weren't cross-compiled. |
| `cross-version` | string | no | This can be used to set the version of `cross` to use. If specified, it should be a specific `cross` release tag (like `v0.2.3`) or a git ref (commit hash, `HEAD`, etc.). If this is not set then the latest released version will always be used. If this is set to a git ref then the version corresponding to that ref will be installed. |
| `use-rust-cache` | boolean | no | Whether or not to use [the `Swatinem/rust-cache@v2` action](https://github.com/Swatinem/rust-cache). This defaults to true. |
| `rust-cache-parameters` | string (containing JSON) | no | This must be a string containing valid JSON. The JSON should be an object where the keys are the parameters for [the `Swatinem/rust-cache@v2` action](https://github.com/Swatinem/rust-cache). |
| Key | Type | Required? | Description |
| ----------------------- | --------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command` | string | no | The command(s) to run. The default is `build`. Running the `test` command will fail with \*BSD targets and non-x86 Windows. You can use any command supported by `cargo` and/or `cross`. For example, if you install `cargo-deb`, the command can be `deb`. Use the special string "both" to run both `build` and `test. |
| `target` | string | yes | The target triple to compile for. This should be one of the targets found by running `rustup target list`. |
| `working-directory` | string | no | The working directory in which to run the `cargo` or `cross` commands. Defaults to the current directory (`.`). |
| `toolchain` | string) | no | The Rust toolchain version to install. This is passed directly to [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain), which accepts many different options. See its documentation for more details. The default is `stable`. |
| `GITHUB_TOKEN` | string | no | Defaults to the value of `${{ github.token }}`. |
| `args` | string | no | A string-separated list of arguments to be passed to `cross build`, like `--release --locked`. |
| `strip` | boolean (`true` or `false`) | no | If this is true, then the resulting binaries will be stripped if possible. This is only possible for binaries which weren't cross-compiled. |
| `cross-version` | string | no | This can be used to set the version of `cross` to use. If specified, it should be a specific `cross` release tag (like `v0.2.3`) or a git ref (commit hash, `HEAD`, etc.). If this is not set then the latest released version will always be used. If this is set to a git ref then the version corresponding to that ref will be installed. |
| `force-use-cross` | boolean (`true` or `false`) | no | If this is true, then the action will use `cross` even if it is not needed for the given target. If this is set to `true`, then the resulting binary will not be stripped, regardless of whether `strip` is `true` or not. This only works on Linux hosts. Forcing the use of `cross` on other hosts is not supported. |
| `use-rust-cache` | boolean | no | Whether or not to use [the `Swatinem/rust-cache@v2` action](https://github.com/Swatinem/rust-cache). This defaults to true. |
| `rust-cache-parameters` | string (containing JSON) | no | This must be a string containing valid JSON. The JSON should be an object where the keys are the parameters for [the `Swatinem/rust-cache@v2` action](https://github.com/Swatinem/rust-cache). |
### Setting Environment Variables
By default, `cross` passes most rust-related environment variables through when it runs `cargo` in a
Docker image. This means you can simply set an `env` key in the workflow step that uses this action.
```
- name: Run build command
uses: houseabsolute/actions-rust-cross@v1
env:
CARGO_LOG: debug
RUSTFLAGS: "-g"
with:
command: build
```
If you want to pass other environment variables through, you will need to configure `cross` to do
see. See the
[`cross` docs](https://github.com/cross-rs/cross/blob/main/docs/environment_variables.md#environment-variable-passthrough)
for more details.
## How it Works
@@ -99,13 +119,6 @@ build `cross`.
When compiling on Windows, it will do so in a Powershell environment, which can matter in some
corner cases, like compiling the `openssl` crate with the `vendored` feature.
By default, it will use
[the `Swatinem/rust-cache@v2` action](https://github.com/Swatinem/rust-cache) to cache compiled
dependencies for this crate. Note that per the documentation for this action, it has fairly limited
value for crates without a `Cargo.lock` file. The `key` parameter passed to this action will always
include the value of the `target` input. If you specify a `key` parameter in
`rust-cache-parameters`, then the `target` input will be appended to the value you specify.
When running `cargo` on a Linux system, it will also include the output of running
`lsb_release --short --description` in the cache key. This is important for crates that link against
system libraries. If those library versions change across OS versions (e.g. Ubuntu 20.04 to 22.04),
@@ -118,3 +131,73 @@ that we do not re-use the cache across changes when these images change.
Finally, it will run `strip` to strip the binaries it builds if the `strip` parameter is true. This
is only possible for builds that are not done via `cross`. In addition, Windows builds for `aarch64`
cannot be stripped either.
### Caching
By default, this action will use
[the `Swatinem/rust-cache@v2` action](https://github.com/Swatinem/rust-cache) to cache compiled
dependencies for a crate. Note that per the documentation for the `rust-cache` action, it has fairly
limited value for crates without a `Cargo.lock` file. The `key` parameter passed to this action will
always include the value of the `target` input. If you specify a `key` parameter in
`rust-cache-parameters`, then the `target` input will be appended to the value you specify.
#### Weird Caching Issue with Multiple Crates
In my testing, it seemed like in some cases restoring the cache would delete existing files in a
`target` directory. This manifested with this sequence of actions:
1. Run `actions-rust-cross` to compile a crate in a top-level directory.
2. Run `actions-rust-cross` to compile a crate in a subdirectory.
After step 2, the compiled binaries from step 1 were no longer present, _sometimes_. I'm not sure
exactly what's going on here, but my recommendation is to structure your workflows so that this
cannot affect you.
For example, if you have multiple crates, each of which builds a binary you want to release, then
you can avoid this issue by structuring your workflow as follows:
1. Run `actions-rust-cross` to compile crate A.
2. Run the release steps for crate A.
3. Run `actions-rust-cross` to compile crate B.
4. Run the release steps for crate B.
When structured this way, it does not matter if the output of crate A is deleted in step 3.
## Cross-Compiling from Linux ARM Runners
In theory, this should work, and this action does implement some of the necessary work for this.
However, there are a couple issues with this:
1. As of 2025-02-17, the `cross` project does not publish Linux ARM binary releases. That means that
in order to use `cross` on a Linux ARM runner as part of this action, you must set
`cross-version` to a more recent commit from the `cross` repo.
2. There is
[a bug in `cross` that means you must use a custom Docker image](https://github.com/cross-rs/cross/issues/1628)
when cross-compiling from a Linux ARM runner. See
[this other `cross` issue](https://github.com/cross-rs/cross/issues/751) for more details.
## Linting and Tidying this Code
The code in this repo is linted and tidied with
[`precious`](https://github.com/houseabsolute/precious). This repo contains a `mise.toml` file.
[Mise](https://mise.jdx.dev/) is a tool for managing dev tools with per-repo configuration. You can
install `mise` and use it to run `precious` as follows:
```
# Installs mise
curl https://mise.run | sh
# Installs precious and other dev tools
mise install
```
Once this is done, you can run `precious` via `mise`:
```
# Lints all code
mise exec -- precious lint -a
# Tidies all code
mise exec -- precious tidy -a
```
If you want to use `mise` for other projects, see [its documentation](https://mise.jdx.dev/) for
more details on how you can configure your shell to always activate `mise`.

9
SECURITY.md Normal file
View File

@@ -0,0 +1,9 @@
# Reporting Security Issues
To report a security issue, please use the GitHub Security Advisory "Report a Vulnerability" tab.
The project maintainer(s) will send a response indicating the next steps in handling your report.
After the initial reply to your report, the maintainer(s) will keep you informed of the progress
towards a fix and full announcement, and may ask for additional information or guidance.
Report security bugs in third-party packages to the person or team maintaining the package.

7
SUPPORT.md Normal file
View File

@@ -0,0 +1,7 @@
# How to file issues and get help
This project uses GitHub Issues to track bugs and feature requests. Please search the existing
issues before filing new issues to avoid duplicates. For new issues, file your bug or feature
request as a new Issue.
For help and questions about using this project, you can use GitHub Issues as well.

View File

@@ -1,55 +1,74 @@
name: "Build Rust Projects with Cross"
author: "Dave Rolsky <autarch@urth.org>"
branding:
icon: home
color: gray-dark
description: |
Cross compile your Rust projects with cross (https://github.com/cross-rs/cross).
inputs:
target:
description: The target platform
required: true
command:
description: |
The commands to run. This must be one of "build", "test", "both" (build and test), or "bench".
The commands to run. Use "both" to run both "build" and "test".
default: build
toolchain:
description: |
The target toolchain to use (one of "stable", "beta", or "nightly").
The target toolchain to use.
default: stable
working-directory:
description: The working directory for each step
default: "."
GITHUB_TOKEN:
description: |
A GitHub token, available in the secrets.GITHUB_TOKEN working-directory variable.
default: ${{ github.token }}
args:
description: |
The arguments to be passed to cross or cargo when building, as a
space-separated string.
default: ""
strip:
description: Strip the compiled binary
default: false
cross-version:
description: |
The version of cross to use. If not specified, then the latest version
will be used.
cache-cross-binary:
description: |
Cache the cross binary if one is installed. This is primarily for use in
tests of this action.
default: true
force-use-cross:
description: |
If this is true, the action will use cross even for targets where it is not needed.
default: false
use-rust-cache:
description: |
Use `Swatinem/rust-cache@v2`. Defaults to true.
default: true
rust-cache-parameters:
description: |
A JSON string containing parameters to pass to `Swatinem/rust-cache@v2`. You can use the
`toJSON()` function in your action to make passing this easier.
default: "{}"
runs:
using: composite
steps:
@@ -57,9 +76,11 @@ runs:
shell: bash
run: |
echo '${{ toJSON(inputs) }}'
- name: Add this action's path to PATH
shell: bash
run: echo "${{ github.action_path }}" >> $GITHUB_PATH
- name: Validate inputs
shell: bash
run: |
@@ -71,17 +92,30 @@ runs:
INPUTS_working_directory: ${{ inputs.working-directory }}
INPUTS_strip: ${{ inputs.strip }}
INPUTS_cache_cross_binary: ${{ inputs.cache-cross-binary }}
INPUTS_force_use_cross: ${{ inputs.force-use-cross }}
INPUTS_use_rust_cache: ${{ inputs.use-rust-cache }}
INPUTS_rust_cache_parameters: ${{ inputs.rust-cache-parameters }}
- name: Determine whether we need to cross-compile
id: determine-cross-compile
shell: bash
run: set-cross-compile.sh ${{ inputs.target }}
run: set-cross-compile.py ${{ inputs.target }} ${{ inputs.force-use-cross }}
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
targets: ${{ inputs.target }}
toolchain: ${{ inputs.toolchain }}
- name: Install qemu-user emulator binaries if cross-compiling on arm64 host
shell: bash
run: |
set -e
set -x
docker run --privileged --rm tonistiigi/binfmt --install all
if: steps.determine-cross-compile.outputs.needs-cross == 'true' && runner.os == 'Linux' && contains(runner.arch, 'ARM')
- name: Determine cross version
id: determine-cross-version
shell: bash
@@ -89,6 +123,7 @@ runs:
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
if: steps.determine-cross-compile.outputs.needs-cross == 'true'
# We need to access this in both this YAML config and shell scripts. It
# doesn't seem like using ${{ env.RUNNER_TEMP }} works in the YAML config.
- name: Set directory for installing cross
@@ -96,19 +131,22 @@ runs:
shell: bash
run: set-cross-dir.sh
if: steps.determine-cross-compile.outputs.needs-cross == 'true'
- name: Cache cross
id: cache-cross
uses: actions/cache@v4
with:
path: ${{ steps.set-cross-dir.outputs.cross-dir }}/cross
key: ${{ runner.os }}-${{ steps.determine-cross-version.outputs.cross-version }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.determine-cross-version.outputs.cross-version }}
if: steps.determine-cross-compile.outputs.needs-cross == 'true' && inputs.cache-cross-binary == 'true'
- name: Install cross if cross-compiling (*nix)
shell: bash
run: install-cross-nix.sh ${{ steps.set-cross-dir.outputs.cross-dir }} ${{ steps.determine-cross-version.outputs.cross-version }}
if: steps.determine-cross-compile.outputs.needs-cross == 'true' && steps.cache-cross.outputs.cache-hit != 'true'
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
- name: Install musl-tools on Linux if target includes "musl"
shell: bash
run: |
@@ -118,14 +156,17 @@ runs:
sudo apt-get update --yes && \
sudo apt-get install --yes musl-tools
if: steps.determine-cross-compile.outputs.needs-cross != 'true' && contains(inputs.target, 'musl')
- name: Set build command
id: set-build-command
shell: bash
run: set-build-command.sh ${{ steps.set-cross-dir.outputs.cross-dir }}
- name: Determine which cargo commands to run
id: determine-cargo-commands
shell: bash
run: determine-cargo-commands.sh ${{ inputs.command }}
- name: Parse `rust-cache-parameters` and set inputs for `Swatinem/rust-cache@v2`
id: parse-rust-cache-parameters
shell: bash
@@ -144,50 +185,42 @@ runs:
env:
RUST_CACHE_PARAMETERS: ${{ inputs.rust-cache-parameters }}
if: inputs.use-rust-cache == 'true'
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
with: ${{ steps.parse-rust-cache-parameters.outputs }}
if: inputs.use-rust-cache == 'true'
- name: Run tests (*nix)
- name: Run cargo test
working-directory: ${{ inputs.working-directory }}
shell: bash
# We want to run in Powershell on Windows to make sure we compile in a native Windows
# environment. Some things won't compile properly under msys, notably OpenSSL, which is
# compiled locally when using the `openssl` crate with the `vendored` feature.
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
run: |
${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} test --target ${{ inputs.target }} ${{ inputs.args }}
if: steps.determine-cargo-commands.outputs.test == 'true' && runner.os != 'Windows'
# We want to run in Powershell on Windows to make sure we compile in a
# native Windows environment. Some things won't compile properly under
# msys, notably OpenSSL, which is compiled locally when using the
# `openssl` crate with the `vendored` feature.
- name: Run tests (Windows)
${{ steps.set-build-command.outputs.build-command }} test --target ${{ inputs.target }} ${{ inputs.args }}
if: steps.determine-cargo-commands.outputs.test == 'true'
- name: Run cargo build
working-directory: ${{ inputs.working-directory }}
shell: powershell
# We want to run in Powershell on Windows to make sure we compile in a native Windows
# environment. Some things won't compile properly under msys, notably OpenSSL, which is
# compiled locally when using the `openssl` crate with the `vendored` feature.
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
run: |
& ${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} test --target ${{ inputs.target }} ${{ inputs.args }}
if: steps.determine-cargo-commands.outputs.test == 'true' && runner.os == 'Windows'
- name: Run benchmarks (*nix)
${{ steps.set-build-command.outputs.build-command }} build --target ${{ inputs.target }} ${{ inputs.args }}
if: steps.determine-cargo-commands.outputs.build == 'true'
- name: Run cargo ${{ steps.determine-cargo-commands.outputs.command }}
working-directory: ${{ inputs.working-directory }}
shell: bash
# We want to run in Powershell on Windows to make sure we compile in a native Windows
# environment. Some things won't compile properly under msys, notably OpenSSL, which is
# compiled locally when using the `openssl` crate with the `vendored` feature.
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
run: |
${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} bench --target ${{ inputs.target }} ${{ inputs.args }}
if: steps.determine-cargo-commands.outputs.bench == 'true' && runner.os != 'Windows'
- name: Run benchmarks (Windows)
working-directory: ${{ inputs.working-directory }}
shell: powershell
run: |
& ${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} bench --target ${{ inputs.target }} ${{ inputs.args }}
if: steps.determine-cargo-commands.outputs.bench == 'true' && runner.os == 'Windows'
- name: Build binary (*nix)
working-directory: ${{ inputs.working-directory }}
shell: bash
run: |
${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} build ${{ inputs.args }} --target ${{ inputs.target }}
if: steps.determine-cargo-commands.outputs.build == 'true' && runner.os != 'Windows'
- name: Build binary (Windows)
working-directory: ${{ inputs.working-directory }}
shell: powershell
run: |
& ${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} build ${{ inputs.args }} --target ${{ inputs.target }}
if: steps.determine-cargo-commands.outputs.build == 'true' && runner.os == 'Windows'
${{ steps.set-build-command.outputs.build-command }} ${{ steps.determine-cargo-commands.outputs.command }} --target ${{ inputs.target }} ${{ inputs.args }}
if: steps.determine-cargo-commands.outputs.command != ''
- name: Strip binary
working-directory: ${{ inputs.working-directory }}
shell: bash

View File

@@ -9,5 +9,5 @@ if [ "$COMMAND" == 'both' ]; then
echo "build=true" >>"$GITHUB_OUTPUT"
echo "test=true" >>"$GITHUB_OUTPUT"
else
echo "$COMMAND=true" >>"$GITHUB_OUTPUT"
echo "command=$COMMAND" >>"$GITHUB_OUTPUT"
fi

View File

@@ -2,7 +2,7 @@
node = "22.11.0"
"npm:prettier" = "3.4.1"
ruff = "0.8.3"
shellcheck = "v0.10.0"
shellcheck = "0.10.0"
shfmt = "v3.10.0"
taplo = "0.9.3"
typos = "1.28.1"

View File

@@ -35,7 +35,7 @@ def main():
file = os.environ["GITHUB_OUTPUT"]
with open(file, "w") as f:
for key, value in parameters.items():
f.write(f"{key}={value}")
f.write(f"{key}={value}\n")
def get_file_hash(build_command):

View File

@@ -24,6 +24,8 @@ struct Args {
expect_cross_version: Option<String>,
#[arg(long)]
expect_stripped: bool,
#[arg(long)]
is_subcrate: bool,
}
fn main() {
@@ -39,24 +41,27 @@ fn main() {
);
let checkout_root_path = PathBuf::from(args.checkout_root);
let bin_paths = vec![
checkout_root_path
.join("target")
.join(&args.target)
.join("debug")
.join("bin1"),
checkout_root_path
.join("target")
.join(&args.target)
.join("debug")
.join("bin2"),
checkout_root_path
let bin_paths = if args.is_subcrate {
vec![checkout_root_path
.join("subcrate")
.join("target")
.join(&args.target)
.join("debug")
.join("subcrate"),
];
.join("subcrate")]
} else {
vec![
checkout_root_path
.join("target")
.join(&args.target)
.join("debug")
.join("bin1"),
checkout_root_path
.join("target")
.join(&args.target)
.join("debug")
.join("bin2"),
]
};
for mut bin_path in bin_paths {
if cfg!(windows) {
@@ -74,7 +79,11 @@ fn check_cross(bin_dir: &Path, expect_cross: bool, expect_cross_version: Option<
let cross_path = bin_dir.join("cross");
if expect_cross {
assert!(cross_path.is_file(), "`cross` exists");
assert!(
cross_path.is_file(),
"`cross` exists at {}",
cross_path.display()
);
if let Some(expected_version) = expect_cross_version {
let output = Command::new(&cross_path)
@@ -85,7 +94,7 @@ fn check_cross(bin_dir: &Path, expect_cross: bool, expect_cross_version: Option<
.expect("`cross --version` stdout was not valid UTF-8");
assert!(
version.contains(expected_version),
"`cross` version matches expected version"
"`cross` version matches expected version: {expected_version}",
);
}
} else {
@@ -113,12 +122,16 @@ fn check_binary(bin_path: &PathBuf, expect_file_re: Option<&str>, expect_strippe
.output()
.expect("Failed to execute `file` command");
let file_output = String::from_utf8_lossy(&output.stdout);
println!(
"output from `file` for {}: {file_output}",
bin_path.display(),
);
if let Some(file_re) = expect_file_re {
let re = Regex::new(file_re).expect("Invalid regex");
assert!(
re.is_match(&file_output),
"`file` output for {} matches expected output",
"`file` output for {} matches `{file_re}`: `{file_output}`",
bin_path.display(),
);
}
@@ -131,24 +144,24 @@ fn check_binary(bin_path: &PathBuf, expect_file_re: Option<&str>, expect_strippe
if expect_stripped {
assert!(
!file_output.contains("not stripped"),
"`file` does not report {} as not stripped",
"`file` does not report {} as 'not stripped': `{file_output}`",
bin_path.display(),
);
assert!(
file_output.contains("stripped"),
"`file` reports {} as stripped",
"`file` reports {} as 'stripped': `{file_output}`",
bin_path.display(),
);
} else if cfg!(windows) {
assert!(
!file_output.contains("stripped"),
"`file` does not report {} as stripped",
"`file` does not report {} as 'stripped': `{file_output}`",
bin_path.display(),
);
} else {
assert!(
file_output.contains("not stripped"),
"`file` reports {} as not stripped",
"`file` reports {} as 'not stripped': `{file_output}`",
bin_path.display(),
);
}

109
set-cross-compile.py Executable file
View File

@@ -0,0 +1,109 @@
#!/usr/bin/env python3
# Written mostly by Claude.ai based on my original bash script.
import sys
import platform
import re
import os
from subprocess import run, PIPE, CalledProcessError
def main() -> int:
"""
Main function to determine cross-compilation requirements.
Returns:
Exit code (0 for success)
"""
if len(sys.argv) < 3:
print(
"Error: Target architecture and force cross arguments are required",
file=sys.stderr,
)
return 1
target = sys.argv[1]
force_use_cross = sys.argv[2]
if force_use_cross == "true":
needs_cross = True
else:
needs_cross = check_needs_cross(target)
write_github_output(needs_cross)
return 0
def check_needs_cross(target: str) -> bool:
"""
Determine if cross-compilation is needed based on system and target.
Args:
target: Target architecture string
Returns:
Boolean indicating if cross-compilation is needed
"""
system_info = get_uname_info().lower()
# Check if we're on macOS or Windows
if any(os in system_info for os in ["darwin", "msys", "windows"]):
return False
target = target.lower()
# Check for x86_64 Linux targets on x86_64 Linux host
if (
re.search(r"x86_64.+linux-(?:gnu|musl)", target)
and "x86_64" in system_info
and "linux" in system_info
):
return False
# It's tempting to not use cross when the host is Linux x86-64 and we're compiling for Linux
# i586 or i686. This sort of works, but if there's any C being compiled, things get weird,
# because then we need 32-bit C headers, 32-bit C libs to link to, etc.
# Check if both host and target are ARM Linux. I'm assuming here that for things like
# "arm-linux-androideabi" or "armv7-unknown-linux-ohos" we'd still need cross.
if (
re.search(r"(?:aarch64|arm).+linux-(?:gnu|musl)", target)
and ("arm" in system_info or "aarch64" in system_info)
and "linux" in system_info
):
return False
return True
def get_uname_info() -> str:
"""
Get system information using uname command.
Returns:
String containing system information
"""
try:
result = run(["uname", "-a"], check=True, text=True, stdout=PIPE)
return result.stdout
except (CalledProcessError, FileNotFoundError):
# Fallback to platform.platform() if uname is not available
return platform.platform()
def write_github_output(needs_cross: bool) -> None:
"""
Write the needs-cross output to GITHUB_OUTPUT environment variable file.
Args:
needs_cross: Boolean indicating if cross-compilation is needed
"""
github_output = os.getenv("GITHUB_OUTPUT")
if github_output:
with open(github_output, "a") as f:
f.write(f"needs-cross={str(needs_cross).lower()}\n")
if __name__ == "__main__":
sys.exit(main())

View File

@@ -1,25 +0,0 @@
#!/bin/bash
set -e
set -x
set -o pipefail
TARGET="$1"
# On macOS and Windows, we can cross-compile to all possible targets without
# using cross.
if uname -a | grep --quiet --extended-regexp -i "darwin|msys|windows"; then
echo "needs-cross=false" >>"$GITHUB_OUTPUT"
exit 0
fi
# On Linux, we should be able to cross-compile to i586 and i686, but in
# practice this fails with some crates, notably openssl with the "vendored"
# feature. This feature makes it compile openssl itself, which fails without
# cross.
if echo "$TARGET" | grep --quiet --extended-regexp -i 'x86_64.+linux-(gnu|musl)'; then
echo "needs-cross=false" >>"$GITHUB_OUTPUT"
exit 0
fi
echo "needs-cross=true" >>"$GITHUB_OUTPUT"

View File

@@ -19,7 +19,7 @@ path = "src/bin2.rs"
[package.metadata.cross.target.x86_64-unknown-netbsd]
pre-build = [
"mkdir -p /tmp/netbsd",
"curl https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/amd64/binary/sets/base.tar.xz -O",
"curl https://archive.netbsd.org/pub/NetBSD-archive/NetBSD-9.2/amd64/binary/sets/base.tar.xz -O",
"tar -C /tmp/netbsd -xJf base.tar.xz",
"cp /tmp/netbsd/usr/lib/libexecinfo.so /usr/local/x86_64-unknown-netbsd/lib",
"rm base.tar.xz",

View File

@@ -7,7 +7,7 @@ edition = "2021"
[package.metadata.cross.target.x86_64-unknown-netbsd]
pre-build = [
"mkdir -p /tmp/netbsd",
"curl https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/amd64/binary/sets/base.tar.xz -O",
"curl https://archive.netbsd.org/pub/NetBSD-archive/NetBSD-9.2/amd64/binary/sets/base.tar.xz -O",
"tar -C /tmp/netbsd -xJf base.tar.xz",
"cp /tmp/netbsd/usr/lib/libexecinfo.so /usr/local/x86_64-unknown-netbsd/lib",
"rm base.tar.xz",

View File

@@ -9,6 +9,8 @@ from typing import Dict, List, Union
import tempfile
import unittest
boolean_flags = {"cache_cross_binary", "force_use_cross", "strip", "use_rust_cache"}
class InputValidator:
"""Validate inputs for a GitHub Action."""
@@ -40,22 +42,6 @@ class InputValidator:
if "target" not in self.inputs:
validation_errors.append("'target' is a required parameter")
# Validate command if present
if "command" in self.inputs:
valid_commands = {"build", "test", "both", "bench"}
if self.inputs["command"] not in valid_commands:
validation_errors.append(
f"Invalid 'command'. Must be one of {sorted(valid_commands)}"
)
# Validate toolchain if present
if "toolchain" in self.inputs:
valid_toolchains = {"stable", "beta", "nightly"}
if self.inputs["toolchain"] not in valid_toolchains:
validation_errors.append(
f"Invalid 'toolchain'. Must be one of {sorted(valid_toolchains)}"
)
# Validate working directory if present
if "working_directory" in self.inputs:
path = Path(self.inputs["working_directory"])
@@ -72,10 +58,11 @@ class InputValidator:
)
# Validate boolean flags
boolean_flags = {"cache_cross_binary", "strip", "use_rust_cache"}
for flag in boolean_flags:
if flag in self.inputs and self.inputs[flag] not in {"true", "false"}:
validation_errors.append(f"'{flag}' must be either 'true' or 'false'")
# Turn the underscores into dashes
dashes = flag.replace("_", "-")
validation_errors.append(f"'{dashes}' must be either 'true' or 'false'")
# Validate rust-cache-parameters JSON if present
if "rust_cache_parameters" in self.inputs:
@@ -140,26 +127,15 @@ class TestInputValidator(unittest.TestCase):
errors = validator.validate()
self.assertTrue(errors)
def test_validate_valid_command(self) -> None:
"""Test validation of valid commands."""
valid_commands = ["build", "test", "both", "bench"]
for command in valid_commands:
self.setup_env({"target": "x86_64-unknown-linux-gnu", "command": command})
validator = InputValidator("/root")
errors = validator.validate()
self.assertFalse(errors, f"Command '{command}' should be valid")
def test_validate_invalid_command(self) -> None:
"""Test validation of invalid command."""
self.setup_env({"target": "x86_64-unknown-linux-gnu", "command": "invalid"})
validator = InputValidator("/root")
errors = validator.validate()
self.assertTrue(errors)
def test_validate_valid_toolchain(self) -> None:
"""Test validation of valid toolchains."""
valid_toolchains = ["stable", "beta", "nightly"]
valid_toolchains = [
"stable",
"beta",
"nightly",
"nightly-2025-03-17",
"stable 8 weeks ago",
]
for toolchain in valid_toolchains:
self.setup_env(
@@ -169,13 +145,6 @@ class TestInputValidator(unittest.TestCase):
errors = validator.validate()
self.assertFalse(errors, f"Toolchain '{toolchain}' should be valid")
def test_validate_invalid_toolchain(self) -> None:
"""Test validation of invalid toolchain."""
self.setup_env({"target": "x86_64-unknown-linux-gnu", "toolchain": "unknown"})
validator = InputValidator("/root")
errors = validator.validate()
self.assertTrue(errors)
def test_validate_working_directory(self) -> None:
"""Test validation of working directory."""
with tempfile.TemporaryDirectory() as temp_dir:
@@ -212,7 +181,6 @@ class TestInputValidator(unittest.TestCase):
def test_validate_boolean_flags(self) -> None:
"""Test validation of boolean flags."""
boolean_flags = ["cache-cross-binary", "strip", "use-rust-cache"]
# Test valid boolean values
for flag in boolean_flags: