From bff3af02d5db92ab2a9fb24aea7cbf56d613b6ec Mon Sep 17 00:00:00 2001 From: Joey Riches Date: Sat, 23 Dec 2023 13:56:55 +0000 Subject: [PATCH] rc.yml: Provide cargo_{fetch,build,install,test} macros For setup, build, install and check steps respectively. --- ypkg2/rc.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ypkg2/rc.yml b/ypkg2/rc.yml index 8c75d4b..1ad22f6 100644 --- a/ypkg2/rc.yml +++ b/ypkg2/rc.yml @@ -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"