Skip to content

Commit

Permalink
rc.yml: Provide cargo_{fetch,build} macros
Browse files Browse the repository at this point in the history
For setup and build steps respectively
  • Loading branch information
joebonrichie committed Dec 23, 2023
1 parent 54f965a commit c6c27f6
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions ypkg2/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"' {} \;
Expand Down

0 comments on commit c6c27f6

Please # to comment.