- Added support for running
cargo bench
orcross bench
. Implemented by @RaulTrombin (Raul Victor Trombin). GH #32.
- Arguments passed in the
args
parameter are now always last when executingcargo
. This lets you pass arguments to test binaries like-- --something
. First reported by @mateocabanal (Mateo Cabanal) as GH #12 and fully fixed by @donatello (Aditya Manthramurthy) in GH #30.
- The
musl
packages are only installed when not cross-compiling.
- When the given
target
includes the stringmusl
, this action will install themusl-tools
package. This allows crates with C or C++ code to compile properly. Fixes #20. Reported by Matteo Pietro Dazzi (@ilteoood).
- It's now possible to set
cross-version
to a git ref like a commit hash orHEAD
. This will installcross
from its git repo.
- 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.
- Use
cross
when compiling for 32-bit Linux targets. While in theory this should work withoutcross
, compilingopenssl
with thevendored
feature fails when we runcargo build --target i686-unknown-linux-musl
.
- 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 ofcross
. If this is not specified, the latest version will be used.
- 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.
- 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.
- 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
andcross
commands.
- When the
strip
parameter was true, stripping binaries could fail if there were bothtarget/*/debug
andtarget/*/release
directories present and thedebug
directory didn't have a binary. Now it will strip all binaries it finds undertarget
.
- Fix use of
dtolnay/rust-toolchain
action to allow passing atoolchain
input.
- 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.
- This action now supports running the
build
andtest
commands, or both, with a new input parameter,command
. The default isbuild
.
- Fixed some typos in the
README.md
documentation.
- First release upon an unsuspecting world.