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:
|
jobs:
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# 1. CROSS PLATFORM BUILDS (The Problem Children)
|
# 1. LINUX & WINDOWS
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
build-cross:
|
build-cross:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -22,39 +22,22 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Linux x64
|
|
||||||
- target: x86_64-linux-gnu
|
- target: x86_64-linux-gnu
|
||||||
sys: Linux
|
platform: linux-x64
|
||||||
proc: x86_64
|
cmake_sys: Linux
|
||||||
cc: gcc
|
|
||||||
cxx: g++
|
|
||||||
ext: ""
|
ext: ""
|
||||||
mode: native
|
|
||||||
# Linux ARM64
|
|
||||||
- target: aarch64-linux-gnu
|
- target: aarch64-linux-gnu
|
||||||
sys: Linux
|
platform: linux-arm64
|
||||||
proc: aarch64
|
cmake_sys: Linux
|
||||||
cc: aarch64-linux-gnu-gcc
|
|
||||||
cxx: aarch64-linux-gnu-g++
|
|
||||||
ext: ""
|
ext: ""
|
||||||
mode: cross
|
|
||||||
# Linux RISC-V
|
|
||||||
- target: riscv64-linux-gnu
|
- target: riscv64-linux-gnu
|
||||||
sys: Linux
|
platform: linux-riscv64
|
||||||
proc: riscv64
|
cmake_sys: Linux
|
||||||
cc: riscv64-linux-gnu-gcc
|
|
||||||
cxx: riscv64-linux-gnu-g++
|
|
||||||
ext: ""
|
ext: ""
|
||||||
mode: cross
|
|
||||||
# Windows x64
|
|
||||||
- target: x86_64-w64-mingw32
|
- target: x86_64-w64-mingw32
|
||||||
sys: Windows
|
platform: windows-x64
|
||||||
proc: x86_64
|
cmake_sys: Windows
|
||||||
cc: x86_64-w64-mingw32-gcc
|
|
||||||
cxx: x86_64-w64-mingw32-g++
|
|
||||||
rc: x86_64-w64-mingw32-windres
|
|
||||||
ext: ".exe"
|
ext: ".exe"
|
||||||
mode: cross
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Fix DNS
|
- name: Fix DNS
|
||||||
@@ -68,14 +51,19 @@ jobs:
|
|||||||
git config --global --add safe.directory '*'
|
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/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 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 clone http://oauth2:$GITHUB_TOKEN@git.such.software:3000/${{ github.repository }}.git .
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
||||||
# --- FIX 1: The Perl Patch (Confirmed Working) ---
|
# --- FIX 1: Code Patches (Final + ICU) ---
|
||||||
- name: Patch Source Code
|
- name: Patch Source Code
|
||||||
run: |
|
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
|
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
|
- name: Download Static SDK
|
||||||
run: |
|
run: |
|
||||||
@@ -91,7 +79,7 @@ jobs:
|
|||||||
mkdir -p /opt/wownero-sdk
|
mkdir -p /opt/wownero-sdk
|
||||||
tar -xf sdk.tar.gz -C /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
|
- name: Fix SDK Libraries
|
||||||
run: |
|
run: |
|
||||||
if [ -f /opt/wownero-sdk/lib/libhidapi-libusb.a ] && [ ! -f /opt/wownero-sdk/lib/libhidapi.a ]; then
|
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
|
tar -xf cmake.tar.gz
|
||||||
echo "$(pwd)/cmake-3.28.1-linux-x86_64/bin" >> $GITHUB_PATH
|
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
|
- name: Generate Toolchain File
|
||||||
run: |
|
run: |
|
||||||
cat <<EOF > cross.cmake
|
cat <<EOF > cross.cmake
|
||||||
@@ -113,18 +101,17 @@ jobs:
|
|||||||
set(CMAKE_C_COMPILER ${{ matrix.cc }})
|
set(CMAKE_C_COMPILER ${{ matrix.cc }})
|
||||||
set(CMAKE_CXX_COMPILER ${{ matrix.cxx }})
|
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 /opt/wownero-sdk)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||||
|
|
||||||
# Build static libs
|
|
||||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Windows Needs RC Compiler too
|
|
||||||
if [ "${{ matrix.sys }}" == "Windows" ]; then
|
if [ "${{ matrix.sys }}" == "Windows" ]; then
|
||||||
echo "set(CMAKE_RC_COMPILER ${{ matrix.rc }})" >> cross.cmake
|
echo "set(CMAKE_RC_COMPILER ${{ matrix.rc }})" >> cross.cmake
|
||||||
fi
|
fi
|
||||||
@@ -132,11 +119,9 @@ jobs:
|
|||||||
- name: Build LWS
|
- name: Build LWS
|
||||||
run: |
|
run: |
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
|
|
||||||
# Common Flags
|
|
||||||
SDK_DIR="/opt/wownero-sdk"
|
SDK_DIR="/opt/wownero-sdk"
|
||||||
|
|
||||||
# Force finding these libs in the SDK explicitly
|
# Explicit Library Paths
|
||||||
LIBS="-DZSTD_LIBRARY=$SDK_DIR/lib/libzstd.a \
|
LIBS="-DZSTD_LIBRARY=$SDK_DIR/lib/libzstd.a \
|
||||||
-DZSTD_INCLUDE_DIR=$SDK_DIR/include \
|
-DZSTD_INCLUDE_DIR=$SDK_DIR/include \
|
||||||
-DLIBEVENT_LIBRARY=$SDK_DIR/lib/libevent.a \
|
-DLIBEVENT_LIBRARY=$SDK_DIR/lib/libevent.a \
|
||||||
@@ -144,15 +129,12 @@ jobs:
|
|||||||
-DHIDAPI_INCLUDE_DIR=$SDK_DIR/include \
|
-DHIDAPI_INCLUDE_DIR=$SDK_DIR/include \
|
||||||
-DHIDAPI_LIBRARY=$SDK_DIR/lib/libhidapi.a"
|
-DHIDAPI_LIBRARY=$SDK_DIR/lib/libhidapi.a"
|
||||||
|
|
||||||
# Windows specific Linker Flags
|
|
||||||
if [ "${{ matrix.sys }}" == "Windows" ]; then
|
if [ "${{ matrix.sys }}" == "Windows" ]; then
|
||||||
LINK_FLAGS="-static -Wl,--allow-multiple-definition -L$SDK_DIR/lib"
|
LINK_FLAGS="-static -Wl,--allow-multiple-definition -L$SDK_DIR/lib"
|
||||||
else
|
else
|
||||||
# Linux needs implicit lookup path
|
|
||||||
LINK_FLAGS="-L$SDK_DIR/lib"
|
LINK_FLAGS="-L$SDK_DIR/lib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run CMake using the Toolchain file
|
|
||||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cross.cmake \
|
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cross.cmake \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DBUILD_STATIC=ON \
|
-DBUILD_STATIC=ON \
|
||||||
@@ -191,7 +173,7 @@ jobs:
|
|||||||
path: release/wownero-lws-${{ matrix.target }}.*
|
path: release/wownero-lws-${{ matrix.target }}.*
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# 2. MACOS (Hybrid)
|
# 2. MACOS
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
build-macos:
|
build-macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
@@ -222,6 +204,7 @@ jobs:
|
|||||||
- name: Patch Source Code
|
- name: Patch Source Code
|
||||||
run: |
|
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/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
|
- name: Install CMake Only
|
||||||
run: brew install cmake
|
run: brew install cmake
|
||||||
|
|||||||
Reference in New Issue
Block a user