forked from such-gitea/wownero-lws
Update .gitea/workflows/build.yaml
Some checks failed
Build Wownero LWS (Static / Boost 1.90) / build-macos (arm64, macos-arm64, aarch64-apple-darwin11) (push) Failing after 2m6s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-arm64, aarch64-linux-gnu) (push) Failing after 2m8s
Build Wownero LWS (Static / Boost 1.90) / build-macos (x86_64, macos-x64, x86_64-apple-darwin11) (push) Failing after 1m0s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-x64, x86_64-linux-gnu) (push) Has been cancelled
Build Wownero LWS (Static / Boost 1.90) / build-cross (Windows, .exe, windows-x64, x86_64-w64-mingw32) (push) Has been cancelled
Build Wownero LWS (Static / Boost 1.90) / release (push) Has been cancelled
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-riscv64, riscv64-linux-gnu) (push) Has been cancelled
Some checks failed
Build Wownero LWS (Static / Boost 1.90) / build-macos (arm64, macos-arm64, aarch64-apple-darwin11) (push) Failing after 2m6s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-arm64, aarch64-linux-gnu) (push) Failing after 2m8s
Build Wownero LWS (Static / Boost 1.90) / build-macos (x86_64, macos-x64, x86_64-apple-darwin11) (push) Failing after 1m0s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-x64, x86_64-linux-gnu) (push) Has been cancelled
Build Wownero LWS (Static / Boost 1.90) / build-cross (Windows, .exe, windows-x64, x86_64-w64-mingw32) (push) Has been cancelled
Build Wownero LWS (Static / Boost 1.90) / release (push) Has been cancelled
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-riscv64, riscv64-linux-gnu) (push) Has been cancelled
This commit is contained in:
@@ -55,11 +55,10 @@ jobs:
|
||||
git clone http://oauth2:$GITHUB_TOKEN@git.such.software:3000/${{ github.repository }}.git .
|
||||
git submodule update --init --recursive
|
||||
|
||||
# --- FIX 1: Robust Regex Patch (Handles any whitespace) ---
|
||||
# --- FIX 1: Robust Regex Patch (Confirmed Working) ---
|
||||
- name: Patch Source Code
|
||||
run: |
|
||||
echo "Patching src/rest_server.cpp..."
|
||||
# \s+ matches one or more spaces/tabs. This guarantees the match.
|
||||
perl -pi -e 's/struct\s+rest_server::handler_loop\s+final/struct rest_server::handler_loop/g' src/rest_server.cpp
|
||||
|
||||
- name: Download Static SDK
|
||||
@@ -81,15 +80,10 @@ jobs:
|
||||
run: |
|
||||
echo "Fixing library aliases..."
|
||||
cd /opt/wownero-sdk/lib
|
||||
|
||||
# Fix hidapi (LWS expects libhidapi.a, we built libhidapi-libusb.a)
|
||||
if [ -f libhidapi-libusb.a ] && [ ! -f libhidapi.a ]; then
|
||||
cp libhidapi-libusb.a libhidapi.a
|
||||
fi
|
||||
|
||||
# Ensure zstd/event exist for Windows (optional check)
|
||||
ls -lh *.a
|
||||
|
||||
- name: Install Modern CMake
|
||||
run: |
|
||||
echo "Installing CMake 3.28.1..."
|
||||
@@ -103,34 +97,45 @@ jobs:
|
||||
SDK_DIR="/opt/wownero-sdk"
|
||||
PLATFORM_FLAGS=""
|
||||
|
||||
# GLOBAL FIX: Always look in SDK/lib for missing deps like zstd/event
|
||||
# We use -L to force the linker to look here.
|
||||
GLOBAL_LINKER_FLAGS="-L/opt/wownero-sdk/lib"
|
||||
|
||||
if [ "${{ matrix.target }}" == "x86_64-w64-mingw32" ]; then
|
||||
# WINDOWS: Force static, allow duplicates, explicit lib paths
|
||||
# WINDOWS: -static, allow duplicates, and the global path
|
||||
PLATFORM_FLAGS="-DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
|
||||
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
|
||||
-DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres \
|
||||
-DCMAKE_EXE_LINKER_FLAGS='-static -Wl,--allow-multiple-definition -L/opt/wownero-sdk/lib' \
|
||||
-DCMAKE_EXE_LINKER_FLAGS='-static -Wl,--allow-multiple-definition $GLOBAL_LINKER_FLAGS' \
|
||||
-DZSTD_LIBRARY=$SDK_DIR/lib/libzstd.a \
|
||||
-DZSTD_INCLUDE_DIR=$SDK_DIR/include \
|
||||
-DLIBEVENT_LIBRARY=$SDK_DIR/lib/libevent.a \
|
||||
-DLIBEVENT_INCLUDE_DIR=$SDK_DIR/include"
|
||||
|
||||
elif [ "${{ matrix.target }}" == "x86_64-linux-gnu" ]; then
|
||||
# LINUX x86: Just needs the global linker path
|
||||
PLATFORM_FLAGS="-DCMAKE_EXE_LINKER_FLAGS='$GLOBAL_LINKER_FLAGS'"
|
||||
|
||||
elif [ "${{ matrix.target }}" == "aarch64-linux-gnu" ]; then
|
||||
# FIX 3: REMOVE CMAKE_LINKER. Let g++ find the right ld.
|
||||
# ARM64: MUST have explicit linker to prevent x86 ld usage
|
||||
PLATFORM_FLAGS="-DCMAKE_SYSTEM_NAME=Linux \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
|
||||
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
|
||||
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++"
|
||||
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
|
||||
-DCMAKE_LINKER=/usr/bin/aarch64-linux-gnu-ld \
|
||||
-DCMAKE_EXE_LINKER_FLAGS='$GLOBAL_LINKER_FLAGS'"
|
||||
|
||||
elif [ "${{ matrix.target }}" == "riscv64-linux-gnu" ]; then
|
||||
# FIX 3: REMOVE CMAKE_LINKER. Let g++ find the right ld.
|
||||
# RISC-V: MUST have explicit linker
|
||||
PLATFORM_FLAGS="-DCMAKE_SYSTEM_NAME=Linux \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=riscv64 \
|
||||
-DCMAKE_C_COMPILER=riscv64-linux-gnu-gcc \
|
||||
-DCMAKE_CXX_COMPILER=riscv64-linux-gnu-g++"
|
||||
-DCMAKE_CXX_COMPILER=riscv64-linux-gnu-g++ \
|
||||
-DCMAKE_LINKER=/usr/bin/riscv64-linux-gnu-ld \
|
||||
-DCMAKE_EXE_LINKER_FLAGS='$GLOBAL_LINKER_FLAGS'"
|
||||
fi
|
||||
|
||||
# NOTE: Removed manual HIDAPI_LIBRARY defs because we aliased the file in step "Fix SDK Libraries"
|
||||
cmake .. $PLATFORM_FLAGS \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_STATIC=ON \
|
||||
@@ -197,7 +202,7 @@ jobs:
|
||||
|
||||
find . -name "CMakeLists.txt" -print0 | xargs -0 perl -pi -e 's/\brt\b//g'
|
||||
|
||||
# --- FIX 1: Robust Regex Patch for macOS ---
|
||||
# --- FIX 1: Robust Regex Patch on macOS too ---
|
||||
- name: Patch Source Code
|
||||
run: |
|
||||
echo "Patching src/rest_server.cpp..."
|
||||
|
||||
Reference in New Issue
Block a user