53 Commits

Author SHA1 Message Date
Dave Rolsky
ad283b2fc6 Install musl-tools if the target name contains "musl"
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 8s
Self-test / Test (map[cache-cross-binary:false can_test:true cross-version:19be834 expect_cross:--expect-cross expect_cross_version:19be834 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 with cross 19be834 t… (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:false can_test:true cross-version:v0.2.3 expect_cross:--expect-cross expect_cross_version:0.2.3 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 with cross v0.2.3 (no c… (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:false can_test:true expect_cross:--expect-cross expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 (no cache) target:aarch64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+FreeBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+NetBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:false expect_cross:--no-expect-cross expect_file_re:Aarch64.+Windows expect_stripped:--no-expect-stripped os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:false expect_cross:--no-expect-cross expect_file_re:Mach-O.+arm64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true cross-version:19be834 expect_cross:--expect-cross expect_cross_version:19be834 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 with cross 19be834 ta… (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true cross-version:v0.2.3 expect_cross:--expect-cross expect_cross_version:0.2.3 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 with cross v0.2.3 target… (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:32.+ARM expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:32.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:64.+RISC-V expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:64.+S/390 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:ELF.+80386 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:ELF.+80386 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-i686 target:i686-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--no-expect-cross expect_file_re:80386.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--no-expect-cross expect_file_re:ELF.+x86-64 expect_stripped:--expect-stripped os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--no-expect-cross expect_file_re:Mach-O.+x86_64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_file_re:x86-64.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
2024-08-25 12:08:48 -05:00
Dave Rolsky
52a0827e28 Fix README - tests still fail on non-x86 Windows 2024-08-20 16:40:37 -05:00
Dave Rolsky
e4e3cc18ae Update README to remove bit about tests not working on Windows or macOS ARM 2024-08-20 16:38:47 -05:00
Dave Rolsky
46b4378cc7 Add release date to changes
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 8s
Self-test / Test (map[cache-cross-binary:false can_test:true cross-version:19be834 expect_cross:--expect-cross expect_cross_version:19be834 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 with cross 19be834 t… (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:false can_test:true cross-version:v0.2.3 expect_cross:--expect-cross expect_cross_version:0.2.3 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 with cross v0.2.3 (no c… (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:false can_test:true expect_cross:--expect-cross expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 (no cache) target:aarch64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+FreeBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+NetBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:false expect_cross:--no-expect-cross expect_file_re:Aarch64.+Windows expect_stripped:--no-expect-stripped os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:false expect_cross:--no-expect-cross expect_file_re:Mach-O.+arm64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true cross-version:19be834 expect_cross:--expect-cross expect_cross_version:19be834 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 with cross 19be834 ta… (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true cross-version:v0.2.3 expect_cross:--expect-cross expect_cross_version:0.2.3 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 with cross v0.2.3 target… (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:32.+ARM expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:32.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:64.+RISC-V expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:64.+S/390 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:ELF.+80386 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:ELF.+80386 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-i686 target:i686-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--expect-cross expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--no-expect-cross expect_file_re:80386.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--no-expect-cross expect_file_re:ELF.+x86-64 expect_stripped:--expect-stripped os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_cross:--no-expect-cross expect_file_re:Mach-O.+x86_64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[cache-cross-binary:true can_test:true expect_file_re:x86-64.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
2024-05-18 13:22:04 +08:00
Dave Rolsky
e67629a125 Run some tests without caching disabled 2024-05-18 13:19:55 +08:00
Dave Rolsky
83cb238ff9 Force install from git to make sure we can always find cross binary 2024-05-18 12:53:41 +08:00
Dave Rolsky
b80da53df0 Add test for cross from git 2024-05-18 12:40:50 +08:00
Dave Rolsky
6f63b60be6 Tighten regex for release version 2024-05-18 12:40:50 +08:00
Dave Rolsky
ace37a7d90 Print cross version after it's installed 2024-05-18 12:40:50 +08:00
Dave Rolsky
2297f8e434 Add typos command for linting and tidying and fix issues it found 2024-05-18 12:28:18 +08:00
Dave Rolsky
9b467e6799 Add shell linting and tidying and update all shell scripts 2024-05-18 12:28:18 +08:00
Dave Rolsky
c464bd9469 Make it possible to install cross from a git tag 2024-05-18 12:28:18 +08:00
Dave Rolsky
a0b2ccd631 Add more info for latest Changes.md entry 2024-02-25 18:08:12 +08:00
Dave Rolsky
8c9b9d6490 Add Changes.md entry for 0.0.12
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 8s
Self-test / Test (map[can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+FreeBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+NetBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--no-expect-cross expect_file_re:Aarch64.+Windows expect_stripped:--no-expect-stripped os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--no-expect-cross expect_file_re:Mach-O.+arm64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true cross-version:v0.2.3 expect_cross:--expect-cross expect_cross_version:0.2.3 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64-with-cross-v0.2.3 target:aarch64-unknown-linux-m… (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:32.+ARM expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:32.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+RISC-V expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+S/390 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:ELF.+80386 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:ELF.+80386 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-i686 target:i686-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:80386.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:ELF.+x86-64 expect_stripped:--expect-stripped os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:Mach-O.+x86_64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_file_re:x86-64.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
2024-02-25 18:07:08 +08:00
Dave Rolsky
778bb6075f Bump actions/checkout to v4 2024-02-25 18:05:42 +08:00
Dave Rolsky
1bbdab0f68 Merge pull request #13 from hms5232/bump-actions/cache-v4
Bump actions/cache to v4
2024-02-25 18:04:58 +08:00
hms5232
c40662f61a Bump actions/cache to v4
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
2024-02-25 17:47:18 +08:00
Dave Rolsky
7d5643fe34 Small formatting tweak in test code 2024-02-12 19:24:26 +08:00
Dave Rolsky
3be49880a3 Add workaround for NetBSD issues in test-project 2024-01-27 15:23:30 +08:00
Dave Rolsky
070eee0271 Remove the Linux MIPS targets from the tests
This target is no longer supported by the Rust compiler.
2024-01-27 15:19:38 +08:00
Dave Rolsky
d4b2d5201c Add release date to Changes.md
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 8s
Self-test / Test (map[can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+FreeBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+NetBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--no-expect-cross expect_file_re:Aarch64.+Windows expect_stripped:--no-expect-stripped os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--no-expect-cross expect_file_re:Mach-O.+arm64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true cross-version:v0.2.3 expect_cross:--expect-cross expect_cross_version:0.2.3 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64-with-cross-v0.2.3 target:aarch64-unknown-linux-m… (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:32.+ARM expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:32.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+RISC-V expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+S/390 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:ELF.+80386 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:ELF.+80386 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-i686 target:i686-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS32.+mips- expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mips target:mips-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS32.+mipsel- expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mipsel target:mipsel-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mips64 target:mips64-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mips64el target:mips64el-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:80386.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:ELF.+x86-64 expect_stripped:--expect-stripped os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:Mach-O.+x86_64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_file_re:x86-64.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
2023-12-17 09:53:53 -06:00
Dave Rolsky
e1ea800ed7 Use cross when building for Linux 32-bit targets
While in theory this should work without `cross`, compiling `openssl` with the
`vendored` feature fails when we run `cargo build --target i686-unknown-linux-musl`.
2023-12-17 09:51:41 -06:00
Dave Rolsky
fc51bd6dfd Small wording tweak in README.md 2023-12-10 17:43:14 -06:00
Dave Rolsky
d02a87e838 Replace "binary" with "binaries" in docs 2023-12-10 17:42:14 -06:00
Dave Rolsky
3de92613ad Add release date to Changes.md
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 9s
Self-test / Test (map[can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+FreeBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+NetBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--no-expect-cross expect_file_re:Aarch64.+Windows expect_stripped:--no-expect-stripped os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--no-expect-cross expect_file_re:Mach-O.+arm64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true cross-version:v0.2.3 expect_cross:--expect-cross expect_cross_version:0.2.3 expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64-with-cross-v0.2.3 target:aarch64-unknown-linux-m… (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:32.+ARM expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:32.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+RISC-V expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+S/390 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS32.+mips- expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mips target:mips-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS32.+mipsel- expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mipsel target:mipsel-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mips64 target:mips64-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mips64el target:mips64el-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:80386.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:ELF.+80386 expect_stripped:--expect-stripped os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:ELF.+x86-64 expect_stripped:--expect-stripped os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:Mach-O.+x86_64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_file_re:x86-64.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
2023-12-10 17:40:22 -06:00
Dave Rolsky
c507aeb1b5 Handle multiple binaries in one crate 2023-12-10 11:21:49 -06:00
Dave Rolsky
9fb7236944 Remove unused test code 2023-12-10 11:21:49 -06:00
Dave Rolsky
883c7a0854 Add cross-version parameter to specify cross version 2023-12-10 10:58:39 -06:00
Dave Rolsky
ef5051e603 Fix typo in README.md 2023-12-10 10:31:19 -06:00
Dave Rolsky
e89db86c83 Fix action name
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 7s
Self-test / Test (map[can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+FreeBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--expect-cross expect_file_re:x86-64.+NetBSD expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--no-expect-cross expect_file_re:Aarch64.+Windows expect_stripped:--no-expect-stripped os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:--no-expect-cross expect_file_re:Mach-O.+arm64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:32.+ARM expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:32.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+PowerPC expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+RISC-V expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:64.+S/390 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS32.+mips- expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mips target:mips-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS32.+mipsel- expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mipsel target:mipsel-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mips64 target:mips64-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:MIPS64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-mips64el target:mips64el-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--expect-cross expect_file_re:aarch64 expect_stripped:--no-expect-stripped os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:80386.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:ELF.+80386 expect_stripped:--expect-stripped os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:ELF.+x86-64 expect_stripped:--expect-stripped os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:--no-expect-cross expect_file_re:Mach-O.+x86_64 expect_stripped:--expect-stripped os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_file_re:x86-64.+Windows expect_stripped:--expect-stripped os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
I didn't mean to change this.
2023-09-10 15:16:02 -05:00
Dave Rolsky
d3cc976c26 Fix typo in README.md 2023-09-10 15:12:49 -05:00
aaronvg
42fe96a4c1 Add support for a "working-directory" parameter
This commit updates the tests to check that this works and also rewrites the
test script from Bash to Perl.

Co-authored-by: Dave Rolsky <autarch@urth.org>
2023-09-10 15:12:49 -05:00
Dave Rolsky
77a5caf54b Add release date for 0.0.8
Some checks failed
Lint / Check that code is lint clean using precious (push) Failing after 8s
Self-test / Test (map[can_test:false expect_cross:false expect_file:Aarch64.+Windows expect_stripped:false os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:false expect_file:Mach-O.+arm64 expect_stripped:true os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+FreeBSD expect_stripped:false os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+NetBSD expect_stripped:false os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:80386.+Windows expect_stripped:true os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+80386 expect_stripped:true os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+x86-64 expect_stripped:true os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:Mach-O.+x86_64 expect_stripped:true os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:x86-64.+Windows expect_stripped:true os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+ARM expect_stripped:false os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+RISC-V expect_stripped:false os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+S/390 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mips- expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips target:mips-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mipsel- expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mipsel target:mipsel-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips64 target:mips64-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips64el target:mips64el-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:aarch64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
2023-07-22 11:32:39 -05:00
Dave Rolsky
7c7b8fbbff Add lint workflow for GH Actions 2023-07-22 11:31:06 -05:00
Dave Rolsky
ab89553767 Update precious config to line wrap all Markdown files 2023-07-22 11:28:43 -05:00
Dave Rolsky
5d15c12d99 Note that Swatinem/rust-cache just works with this action 2023-07-22 11:26:35 -05:00
Dave Rolsky
b1e766fe8f Add caching of the installed cross binary 2023-07-22 11:17:30 -05:00
Dave Rolsky
dd8fb2fac4 Fix tests to always test the commit that was just pushed 2023-07-22 11:14:46 -05:00
Dave Rolsky
ab3f022734 Remove anything related to installing cross on Windows
There are no targets on Windows that require cross so this is never getting
invoked.
2023-07-22 09:51:24 -05:00
Dave Rolsky
e41de97f0a Fix incorrect step name 2023-07-22 09:27:13 -05:00
Dave Rolsky
d788e00f15 Always pass "+toolchain" to cargo or cross
Some checks failed
Self-test / Test (map[can_test:false expect_cross:false expect_file:Aarch64.+Windows expect_stripped:false os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:false expect_file:Mach-O.+arm64 expect_stripped:true os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+FreeBSD expect_stripped:false os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+NetBSD expect_stripped:false os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:80386.+Windows expect_stripped:true os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+80386 expect_stripped:true os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+x86-64 expect_stripped:true os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:Mach-O.+x86_64 expect_stripped:true os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:x86-64.+Windows expect_stripped:true os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+ARM expect_stripped:false os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+RISC-V expect_stripped:false os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+S/390 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mips- expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips target:mips-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mipsel- expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mipsel target:mipsel-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips64 target:mips64-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips64el target:mips64el-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:aarch64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
I don't think this was actually using the specified toolchain, at least not
when cross compiling.
2023-04-21 23:14:21 -05:00
Dave Rolsky
356ca41f7d Make strip script strip all binaries under target
Some checks failed
Self-test / Test (map[can_test:false expect_cross:false expect_file:Aarch64.+Windows expect_stripped:false os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:false expect_file:Mach-O.+arm64 expect_stripped:true os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+FreeBSD expect_stripped:false os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+NetBSD expect_stripped:false os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:80386.+Windows expect_stripped:true os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+80386 expect_stripped:true os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+x86-64 expect_stripped:true os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:Mach-O.+x86_64 expect_stripped:true os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:x86-64.+Windows expect_stripped:true os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+ARM expect_stripped:false os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+RISC-V expect_stripped:false os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+S/390 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mips- expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips target:mips-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mipsel- expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mipsel target:mipsel-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips64 target:mips64-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips64el target:mips64el-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:aarch64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
If there were both debug & release dirs it would only strip one binary, and if
the debug dir had no binary at all it would error, even if the release dir had
one.
2023-04-21 22:39:30 -05:00
Dave Rolsky
91d78d9182 Use dtolnay/rust-toolchain@master instead of @stable
Some checks failed
Self-test / Test (map[can_test:false expect_cross:false expect_file:Aarch64.+Windows expect_stripped:false os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:false expect_file:Mach-O.+arm64 expect_stripped:true os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+FreeBSD expect_stripped:false os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+NetBSD expect_stripped:false os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:80386.+Windows expect_stripped:true os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+80386 expect_stripped:true os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+x86-64 expect_stripped:true os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:Mach-O.+x86_64 expect_stripped:true os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:x86-64.+Windows expect_stripped:true os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+ARM expect_stripped:false os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+RISC-V expect_stripped:false os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+S/390 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mips- expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips target:mips-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mipsel- expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mipsel target:mipsel-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips64 target:mips64-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips64el target:mips64el-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:aarch64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
This allows passing the `toolchain` input.
2023-03-20 12:18:06 -04:00
Dave Rolsky
30e7adeceb Add toolchain input to README.md docs 2023-03-19 17:43:22 -04:00
Dave Rolsky
ec63efbd36 Changes for 0.0.4
Some checks failed
Self-test / Test (map[can_test:false expect_cross:false expect_file:Aarch64.+Windows expect_stripped:false os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:false expect_file:Mach-O.+arm64 expect_stripped:true os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+FreeBSD expect_stripped:false os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+NetBSD expect_stripped:false os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:80386.+Windows expect_stripped:true os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+80386 expect_stripped:true os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+x86-64 expect_stripped:true os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:Mach-O.+x86_64 expect_stripped:true os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:x86-64.+Windows expect_stripped:true os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+ARM expect_stripped:false os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC expect_stripped:false os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+RISC-V expect_stripped:false os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+S/390 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mips- expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips target:mips-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mipsel- expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mipsel target:mipsel-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips64 target:mips64-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-mips64el target:mips64el-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:aarch64 expect_stripped:false os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
2023-03-19 17:41:41 -04:00
Dave Rolsky
54e4a464ed Remove tests that $PATH is left alone
This test isn't really needed, and it's causing spurious CI failures because
it's hitting GitHub API rate limits.
2023-03-19 17:41:41 -04:00
Dave Rolsky
d1d76ade32 Fix stripping and test it 2023-03-19 17:41:41 -04:00
Dave Rolsky
2bfd2f169a Fix target to use the input, not a matrix 2023-03-19 11:03:24 -04:00
Dave Rolsky
42a1f46405 Add support for specifying which toolchain to use 2023-03-19 11:03:05 -04:00
Dave Rolsky
58c5e42ace Pass GITHUB_TOKEN in self-test workflow 2023-03-17 11:17:02 -04:00
Dave Rolsky
2f68f636e2 Add support for running test command as well as build
Some checks failed
Self-test / Test (map[can_test:false expect_cross:false expect_file:Aarch64.+Windows os:windows-latest platform_name:Windows-aarch64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:false expect_file:Mach-O.+arm64 os:macOS-latest platform_name:macOS-aarch64 target:aarch64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+FreeBSD os:ubuntu-20.04 platform_name:FreeBSD-x86_64 target:x86_64-unknown-freebsd]) (push) Has been cancelled
Self-test / Test (map[can_test:false expect_cross:true expect_file:x86-64.+NetBSD os:ubuntu-20.04 platform_name:NetBSD-x86_64 target:x86_64-unknown-netbsd]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:80386.+Windows os:windows-latest platform_name:Windows-i686 target:i686-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+80386 os:ubuntu-20.04 platform_name:Linux-i586 target:i586-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:ELF.+x86-64 os:ubuntu-20.04 platform_name:Linux-x86_64 target:x86_64-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:Mach-O.+x86_64 os:macOS-latest platform_name:macOS-x86_64 target:x86_64-apple-darwin]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:false expect_file:x86-64.+Windows os:windows-latest platform_name:Windows-x86_64 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+ARM os:ubuntu-20.04 platform_name:Linux-arm target:arm-unknown-linux-musleabi]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:32.+PowerPC os:ubuntu-20.04 platform_name:Linux-powerpc target:powerpc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC os:ubuntu-20.04 platform_name:Linux-powerpc64 target:powerpc64-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+PowerPC os:ubuntu-20.04 platform_name:Linux-powerpc64le target:powerpc64le-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+RISC-V os:ubuntu-20.04 platform_name:Linux-riscv64 target:riscv64gc-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:64.+S/390 os:ubuntu-20.04 platform_name:Linux-s390x target:s390x-unknown-linux-gnu]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mips- os:ubuntu-20.04 platform_name:Linux-mips target:mips-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS32.+mipsel- os:ubuntu-20.04 platform_name:Linux-mipsel target:mipsel-unknown-linux-musl]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 os:ubuntu-20.04 platform_name:Linux-mips64 target:mips64-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:MIPS64 os:ubuntu-20.04 platform_name:Linux-mips64el target:mips64el-unknown-linux-muslabi64]) (push) Has been cancelled
Self-test / Test (map[can_test:true expect_cross:true expect_file:aarch64 os:ubuntu-20.04 platform_name:Linux-aarch64 target:aarch64-unknown-linux-musl]) (push) Has been cancelled
2023-03-17 11:12:36 -04:00
Dave Rolsky
5bd32448aa Add self-test workflow 2023-03-12 18:30:36 -04:00
Dave Rolsky
4dfe96e52b Add Rust project for self-testing 2023-03-12 10:37:46 -04:00
28 changed files with 5890 additions and 97 deletions

25
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Lint
on: [push, pull_request]
env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
lint:
name: Check that code is lint clean using precious
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git
run: |
git config --global user.email "jdoe@example.com"
git config --global user.name "J. Doe"
- name: Run install-dev-tools.sh
run: |
set -e
mkdir $HOME/bin
./dev/bin/install-dev-tools.sh
- name: Run precious
run: |
PATH=$PATH:$HOME/bin precious lint -a

273
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,273 @@
name: Self-test
on:
push:
pull_request:
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
platform:
- platform_name: FreeBSD-x86_64
os: ubuntu-20.04
target: x86_64-unknown-freebsd
cache-cross-binary: true
expect_file_re: "x86-64.+FreeBSD"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: false
- platform_name: Linux-x86_64
os: ubuntu-20.04
target: x86_64-unknown-linux-musl
cache-cross-binary: true
expect_file_re: "ELF.+x86-64"
expect_cross: "--no-expect-cross"
expect_stripped: "--expect-stripped"
can_test: true
- platform_name: Linux-aarch64
os: ubuntu-20.04
target: aarch64-unknown-linux-musl
cache-cross-binary: true
expect_file_re: "aarch64"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-aarch64 (no cache)
os: ubuntu-20.04
target: aarch64-unknown-linux-musl
cache-cross-binary: false
expect_file_re: "aarch64"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-aarch64 with cross v0.2.3
os: ubuntu-20.04
target: aarch64-unknown-linux-musl
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: "--no-expect-stripped"
can_test: true
- platform_name: Linux-aarch64 with cross v0.2.3 (no cache)
os: ubuntu-20.04
target: aarch64-unknown-linux-musl
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: "--no-expect-stripped"
can_test: true
- platform_name: Linux-aarch64 with cross 19be834
os: ubuntu-20.04
target: aarch64-unknown-linux-musl
cross-version: "19be834"
cache-cross-binary: true
expect_file_re: "aarch64"
expect_cross: "--expect-cross"
expect_cross_version: "19be834"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-aarch64 with cross 19be834
os: ubuntu-20.04
target: aarch64-unknown-linux-musl
cross-version: "19be834"
cache-cross-binary: false
expect_file_re: "aarch64"
expect_cross: "--expect-cross"
expect_cross_version: "19be834"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-arm
os: ubuntu-20.04
target: arm-unknown-linux-musleabi
cache-cross-binary: true
expect_file_re: "32.+ARM"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-i586
os: ubuntu-20.04
target: i586-unknown-linux-musl
cache-cross-binary: true
expect_file_re: "ELF.+80386"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-i686
os: ubuntu-20.04
target: i686-unknown-linux-musl
cache-cross-binary: true
expect_file_re: "ELF.+80386"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-powerpc
os: ubuntu-20.04
target: powerpc-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "32.+PowerPC"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-powerpc64
os: ubuntu-20.04
target: powerpc64-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "64.+PowerPC"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-powerpc64le
os: ubuntu-20.04
target: powerpc64le-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "64.+PowerPC"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-riscv64
os: ubuntu-20.04
target: riscv64gc-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "64.+RISC-V"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: Linux-s390x
os: ubuntu-20.04
target: s390x-unknown-linux-gnu
cache-cross-binary: true
expect_file_re: "64.+S/390"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: true
- platform_name: NetBSD-x86_64
os: ubuntu-20.04
target: x86_64-unknown-netbsd
cache-cross-binary: true
expect_file_re: "x86-64.+NetBSD"
expect_cross: "--expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: false
- platform_name: Windows-aarch64
os: windows-latest
target: aarch64-pc-windows-msvc
cache-cross-binary: true
expect_file_re: "Aarch64.+Windows"
expect_cross: "--no-expect-cross"
expect_stripped: "--no-expect-stripped"
can_test: false
- platform_name: Windows-i686
os: windows-latest
target: i686-pc-windows-msvc
cache-cross-binary: true
expect_file_re: "80386.+Windows"
expect_cross: "--no-expect-cross"
expect_stripped: "--expect-stripped"
can_test: true
- platform_name: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
cache-cross-binary: true
expect_file_re: "x86-64.+Windows"
expect_stripped: "--expect-stripped"
can_test: true
- platform_name: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
cache-cross-binary: true
expect_file_re: "Mach-O.+x86_64"
expect_cross: "--no-expect-cross"
expect_stripped: "--expect-stripped"
can_test: true
- platform_name: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
cache-cross-binary: true
expect_file_re: "Mach-O.+arm64"
expect_cross: "--no-expect-cross"
expect_stripped: "--expect-stripped"
can_test: false
runs-on: ${{ matrix.platform.os }}
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: Run both commands
uses: ./
with:
command: both
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
target: ${{ matrix.platform.target }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.platform.can_test }}
- name: Run test command
uses: ./
with:
command: test
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
target: ${{ matrix.platform.target }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.platform.can_test }}
- name: Run build command
uses: ./
with:
command: build
cross-version: ${{ matrix.platform.cross-version }}
cache-cross-binary: ${{ matrix.platform.cache-cross-binary }}
target: ${{ matrix.platform.target }}
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: Check binary and cross on ${{ matrix.platform.platform_name }}
shell: bash
run: |
tests/check-binary.pl \
--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 }}

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@
/package.json
.\#*
\#*\#
test-project/**/target/**

View File

@@ -2,17 +2,15 @@
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age,
body size, disability, ethnicity, gender identity and expression, level of
experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers
pledge to making participation in our project and our community a harassment-free experience for
everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level
of experience, education, socio-economic status, nationality, personal appearance, race, religion,
or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
@@ -22,53 +20,46 @@ include:
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- Publishing others' private information, such as a physical or electronic address, without explicit
permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are
expected to take appropriate and fair corrective action in response to any instances of unacceptable
behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or
to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an
appointed representative at an online or offline event. Representation of a
project may be further defined and clarified by project maintainers.
This Code of Conduct applies both within project spaces and in public spaces when an individual is
representing the project or its community. Examples of representing a project or community include
using an official project e-mail address, posting via an official social media account, or acting as
an appointed representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at autarch@urth.org. All complaints
will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is obligated
to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting
the project team at autarch@urth.org. All complaints will be reviewed and investigated and will
result in a response that is deemed necessary and appropriate to the circumstances. The project team
is obligated to maintain confidentiality with regard to the reporter of an incident. Further details
of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face
temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org

View File

@@ -1,3 +1,74 @@
## 0.0.14 - 2024-08-25
- When the given `target` includes the string `musl`, this action will install the `musl-tools`
package. This allows crates with C or C++ code to compile properly. Fixes #20. Reported by Matteo
Pietro Dazzi (@ilteoood).
## 0.0.13 - 2024-05-18
- It's now possible to set `cross-version` to a git ref like a commit hash or `HEAD`. This will
install `cross` from its git repo.
## 0.0.12 - 2024-02-25
- Bumped the version of `actions/cache` used in this action to v4. The v3 version uses Node 16,
which causes warnings when run. Implemented by @hms5232. GH #13.
## 0.0.11 - 2023-12-17
- Use `cross` when compiling for 32-bit Linux targets. While in theory this should work without
`cross`, compiling `openssl` with the `vendored` feature fails when we run
`cargo build --target i686-unknown-linux-musl`.
## 0.0.10 - 2023-12-10
- Fixed handling of crates with multiple binaries. Attempting to strip binaries for such a crate
caused the build to fail. Reported by Tomaž Hribernik. GH #8
- Added a new `cross-version` parameter. This can be specified to make this action use a specific
version of `cross`. If this is not specified, the latest version will be used.
## 0.0.9 - 2023-09-10
- Added a `working-directory` parameter. By default this is the current directory (`.`) but you can
set it to something else to compile a single crate or workspace in a subdirectory of the repo.
This allows you to use this action with monorepos with multiple crates. Based on GH #7 by
@aaronvg.
## 0.0.8 - 2023-07-22
- For builds that need the `cross` binary, this binary is now cached. A cache hit saves about 20
seconds in my tests. Suggested by @timon-schelling. GH #4.
## 0.0.7 - 2023-04-21
- The toolchain argument was (probably) not being respected with cross builds, though it's hard to
be sure since none of the output from past CI runs I've looked at it includes the toolchain
version in the output. But now the toolchain version is explicitly passed to all `cargo` and
`cross` commands.
## 0.0.6 - 2023-04-21
- When the `strip` parameter was true, stripping binaries could fail if there were both
`target/*/debug` and `target/*/release` directories present and the `debug` directory didn't have
a binary. Now it will strip all binaries it finds under `target`.
## 0.0.5 - 2023-03-19
- Fix use of `dtolnay/rust-toolchain` action to allow passing a `toolchain` input.
## 0.0.4 - 2023-03-19
- Added a new `toolchain` parameter to allow selecting a Rust toolchain other than stable. This
supports picking on of "stable", "beta", or "nightly".
- Fixed binary stripping to work in more situations. Previously it depended on a very specific setup
plus expected to be run in the context of the matrix I use for my own projects.
- Fixed a reference to a matrix variable that should have referenced an input variable.
## 0.0.3 - 2023-03-17
- This action now supports running the `build` and `test` commands, or both, with a new input
parameter, `command`. The default is `build`.
## 0.0.2 - 2023-03-05
- Fixed some typos in the `README.md` documentation.

View File

@@ -18,18 +18,21 @@ jobs:
target: x86_64-unknown-freebsd
bin: precious
name: precious-FreeBSD-x86_64.tar.gz
command: build
- release_for: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
bin: precious.exe
name: precious-Windows-x86_64.zip
command: both
- release_for: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
bin: precious
name: precious-Darwin-x86_64.tar.gz
command: both
# more release targets here ...
@@ -40,6 +43,7 @@ jobs:
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
@@ -51,16 +55,20 @@ jobs:
This action takes the following parameters:
| Key | Type | Required? | Description |
| -------------- | --------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `target` | string | yes | The target triple to compile for. This should be one of the targets listed by running `rustup target list`. |
| `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 binary will be stripped if possible. This is only possible for binaries which weren't cross-compiled. |
| Key | Type | Required? | Description |
| ------------------- | ---------------------------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command` | string (one of `build`, `test`, or `both`) | 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. |
## How it Works
Under the hood, this action will compile your binary with either `cargo` or `cross`, depending on
Under the hood, this action will compile your binaries with either `cargo` or `cross`, depending on
the host machine and target. For Linux builds, it will always use `cross` except for builds
targeting an x86 architecture like `x86_64` or `i686`.
@@ -74,6 +82,12 @@ 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.
Finally, it will run `strip` to strip the binary if the `strip` parameter is true. This is only
Finally, it will run `strip` to strip the binaries 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 Rust Compilation Output
You can use the [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) action with this one
seamlessly, whether or not a specific build target needs `cross`. There is no special configuration
that you need for this. It just works.

View File

@@ -6,12 +6,23 @@ branding:
description: |
Cross compile your Rust projects with cross (https://github.com/cross-rs/cross).
inputs:
working-directory:
description: The working directory for each step
default: "."
command:
description: |
The commands to run (one of "build", "test", or "both").
default: build
target:
description: The target platform
required: true
toolchain:
description: |
The target toolchain to use (one of "stable", "beta", or "nightly").
default: stable
GITHUB_TOKEN:
description: |
A GitHub token, available in the secrets.GITHUB_TOKEN context variable.
A GitHub token, available in the secrets.GITHUB_TOKEN working-directory variable.
default: ${{ github.token }}
args:
description: |
@@ -21,6 +32,15 @@ inputs:
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
runs:
using: composite
steps:
@@ -31,44 +51,77 @@ runs:
id: determine-cross-compile
shell: bash
run: set-cross-compile.sh ${{ inputs.target }}
- name: Install toolchain if not cross-compiling
uses: dtolnay/rust-toolchain@stable
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
targets: ${{ matrix.platform.target }}
if: ${{ steps.determine-cross-compile.outputs.needs-cross == 'false' }}
targets: ${{ inputs.target }}
toolchain: ${{ inputs.toolchain }}
- name: Determine cross version
id: determine-cross-version
shell: bash
run: determine-cross-version.sh "${{ inputs.cross-version }}"
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
id: set-cross-dir
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 }}
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
if: ${{ steps.determine-cross-compile.outputs.needs-cross == 'true' && runner.os != 'Windows' }}
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
- name: Install cross if cross-compiling (Windows)
shell: powershell
run: install-cross-windows.ps1
if: ${{ steps.determine-cross-compile.outputs.needs-cross == 'true' && runner.os == 'Windows' }}
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: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
if: contains(inputs.target, 'musl')
- name: Set build command
id: set-build-command
shell: bash
run: set-build-command.sh
- name: Build binary (*nix)
run: set-build-command.sh ${{ steps.set-cross-dir.outputs.cross-dir }}
- name: Run tests (*nix)
working-directory: ${{ inputs.working-directory }}
shell: bash
run: |
${{ steps.set-build-command.outputs.build-command }} build ${{ inputs.args }} --target ${{ inputs.target }}
if: ${{ runner.os != 'Windows' }}
${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} test ${{ inputs.args }} --target ${{ inputs.target }}
if: ${{ inputs.command != 'build' && 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: Build binary (Windows)
- name: Run tests (Windows)
working-directory: ${{ inputs.working-directory }}
shell: powershell
run: |
& ${{ steps.set-build-command.outputs.build-command }} build ${{ inputs.args }} --target ${{ inputs.target }}
if: ${{ runner.os == 'Windows' }}
- name: Strip binary
& ${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} test ${{ inputs.args }} --target ${{ inputs.target }}
if: ${{ inputs.command != 'build' && runner.os == 'Windows' }}
- name: Build binary (*nix)
working-directory: ${{ inputs.working-directory }}
shell: bash
run: |
strip target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}
${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} build ${{ inputs.args }} --target ${{ inputs.target }}
if: ${{ inputs.command != 'test' && 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: ${{ inputs.command != 'test' && runner.os == 'Windows' }}
- name: Strip binary
working-directory: ${{ inputs.working-directory }}
shell: bash
run: strip-binary.sh ${{ inputs.target }}
# strip doesn't work with cross-arch binaries on Linux or Windows.
if: ${{ inputs.strip == 'true' && steps.determine-cross-compile.outputs.needs-cross == 'false' && inputs.target != 'aarch64-pc-windows-msvc' }}
if: ${{ inputs.command != 'test' && inputs.strip == 'true' && steps.determine-cross-compile.outputs.needs-cross == 'false' && inputs.target != 'aarch64-pc-windows-msvc' }}

17
determine-cross-version.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -e
set -x
set -o pipefail
VERSION=$1
if [ -z "$VERSION" ]; then
JSON=$(curl \
--request GET \
--header "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/cross-rs/cross/releases/latest)
VERSION=$(echo "$JSON" | jq -r ".tag_name")
fi
echo "cross-version=$VERSION" >>"$GITHUB_OUTPUT"

View File

@@ -1,29 +1,37 @@
#!/bin/bash
set -eo pipefail
set -x
function run () {
echo $1
eval $1
function run() {
echo "$1"
eval "$1"
}
function install_tools () {
function install_tools() {
curl --silent --location \
https://raw.githubusercontent.com/houseabsolute/ubi/master/bootstrap/bootstrap-ubi.sh |
https://raw.githubusercontent.com/houseabsolute/ubi/master/bootstrap/bootstrap-ubi.sh |
sh
run "rustup component add clippy"
run "ubi --project houseabsolute/precious --in ~/bin"
run "ubi --project houseabsolute/precious --in $HOME/bin"
run "ubi --project houseabsolute/omegasort --in $HOME/bin"
run "ubi --project koalaman/shellcheck --in $HOME/bin"
run "ubi --project mvdan/sh --in $HOME/bin --exe shfmt"
run "ubi --project crate-ci/typos --in $HOME/bin"
run "npm install prettier"
run "curl -L https://cpanmin.us/ -o $HOME/bin/cpanm"
run "chmod 0755 $HOME/bin/cpanm"
run "$HOME/bin/cpanm --sudo --notest Perl::Tidy"
}
if [ "$1" == "-v" ]; then
set -x
fi
mkdir -p $HOME/bin
mkdir -p "$HOME"/bin
set +e
echo ":$PATH:" | grep --extended-regexp ":$HOME/bin:" >& /dev/null
echo ":$PATH:" | grep --extended-regexp ":$HOME/bin:" >&/dev/null
# shellcheck disable=SC2181
if [ "$?" -eq "0" ]; then
path_has_home_bin=1
fi
@@ -37,7 +45,7 @@ install_tools
echo "Tools were installed into $HOME/bin."
if [ -z "$path_has_home_bin" ]; then
echo "You should add $HOME/bin to your PATH."
echo "You should add $HOME/bin to your PATH."
fi
exit 0

View File

@@ -1,5 +1,6 @@
#!/bin/bash
declare -i status
status=0
PRECIOUS=$(which precious)
@@ -7,8 +8,7 @@ if [[ -z $PRECIOUS ]]; then
PRECIOUS=./bin/precious
fi
"$PRECIOUS" lint -s
if (( $? != 0 )); then
if ! "$PRECIOUS" lint -s; then
status+=1
fi

View File

@@ -1,9 +1,30 @@
#!/bin/bash
set -e
set -x
set -o pipefail
CROSS_DIR="$1"
VERSION="$2"
cd "$CROSS_DIR"
if [[ -n $VERSION ]] && ! [[ $VERSION =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
cargo install cross --git https://github.com/cross-rs/cross --rev "$VERSION" --force
mv "$HOME/.cargo/bin/cross" .
CROSS_NO_WARNINGS=0 ./cross --version
exit 0
fi
VERSION_ARGS=""
if [ -n "$VERSION" ]; then
VERSION_ARGS="--tag $VERSION"
fi
cd "$RUNNER_TEMP"
export TARGET=.
curl --silent --location \
https://raw.githubusercontent.com/houseabsolute/ubi/master/bootstrap/bootstrap-ubi.sh |
https://raw.githubusercontent.com/houseabsolute/ubi/master/bootstrap/bootstrap-ubi.sh |
sh
./ubi --project cross-rs/cross --matching musl --in .
# shellcheck disable=SC2086
./ubi --project cross-rs/cross --matching musl --in . $VERSION_ARGS
CROSS_NO_WARNINGS=0 ./cross --version

View File

@@ -1,4 +0,0 @@
cd $Env:RUNNER_TEMP
Invoke-WebRequest -URI 'https://raw.githubusercontent.com/houseabsolute/ubi/master/bootstrap/bootstrap-ubi.ps1' -UseBasicParsing | Invoke-Expression
.\ubi --project cross-rs/cross --in .

22
perltidyrc Normal file
View File

@@ -0,0 +1,22 @@
-l=78
-i=4
-ci=4
-se
-b
-bar
-boc
-vt=0
-vtc=0
-cti=0
-pt=1
-bt=1
-sbt=1
-bbt=1
-nolq
-npro
-nsfs
--blank-lines-before-packages=0
--opening-hash-brace-right
--no-outdent-long-comments
--iterations=2
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="

View File

@@ -1,10 +1,42 @@
exclude = [
"target",
"tests/lib/**/*",
]
[commands.prettier]
[commands.typos]
type = "both"
include = "**/*"
exclude = "**/*.tar.gz"
invoke = "once"
cmd = "typos"
tidy_flags = "--write-changes"
ok-exit-codes = 0
lint-failure-exit-codes = 2
[commands.perltidy]
type = "both"
include = [ "**/*.{pl,pm,t,psgi}" ]
exclude = "tests/lib/**"
cmd = [ "perltidy", "--profile=$PRECIOUS_ROOT/perltidyrc" ]
lint_flags = [ "--assert-tidy", "--no-standard-output", "--outfile=/dev/null" ]
tidy_flags = [ "--backup-and-modify-in-place", "--backup-file-extension=/" ]
ok_exit_codes = 0
lint_failure_exit_codes = 2
ignore_stderr = "Begin Error Output Stream"
[commands.prettier-md]
type = "both"
include = [ "**/*.md", "**/*.yml" ]
include = [ "**/*.md" ]
cmd = [ "./node_modules/.bin/prettier", "--no-config", "--print-width", "100", "--prose-wrap", "always" ]
lint_flags = "--check"
tidy_flags = "--write"
ok_exit_codes = 0
lint_failure_exit_codes = 1
ignore_stderr = [ "Code style issues" ]
[commands.prettier-yml]
type = "both"
include = [ "**/*.yml" ]
cmd = [ "./node_modules/.bin/prettier", "--no-config" ]
lint_flags = "--check"
tidy_flags = "--write"
@@ -24,3 +56,19 @@ ignore_stderr = [
"The .+ file is not sorted",
"The .+ file is not unique",
]
[commands.shellcheck]
type = "lint"
include = "**/*.sh"
cmd = "shellcheck"
ok_exit_codes = 0
lint_failure_exit_codes = 1
[commands.shfmt]
type = "both"
include = "**/*.sh"
cmd = ["shfmt", "--simplify", "--indent", "4"]
lint_flags = "--diff"
tidy_flags = "--write"
ok_exit_codes = 0
lint_failure_exit_codes = 1

View File

@@ -1,8 +1,12 @@
#!/bin/bash
set -e
set -x
set -o pipefail
if [ -f "$RUNNER_TEMP/cross" ]; then
echo "build-command=$RUNNER_TEMP/cross" >> $GITHUB_OUTPUT
CROSS_DIR="$1"
if [ -f "$CROSS_DIR/cross" ]; then
echo "build-command=$CROSS_DIR/cross" >>"$GITHUB_OUTPUT"
else
echo "build-command=cargo" >> $GITHUB_OUTPUT
echo "build-command=cargo" >>"$GITHUB_OUTPUT"
fi

View File

@@ -1,18 +1,25 @@
#!/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
echo "needs-cross=false" >>"$GITHUB_OUTPUT"
exit 0
fi
if echo "$TARGET" | grep --quiet --extended-regexp -i '(x86_64|586|686).+linux-(gnu|musl)'; then
echo "needs-cross=false" >> $GITHUB_OUTPUT
# 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
echo "needs-cross=true" >>"$GITHUB_OUTPUT"

7
set-cross-dir.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -e
set -x
set -o pipefail
echo "cross-dir=$RUNNER_TEMP" >>"$GITHUB_OUTPUT"

45
strip-binary.sh Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
set -e
set -x
set -o pipefail
TARGET=$1
did_strip=""
strip_binary() {
if [[ $(uname -s) =~ "Darwin" ]]; then
stripped=$(
find "$1" -maxdepth 1 -type f -perm +111 | while read -r exe; do
strip "$exe"
echo "stripped $exe"
done
)
else
stripped=$(
find "$1" -maxdepth 1 -type f -executable | while read -r exe; do
strip "$exe"
echo "stripped $exe"
done
)
fi
if [ -z "$stripped" ]; then
echo "Could not find any binaries to strip in $1"
else
did_strip="true"
fi
}
for type in debug release; do
if [ -d "target/$TARGET/$type" ]; then
strip_binary "target/$TARGET/$type"
elif [ -d "target/$type" ]; then
strip_binary "target/$type"
fi
done
if [ -z "$did_strip" ]; then
echo "No binaries were stripped"
exit 1
fi

7
test-project/Cargo.lock generated Normal file
View File

@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "test-project"
version = "0.1.0"

27
test-project/Cargo.toml Normal file
View File

@@ -0,0 +1,27 @@
[package]
name = "test-project"
version = "0.1.0"
edition = "2021"
# For testing it would be nice to create a binary with spaces in the name, but
# right now the `name` value must be a valid crate name, and there's no
# separate setting for the compiled executable's name. See
# https://github.com/rust-lang/cargo/issues/9778.
[[bin]]
name = "bin1"
path = "src/bin1.rs"
[[bin]]
name = "bin2"
path = "src/bin2.rs"
# workaround for https://github.com/cross-rs/cross/issues/1345
[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",
"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",
"rm -rf /tmp/netbsd",
]

11
test-project/src/bin1.rs Normal file
View File

@@ -0,0 +1,11 @@
fn main() {
println!("Hello, world!");
}
#[cfg(test)]
mod test {
#[test]
fn test_something() {
assert_eq!(1, 1);
}
}

11
test-project/src/bin2.rs Normal file
View File

@@ -0,0 +1,11 @@
fn main() {
println!("Hello, world!");
}
#[cfg(test)]
mod test {
#[test]
fn test_something() {
assert_eq!(1, 1);
}
}

7
test-project/subcrate/Cargo.lock generated Normal file
View File

@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "subcrate"
version = "0.1.0"

View File

@@ -0,0 +1,15 @@
[package]
name = "subcrate"
version = "0.1.0"
edition = "2021"
# workaround for https://github.com/cross-rs/cross/issues/1345
[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",
"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",
"rm -rf /tmp/netbsd",
]

View File

@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world (subcrate)!");
}

114
tests/check-binary.pl Executable file
View File

@@ -0,0 +1,114 @@
#!/usr/bin/env perl
use v5.30;
use strict;
use warnings;
no warnings 'experimental::signatures';
use feature 'signatures';
use autodie;
use FindBin qw( $Bin );
use File::Spec;
use lib File::Spec->catdir( $Bin, 'lib' );
use Getopt::Long;
use IPC::System::Simple qw( capturex );
use Path::Tiny qw( path );
use Test::More;
sub main {
my $target;
my $expect_cross;
my $expect_cross_version;
my $expect_file_re;
my $expect_stripped;
GetOptions(
'target=s' => \$target,
'expect-file-re=s' => \$expect_file_re,
'expect-cross!' => \$expect_cross,
'expect-cross-version=s' => \$expect_cross_version,
'expect-stripped!' => \$expect_stripped,
);
check_cross(
path( $ENV{RUNNER_TEMP} ),
$expect_cross,
$expect_cross_version
);
for my $bin (
path( qw( . target ), $target, qw( debug bin1 ) ),
path( qw( . target ), $target, qw( debug bin2 ) ),
path( qw( . subcrate target ), $target, qw( debug subcrate ) )
) {
check_binary( $bin, $expect_file_re, $expect_stripped );
}
done_testing();
}
sub check_cross ( $bin_dir, $expect_cross, $expect_cross_version ) {
my $cross = $bin_dir->child('cross');
if ($expect_cross) {
ok( $cross->is_file && -x $cross, 'found `cross` in $PATH' );
if ($expect_cross_version) {
my $version = capturex( $cross, '--version' );
like(
$version, qr/\Q$expect_cross_version/,
'cross version matches expected version'
);
}
}
else {
ok( !$cross->exists, 'did not find `cross` in $PATH' );
}
}
sub check_binary ( $bin, $expect_file_re, $expect_stripped ) {
ok( $bin->exists, "Binary at $bin exists" )
or return;
ok( $bin->is_file, "Binary at $bin is a file" )
or return;
ok( -x $bin, "Binary at $bin is executable" )
or return;
my $file = capturex( qw( file --brief ), $bin ) // q{};
chomp $file;
like(
$file, qr/$expect_file_re/,
"`file` output for $bin matches expected output"
);
# The file command on macOS doesn't report whether the binary is stripped
# or not.
return if $^O eq 'darwin';
if ($expect_stripped) {
unlike(
$file, qr/not stripped/,
"`file` does not report $bin as not stripped"
);
like( $file, qr/stripped/, "`file` reports $bin as stripped" );
}
else {
if ( $^O eq 'MSWin32' || $^O eq 'msys' ) {
# On Windows, unstripped binaries don't contain the word
# "stripped" at all.
unlike(
$file, qr/stripped/,
"`file` does not report $bin as stripped"
);
}
else {
like(
$file, qr/not stripped/,
"`file` reports $bin as not stripped"
);
}
}
}
main();

File diff suppressed because it is too large Load Diff

3880
tests/lib/Path/Tiny.pm Normal file

File diff suppressed because it is too large Load Diff