From c6c27f6efd26d2a666dd034b0fc68a18c615657b Mon Sep 17 00:00:00 2001 From: Joey Riches Date: Sat, 23 Dec 2023 13:54:48 +0000 Subject: [PATCH] rc.yml: Provide cargo_{fetch,build} macros For setup and build steps respectively --- ypkg2/rc.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ypkg2/rc.yml b/ypkg2/rc.yml index 968c136..826e14d 100644 --- a/ypkg2/rc.yml +++ b/ypkg2/rc.yml @@ -350,6 +350,10 @@ actions: ./waf build --jobs="%YJOBS%" - waf_install: | ./waf install --jobs="%YJOBS%" --destdir="%installroot%" + - cargo_fetch: | + cargo fetch --locked + - cargo_build: | + cargo build --frozen --release - llvm_profile_merge: | if [[ -d "$YPKG_PGO_DIR" ]]; then pushd "$YPKG_PGO_DIR" @@ -360,11 +364,19 @@ actions: else echo "\n\nError: Profiling requested by ypkg but doesn't exist\n\n" fi + - avx512_lib_shift: | + if [[ -d "%installroot%/%libdir%" ]]; then + install -dm00755 $PKG_BUILD_DIR/glibc-hwcaps/x86-64-v4 + install -dm00755 $installdir/%libdir%/glibc-hwcaps + mv $(ls -1 -f %installroot%/%libdir%/*.so* | grep -v ^glibc-hwcaps) -t $PKG_BUILD_DIR/glibc-hwcaps/x86-64-v4 + mv $PKG_BUILD_DIR/glibc-hwcaps/x86-64-v4 %installroot%/%libdir%/glibc-hwcaps/ + fi - avx2_lib_shift: | - if [ -d "%installroot%/%libdir%" ]; then + if [[ -d "%installroot%/%libdir%" ]]; then install -dm00755 $PKG_BUILD_DIR/glibc-hwcaps/x86-64-v3 - mv %installroot%/%libdir%/* $PKG_BUILD_DIR/glibc-hwcaps/x86-64-v3 - mv $PKG_BUILD_DIR/glibc-hwcaps %installroot%/%libdir%/ + install -dm00755 $installdir/%libdir%/glibc-hwcaps + mv $(ls -1 -f %installroot%/%libdir%/*.so* | grep -v ^glibc-hwcaps) -t $PKG_BUILD_DIR/glibc-hwcaps/x86-64-v3 + mv $PKG_BUILD_DIR/glibc-hwcaps/x86-64-v3 %installroot%/%libdir%/glibc-hwcaps/ fi - python3_avx2_lib_shift: | find %installroot%/usr/lib/python%python3_version%/ -name '*.so' -exec sh -c 'mv "$0" "${0%.so}.so.avx2"' {} \;