mirror of
https://codeberg.org/wownero/wownero-lws
synced 2026-01-11 08:05:16 -08:00
Update .gitea/workflows/build.yaml
This commit is contained in:
@@ -109,6 +109,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
# We must start clean to ensure the 'depends' system rebuilds Boost correctly
|
||||||
echo "Cleaning workspace..."
|
echo "Cleaning workspace..."
|
||||||
rm -rf *
|
rm -rf *
|
||||||
|
|
||||||
@@ -128,33 +129,39 @@ jobs:
|
|||||||
/bin/bash -c "
|
/bin/bash -c "
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# --- FIX 1: Trust the repo (Fixes 'dubious ownership') ---
|
# 1. Trust the repo (Fixes 'dubious ownership')
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory '*'
|
||||||
|
|
||||||
# --- FIX 2: Relax Boost Requirement (Allow 1.69) ---
|
# 2. Relax CMake Boost Requirement (Accept 1.69)
|
||||||
echo 'Patching CMakeLists.txt to accept Boost 1.69...'
|
echo 'Patching CMakeLists.txt to accept Boost 1.69...'
|
||||||
sed -i 's/1.70/1.69/g' CMakeLists.txt || true
|
sed -i 's/1.70/1.69/g' CMakeLists.txt || true
|
||||||
sed -i 's/1\.70/1\.69/g' CMakeLists.txt || true
|
sed -i 's/1\.70/1\.69/g' CMakeLists.txt || true
|
||||||
|
|
||||||
# --- FIX 3: Enable Missing Boost Libraries (Context & Coroutine) ---
|
# 3. SURGICAL PATCH for Boost.mk (Fixes the breakage!)
|
||||||
# We find the list of libraries in boost.mk and append the ones we need.
|
# We only replace 'filesystem' if the line also contains 'package_config_libraries'
|
||||||
# We target 'filesystem' (which is always there) and add our extras after it.
|
# This ensures we don't break the build command structure.
|
||||||
echo 'Patching boost.mk to build context and coroutine...'
|
echo 'Patching boost.mk safely...'
|
||||||
sed -i 's/filesystem/filesystem context coroutine/g' external/monero/contrib/depends/packages/boost.mk
|
sed -i '/package_config_libraries/s/filesystem/filesystem context coroutine/' external/monero/contrib/depends/packages/boost.mk
|
||||||
|
|
||||||
# 1. Build Dependencies
|
# 4. Build Dependencies
|
||||||
# This will now REBUILD Boost because we changed the recipe (Fix 3).
|
|
||||||
echo 'Building Dependencies...'
|
echo 'Building Dependencies...'
|
||||||
cd external/monero/contrib/depends
|
cd external/monero/contrib/depends
|
||||||
make HOST=x86_64-w64-mingw32 -j$(nproc)
|
make HOST=x86_64-w64-mingw32 -j$(nproc)
|
||||||
|
|
||||||
# 2. Configure Project
|
# 5. Configure Project
|
||||||
echo 'Configuring Wownero LWS...'
|
echo 'Configuring Wownero LWS...'
|
||||||
cd ../../../..
|
cd ../../../..
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../external/monero/contrib/depends/x86_64-w64-mingw32/share/toolchain.cmake -DCMAKE_BUILD_TYPE=Release
|
|
||||||
|
|
||||||
# 3. Compile
|
# We add -DBoost_USE_STATIC_LIBS=ON to help CMake find the .a files
|
||||||
|
# We add -DBoost_DEBUG=ON so if it fails, the logs tell us exactly why
|
||||||
|
cmake .. \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=../external/monero/contrib/depends/x86_64-w64-mingw32/share/toolchain.cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBoost_USE_STATIC_LIBS=ON \
|
||||||
|
-DBoost_DEBUG=ON
|
||||||
|
|
||||||
|
# 6. Compile
|
||||||
echo 'Compiling...'
|
echo 'Compiling...'
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user