Skip to content

Commit

Permalink
Merge pull request #52 from getsolus/cargo-macros
Browse files Browse the repository at this point in the history
rc.yml: Provide cargo_{fetch,build,install,test} macros
  • Loading branch information
ermo authored Mar 5, 2024
2 parents a05f283 + bff3af0 commit dddf3da
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 dddf3da

Please # to comment.