2022-09-05 19:24:01 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-04-24 02:13:45 +01:00
|
|
|
cd /backend
|
|
|
|
|
|
|
|
echo "--- Debug info ---"
|
2022-09-05 19:24:01 +01:00
|
|
|
rustup --version
|
|
|
|
rustc --version
|
|
|
|
cargo --version
|
|
|
|
|
2024-04-24 02:13:45 +01:00
|
|
|
id $USER
|
|
|
|
stat /backend || exit 1
|
|
|
|
stat /backend/out || exit 1
|
|
|
|
|
|
|
|
echo $(uname -a) > /backend/out/version.txt
|
2023-02-10 04:23:08 +00:00
|
|
|
|
|
|
|
echo "--- Building ryzenadj lib ---"
|
2024-04-24 02:13:45 +01:00
|
|
|
git clone https://github.com/FlyGoat/RyzenAdj /tmp/ryzenadj
|
|
|
|
cd /tmp/ryzenadj
|
|
|
|
git checkout -q v0.14.0
|
2023-02-10 04:23:08 +00:00
|
|
|
mkdir build && cd build
|
2024-04-24 02:13:45 +01:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release .. || exit 1
|
|
|
|
make || exit 1
|
|
|
|
mv libryzenadj.so /backend/out/libryzenadj.so || exit 1
|
|
|
|
mv ryzenadj /backend/out/ryzenadj || exit 1
|
|
|
|
cd /backend
|
2023-02-10 04:23:08 +00:00
|
|
|
|
2022-09-05 19:24:01 +01:00
|
|
|
echo "--- Building plugin backend ---"
|
2024-04-24 02:13:45 +01:00
|
|
|
cargo build --profile docker || exit 1
|
|
|
|
mkdir -p out || exit 1
|
2023-02-10 04:23:08 +00:00
|
|
|
|
2024-04-24 02:13:45 +01:00
|
|
|
mv target/docker/powertools out/backend || exit 1
|
2022-09-05 19:24:01 +01:00
|
|
|
|
|
|
|
echo " --- Cleaning up ---"
|
|
|
|
# remove root-owned target folder
|
|
|
|
cargo clean
|
2023-02-10 04:23:08 +00:00
|
|
|
# remove newly-cloned git repo and artifacts
|
|
|
|
rm -rf ./ryzenadj
|