Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Add cargo actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Feb 19, 2024
1 parent c66c112 commit aed9f24
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions data/macros/actions/cargo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
actions:
# Fetch dependencies
- cargo_fetch:
command: |
cargo fetch -v --locked
dependencies:
- rust

# Build the rust project
- cargo_build:
command: |
cargo build -v -j "%(jobs)" --frozen --release \
--config profile.release.debug=\"full\" \
--config profile.release.split-debuginfo=\"off\" \
--config profile.release.strip=\"none\"
dependencies:
- rust

# Install the built binary
- cargo_install:
command: |
cargo_install(){
if [ $# -eq 1 ]; then
%install_bin target/release/"$1"
else
%install_bin target/release/%(name)
fi
}
cargo_install
dependencies:
- rust

# Run tests
- cargo_test:
command: |
cargo test -v -j "%(jobs)" --frozen --release --workspace
dependencies:
- rust

0 comments on commit aed9f24

Please sign in to comment.