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: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
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`.
| `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, non-x86 Windows, and macOS ARM. |
| `target` | string | yes | The target triple to compile for. This should be one of the targets listed by running `rustup target list`. |
| `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 binary will be stripped if possible. This is only possible for binaries which weren't cross-compiled. |
| `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. If this is not set then the latest version will always be used. |
## 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`.
@@ -82,7 +82,7 @@ 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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.