Skip to content

Commit

Permalink
rc.yml: Provide cargo_{fetch,build,install,test} macros
Browse files Browse the repository at this point in the history
For setup, build, install and check steps respectively.
  • Loading branch information
joebonrichie committed Mar 5, 2024
1 parent a05f283 commit bff3af0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ypkg2/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,24 @@ actions:
./waf build --jobs="%YJOBS%"
- waf_install: |
./waf install --jobs="%YJOBS%" --destdir="%installroot%"
- cargo_fetch: |
cargo fetch -v --locked
- cargo_build: |
cargo build -v -j "%YJOBS%" --frozen --release \
--config profile.release.debug=\"full\" \
--config profile.release.split-debuginfo=\"off\" \
--config profile.release.strip=\"none\"
- cargo_install: |
cargo_install(){
if [ $# -eq 1 ]; then
install -Dm00755 target/release/"$1" $installdir/usr/bin/"$1"
else
install -Dm00755 target/release/"$package" $installdir/usr/bin/"$package"
fi
}
cargo_install
- cargo_test: |
cargo test -v -j "%YJOBS%" --frozen --release --workspace
- llvm_profile_merge: |
if [[ -d "$YPKG_PGO_DIR" ]]; then
pushd "$YPKG_PGO_DIR"
Expand Down

0 comments on commit bff3af0

Please # to comment.