Make docker build libryzenadj instead of including old version

This commit is contained in:
NGnius (Graham) 2023-02-09 23:23:08 -05:00
parent ecaa92b821
commit 0b0db2faa9
2 changed files with 17 additions and 2 deletions

View file

@ -1,5 +1,5 @@
FROM ghcr.io/steamdeckhomebrew/holo-toolchain-rust:latest
RUN pacman -S --noconfirm cmake make clang
RUN pacman -S --noconfirm cmake make clang git
ENTRYPOINT [ "/backend/entrypoint.sh" ]

View file

@ -5,11 +5,26 @@ rustup --version
rustc --version
cargo --version
mkdir -p out
echo "--- Building ryzenadj lib ---"
git clone https://github.com/FlyGoat/RyzenAdj ryzenadj
cd ryzenadj
git checkout -q 187549bd0a92f84508161aabfd958b09540c7e56
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
mv libryzenadj.so ../../out/libryzenadj.so
cd ../..
echo "--- Building plugin backend ---"
cargo build --profile docker
mkdir -p out
cp target/release/powertools out/backend
mv target/docker/powertools out/backend
echo " --- Cleaning up ---"
# remove root-owned target folder
cargo clean
# remove newly-cloned git repo and artifacts
rm -rf ./ryzenadj