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 1m55s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-arm64, aarch64-linux-gnu) (push) Failing after 2m15s
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-riscv64, riscv64-linux-gnu) (push) Failing after 2m4s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-x64, x86_64-linux-gnu) (push) Failing after 2m0s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Windows, .exe, windows-x64, x86_64-w64-mingw32) (push) Failing after 1m58s
Build Wownero LWS (Static / Boost 1.90) / release (push) Has been skipped

This commit is contained in:
2026-01-24 12:47:32 -05:00
parent ac34eea850
commit 05d208d2d8

View File

@@ -55,11 +55,12 @@ jobs:
git clone http://oauth2:$GITHUB_TOKEN@git.such.software:3000/${{ github.repository }}.git .
git submodule update --init --recursive
# --- FIX 1: Robust 'final' removal using Perl (Handles whitespace better than sed) ---
# --- FIX 1: Robust Regex Patch (Handles any whitespace) ---
- name: Patch Source Code
run: |
echo "Patching src/rest_server.cpp..."
perl -pi -e 's/struct rest_server::handler_loop final/struct rest_server::handler_loop/g' 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
run: |
@@ -75,15 +76,19 @@ jobs:
mkdir -p /opt/wownero-sdk
tar -xf sdk.tar.gz -C /opt/wownero-sdk
# --- FIX 2: Normalize SDK Libraries (Fixes missing libhidapi.a) ---
# --- FIX 2: Create Aliases for Missing Libraries ---
- name: Fix SDK Libraries
run: |
echo "Fixing missing library names..."
# If libhidapi-libusb.a exists but libhidapi.a doesn't, copy it.
if [ -f /opt/wownero-sdk/lib/libhidapi-libusb.a ] && [ ! -f /opt/wownero-sdk/lib/libhidapi.a ]; then
echo "Found libhidapi-libusb.a, creating libhidapi.a alias..."
cp /opt/wownero-sdk/lib/libhidapi-libusb.a /opt/wownero-sdk/lib/libhidapi.a
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: |
@@ -99,7 +104,7 @@ jobs:
PLATFORM_FLAGS=""
if [ "${{ matrix.target }}" == "x86_64-w64-mingw32" ]; then
# WINDOWS: Force static, allow duplicates, fix lib paths
# WINDOWS: Force static, allow duplicates, explicit lib paths
PLATFORM_FLAGS="-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
@@ -111,20 +116,21 @@ jobs:
-DLIBEVENT_INCLUDE_DIR=$SDK_DIR/include"
elif [ "${{ matrix.target }}" == "aarch64-linux-gnu" ]; then
# FIX 3: REMOVE CMAKE_LINKER. Let g++ find the right ld.
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_LINKER=/usr/bin/aarch64-linux-gnu-ld"
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++"
elif [ "${{ matrix.target }}" == "riscv64-linux-gnu" ]; then
# FIX 3: REMOVE CMAKE_LINKER. Let g++ find the right ld.
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_LINKER=/usr/bin/riscv64-linux-gnu-ld"
-DCMAKE_CXX_COMPILER=riscv64-linux-gnu-g++"
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 \
@@ -191,11 +197,11 @@ jobs:
find . -name "CMakeLists.txt" -print0 | xargs -0 perl -pi -e 's/\brt\b//g'
# --- FIX 1: Robust 'final' removal using Perl on macOS too ---
# --- FIX 1: Robust Regex Patch for macOS ---
- name: Patch Source Code
run: |
echo "Patching src/rest_server.cpp..."
perl -pi -e 's/struct rest_server::handler_loop final/struct rest_server::handler_loop/g' src/rest_server.cpp
perl -pi -e 's/struct\s+rest_server::handler_loop\s+final/struct rest_server::handler_loop/g' src/rest_server.cpp
- name: Install CMake Only
run: brew install cmake