forked from such-gitea/wownero-lws
Update .gitea/workflows/build.yaml
Some checks failed
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-arm64, aarch64-linux-gnu) (push) Failing after 1m15s
Build Wownero LWS (Static / Boost 1.90) / build-macos (arm64, macos-arm64, aarch64-apple-darwin11) (push) Failing after 1m56s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-riscv64, riscv64-linux-gnu) (push) Failing after 1m5s
Build Wownero LWS (Static / Boost 1.90) / build-macos (x86_64, macos-x64, x86_64-apple-darwin11) (push) Failing after 59s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-x64, x86_64-linux-gnu) (push) Failing after 1m5s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Windows, .exe, windows-x64, x86_64-w64-mingw32) (push) Failing after 1m2s
Build Wownero LWS (Static / Boost 1.90) / release (push) Has been skipped
Some checks failed
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-arm64, aarch64-linux-gnu) (push) Failing after 1m15s
Build Wownero LWS (Static / Boost 1.90) / build-macos (arm64, macos-arm64, aarch64-apple-darwin11) (push) Failing after 1m56s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-riscv64, riscv64-linux-gnu) (push) Failing after 1m5s
Build Wownero LWS (Static / Boost 1.90) / build-macos (x86_64, macos-x64, x86_64-apple-darwin11) (push) Failing after 59s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Linux, , linux-x64, x86_64-linux-gnu) (push) Failing after 1m5s
Build Wownero LWS (Static / Boost 1.90) / build-cross (Windows, .exe, windows-x64, x86_64-w64-mingw32) (push) Failing after 1m2s
Build Wownero LWS (Static / Boost 1.90) / release (push) Has been skipped
This commit is contained in:
@@ -11,7 +11,7 @@ env:
|
||||
|
||||
jobs:
|
||||
# ------------------------------------------------------------------
|
||||
# 1. CROSS PLATFORM BUILDS (The Problem Children)
|
||||
# 1. LINUX & WINDOWS
|
||||
# ------------------------------------------------------------------
|
||||
build-cross:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -22,39 +22,22 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Linux x64
|
||||
- target: x86_64-linux-gnu
|
||||
sys: Linux
|
||||
proc: x86_64
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
platform: linux-x64
|
||||
cmake_sys: Linux
|
||||
ext: ""
|
||||
mode: native
|
||||
# Linux ARM64
|
||||
- target: aarch64-linux-gnu
|
||||
sys: Linux
|
||||
proc: aarch64
|
||||
cc: aarch64-linux-gnu-gcc
|
||||
cxx: aarch64-linux-gnu-g++
|
||||
platform: linux-arm64
|
||||
cmake_sys: Linux
|
||||
ext: ""
|
||||
mode: cross
|
||||
# Linux RISC-V
|
||||
- target: riscv64-linux-gnu
|
||||
sys: Linux
|
||||
proc: riscv64
|
||||
cc: riscv64-linux-gnu-gcc
|
||||
cxx: riscv64-linux-gnu-g++
|
||||
platform: linux-riscv64
|
||||
cmake_sys: Linux
|
||||
ext: ""
|
||||
mode: cross
|
||||
# Windows x64
|
||||
- target: x86_64-w64-mingw32
|
||||
sys: Windows
|
||||
proc: x86_64
|
||||
cc: x86_64-w64-mingw32-gcc
|
||||
cxx: x86_64-w64-mingw32-g++
|
||||
rc: x86_64-w64-mingw32-windres
|
||||
platform: windows-x64
|
||||
cmake_sys: Windows
|
||||
ext: ".exe"
|
||||
mode: cross
|
||||
|
||||
steps:
|
||||
- name: Fix DNS
|
||||
@@ -68,14 +51,19 @@ jobs:
|
||||
git config --global --add safe.directory '*'
|
||||
git config --global url."http://oauth2:${GITHUB_TOKEN}@git.such.software:3000/Builds/RandomWOW.git".insteadOf "https://codeberg.org/wownero/RandomWOW"
|
||||
git config --global url."http://oauth2:${GITHUB_TOKEN}@git.such.software:3000/Builds/wownero.git".insteadOf "https://codeberg.org/wownero/wownero.git"
|
||||
|
||||
git clone http://oauth2:$GITHUB_TOKEN@git.such.software:3000/${{ github.repository }}.git .
|
||||
git submodule update --init --recursive
|
||||
|
||||
# --- FIX 1: The Perl Patch (Confirmed Working) ---
|
||||
# --- FIX 1: Code Patches (Final + ICU) ---
|
||||
- name: Patch Source Code
|
||||
run: |
|
||||
echo "Patching src/rest_server.cpp..."
|
||||
echo "Patching src/rest_server.cpp (Removing final keyword)..."
|
||||
perl -pi -e 's/struct\s+rest_server::handler_loop\s+final/struct rest_server::handler_loop/g' src/rest_server.cpp
|
||||
|
||||
echo "Patching external/monero/CMakeLists.txt (Killing ICU check)..."
|
||||
# This disables the check for 'icuio' which breaks Windows builds on Boost 1.90
|
||||
perl -pi -e 's/find_library\(ICUIO_LIBRARIES/# find_library(ICUIO_LIBRARIES/g' external/monero/CMakeLists.txt
|
||||
|
||||
- name: Download Static SDK
|
||||
run: |
|
||||
@@ -91,7 +79,7 @@ jobs:
|
||||
mkdir -p /opt/wownero-sdk
|
||||
tar -xf sdk.tar.gz -C /opt/wownero-sdk
|
||||
|
||||
# --- FIX 2: Normalize SDK Libraries (Hidapi Alias) ---
|
||||
# --- FIX 2: Normalize SDK Libraries ---
|
||||
- name: Fix SDK Libraries
|
||||
run: |
|
||||
if [ -f /opt/wownero-sdk/lib/libhidapi-libusb.a ] && [ ! -f /opt/wownero-sdk/lib/libhidapi.a ]; then
|
||||
@@ -104,7 +92,7 @@ jobs:
|
||||
tar -xf cmake.tar.gz
|
||||
echo "$(pwd)/cmake-3.28.1-linux-x86_64/bin" >> $GITHUB_PATH
|
||||
|
||||
# --- FIX 3: Generate Proper Toolchain File (The Silver Bullet) ---
|
||||
# --- FIX 3: Toolchain with 'BOTH' Search Mode (Fixes 'RT' error) ---
|
||||
- name: Generate Toolchain File
|
||||
run: |
|
||||
cat <<EOF > cross.cmake
|
||||
@@ -113,18 +101,17 @@ jobs:
|
||||
set(CMAKE_C_COMPILER ${{ matrix.cc }})
|
||||
set(CMAKE_CXX_COMPILER ${{ matrix.cxx }})
|
||||
|
||||
# Force CMake to find libraries ONLY in our SDK, never on the host
|
||||
# Root Path: Look in SDK, but ALSO look in system paths (BOTH)
|
||||
# This allows finding librt, libpthread, libdl provided by the cross-compiler toolchain
|
||||
set(CMAKE_FIND_ROOT_PATH /opt/wownero-sdk)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
|
||||
# Build static libs
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
EOF
|
||||
|
||||
# Windows Needs RC Compiler too
|
||||
if [ "${{ matrix.sys }}" == "Windows" ]; then
|
||||
echo "set(CMAKE_RC_COMPILER ${{ matrix.rc }})" >> cross.cmake
|
||||
fi
|
||||
@@ -132,11 +119,9 @@ jobs:
|
||||
- name: Build LWS
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
|
||||
# Common Flags
|
||||
SDK_DIR="/opt/wownero-sdk"
|
||||
|
||||
# Force finding these libs in the SDK explicitly
|
||||
# Explicit Library Paths
|
||||
LIBS="-DZSTD_LIBRARY=$SDK_DIR/lib/libzstd.a \
|
||||
-DZSTD_INCLUDE_DIR=$SDK_DIR/include \
|
||||
-DLIBEVENT_LIBRARY=$SDK_DIR/lib/libevent.a \
|
||||
@@ -144,15 +129,12 @@ jobs:
|
||||
-DHIDAPI_INCLUDE_DIR=$SDK_DIR/include \
|
||||
-DHIDAPI_LIBRARY=$SDK_DIR/lib/libhidapi.a"
|
||||
|
||||
# Windows specific Linker Flags
|
||||
if [ "${{ matrix.sys }}" == "Windows" ]; then
|
||||
LINK_FLAGS="-static -Wl,--allow-multiple-definition -L$SDK_DIR/lib"
|
||||
else
|
||||
# Linux needs implicit lookup path
|
||||
LINK_FLAGS="-L$SDK_DIR/lib"
|
||||
fi
|
||||
|
||||
# Run CMake using the Toolchain file
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cross.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_STATIC=ON \
|
||||
@@ -191,7 +173,7 @@ jobs:
|
||||
path: release/wownero-lws-${{ matrix.target }}.*
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# 2. MACOS (Hybrid)
|
||||
# 2. MACOS
|
||||
# ------------------------------------------------------------------
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
@@ -222,6 +204,7 @@ jobs:
|
||||
- name: Patch Source Code
|
||||
run: |
|
||||
perl -pi -e 's/struct\s+rest_server::handler_loop\s+final/struct rest_server::handler_loop/g' src/rest_server.cpp
|
||||
perl -pi -e 's/find_library\(ICUIO_LIBRARIES/# find_library(ICUIO_LIBRARIES/g' external/monero/CMakeLists.txt
|
||||
|
||||
- name: Install CMake Only
|
||||
run: brew install cmake
|
||||
|
||||
Reference in New Issue
Block a user