forked from such-gitea/wownero-lws
Update .gitea/workflows/build.yaml
Some checks failed
Build Wownero LWS (Static / Boost 1.90) / build-cross (aarch64-linux-gnu-gcc, aarch64-linux-gnu-g++, , aarch64, Linux, /usr/aarch64-linux-gnu, aarch64-linux-gnu) (push) Failing after 57s
Build Wownero LWS (Static / Boost 1.90) / build-macos (arm64, macos-arm64, aarch64-apple-darwin11) (push) Failing after 2m1s
Build Wownero LWS (Static / Boost 1.90) / build-cross (gcc, g++, , x86_64, Linux, , x86_64-linux-gnu) (push) Failing after 1m57s
Build Wownero LWS (Static / Boost 1.90) / build-macos (x86_64, macos-x64, x86_64-apple-darwin11) (push) Failing after 58s
Build Wownero LWS (Static / Boost 1.90) / build-cross (riscv64-linux-gnu-gcc, riscv64-linux-gnu-g++, , riscv64, Linux, /usr/riscv64-linux-gnu, riscv64-linux-gnu) (push) Failing after 52s
Build Wownero LWS (Static / Boost 1.90) / build-cross (x86_64-w64-mingw32-gcc, x86_64-w64-mingw32-g++, .exe, x86_64, x86_64-w64-mingw32-windres, Windows, /usr/x86_64-w64-mingw32, x86_64-w64-mingw32) (push) Failing after 53s
Some checks failed
Build Wownero LWS (Static / Boost 1.90) / build-cross (aarch64-linux-gnu-gcc, aarch64-linux-gnu-g++, , aarch64, Linux, /usr/aarch64-linux-gnu, aarch64-linux-gnu) (push) Failing after 57s
Build Wownero LWS (Static / Boost 1.90) / build-macos (arm64, macos-arm64, aarch64-apple-darwin11) (push) Failing after 2m1s
Build Wownero LWS (Static / Boost 1.90) / build-cross (gcc, g++, , x86_64, Linux, , x86_64-linux-gnu) (push) Failing after 1m57s
Build Wownero LWS (Static / Boost 1.90) / build-macos (x86_64, macos-x64, x86_64-apple-darwin11) (push) Failing after 58s
Build Wownero LWS (Static / Boost 1.90) / build-cross (riscv64-linux-gnu-gcc, riscv64-linux-gnu-g++, , riscv64, Linux, /usr/riscv64-linux-gnu, riscv64-linux-gnu) (push) Failing after 52s
Build Wownero LWS (Static / Boost 1.90) / build-cross (x86_64-w64-mingw32-gcc, x86_64-w64-mingw32-g++, .exe, x86_64, x86_64-w64-mingw32-windres, Windows, /usr/x86_64-w64-mingw32, x86_64-w64-mingw32) (push) Failing after 53s
This commit is contained in:
@@ -10,9 +10,6 @@ env:
|
||||
CORE_TAG: 'v0.11.4.0'
|
||||
|
||||
jobs:
|
||||
# ------------------------------------------------------------------
|
||||
# 1. CROSS PLATFORM BUILDS
|
||||
# ------------------------------------------------------------------
|
||||
build-cross:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
@@ -22,33 +19,34 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Linux x64 (Native - Special handling)
|
||||
# Linux x64 (Native)
|
||||
- target: x86_64-linux-gnu
|
||||
sys: Linux
|
||||
proc: x86_64
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
ext: ""
|
||||
mode: native
|
||||
# Linux ARM64
|
||||
sysroot: "" # Native builds don't need explicit sysroot
|
||||
|
||||
# Linux ARM64 (Cross)
|
||||
- target: aarch64-linux-gnu
|
||||
sys: Linux
|
||||
proc: aarch64
|
||||
cc: aarch64-linux-gnu-gcc
|
||||
cxx: aarch64-linux-gnu-g++
|
||||
ext: ""
|
||||
mode: cross
|
||||
sysroot: /usr/aarch64-linux-gnu
|
||||
# Linux RISC-V
|
||||
sysroot: "/usr/aarch64-linux-gnu"
|
||||
|
||||
# Linux RISC-V (Cross)
|
||||
- target: riscv64-linux-gnu
|
||||
sys: Linux
|
||||
proc: riscv64
|
||||
cc: riscv64-linux-gnu-gcc
|
||||
cxx: riscv64-linux-gnu-g++
|
||||
ext: ""
|
||||
mode: cross
|
||||
sysroot: /usr/riscv64-linux-gnu
|
||||
# Windows x64
|
||||
sysroot: "/usr/riscv64-linux-gnu"
|
||||
|
||||
# Windows x64 (Cross)
|
||||
- target: x86_64-w64-mingw32
|
||||
sys: Windows
|
||||
proc: x86_64
|
||||
@@ -56,8 +54,7 @@ jobs:
|
||||
cxx: x86_64-w64-mingw32-g++
|
||||
rc: x86_64-w64-mingw32-windres
|
||||
ext: ".exe"
|
||||
mode: cross
|
||||
sysroot: /usr/x86_64-w64-mingw32
|
||||
sysroot: "/usr/x86_64-w64-mingw32"
|
||||
|
||||
steps:
|
||||
- name: Fix DNS
|
||||
@@ -74,16 +71,16 @@ jobs:
|
||||
git clone http://oauth2:$GITHUB_TOKEN@git.such.software:3000/${{ github.repository }}.git .
|
||||
git submodule update --init --recursive
|
||||
|
||||
# --- FIX 1: Code Patches (Final + ALL ICU Checks + Readline) ---
|
||||
# --- PATCHES ---
|
||||
- name: Patch Source Code
|
||||
run: |
|
||||
echo "Patching src/rest_server.cpp..."
|
||||
echo "Removing 'final' keyword from 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 checks)..."
|
||||
# Disable both icuio and icuin checks
|
||||
perl -pi -e 's/find_library\(ICUIO_LIBRARIES/# find_library(ICUIO_LIBRARIES/g' external/monero/CMakeLists.txt
|
||||
perl -pi -e 's/find_library\(ICUIN_LIBRARIES/# find_library(ICUIN_LIBRARIES/g' external/monero/CMakeLists.txt
|
||||
echo "Nuking ALL ICU checks in Monero CMake..."
|
||||
# This regex matches 'find_library(ICU' and comments out the whole line.
|
||||
# It fixes icuio, icuin, and icuuc failures on Windows.
|
||||
perl -pi -e 's/find_library\(ICU/# find_library(ICU/g' external/monero/CMakeLists.txt
|
||||
|
||||
- name: Download Static SDK
|
||||
run: |
|
||||
@@ -111,53 +108,44 @@ jobs:
|
||||
tar -xf cmake.tar.gz
|
||||
echo "$(pwd)/cmake-3.28.1-linux-x86_64/bin" >> $GITHUB_PATH
|
||||
|
||||
# --- FIX 2: Dynamic Toolchain (Native vs Cross) ---
|
||||
- name: Generate Toolchain File
|
||||
run: |
|
||||
cat <<EOF > cross.cmake
|
||||
set(CMAKE_SYSTEM_NAME ${{ matrix.sys }})
|
||||
set(CMAKE_SYSTEM_PROCESSOR ${{ matrix.proc }})
|
||||
set(CMAKE_C_COMPILER ${{ matrix.cc }})
|
||||
set(CMAKE_CXX_COMPILER ${{ matrix.cxx }})
|
||||
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
EOF
|
||||
|
||||
# Only set root path logic for TRUE cross-compilation (not native linux x64)
|
||||
if [ "${{ matrix.mode }}" == "cross" ]; then
|
||||
echo "set(CMAKE_FIND_ROOT_PATH /opt/wownero-sdk ${{ matrix.sysroot }})" >> cross.cmake
|
||||
echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> cross.cmake
|
||||
echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)" >> cross.cmake
|
||||
echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)" >> cross.cmake
|
||||
echo "set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)" >> cross.cmake
|
||||
fi
|
||||
|
||||
if [ "${{ matrix.sys }}" == "Windows" ]; then
|
||||
echo "set(CMAKE_RC_COMPILER ${{ matrix.rc }})" >> cross.cmake
|
||||
fi
|
||||
|
||||
- name: Build LWS
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
SDK_DIR="/opt/wownero-sdk"
|
||||
|
||||
# Define libraries explicitly to avoid CMake guessing wrong
|
||||
# Force specific libraries to avoid lookup errors
|
||||
# We use the STATIC (.a) files from our SDK
|
||||
LIBS="-DZSTD_LIBRARY=$SDK_DIR/lib/libzstd.a \
|
||||
-DZSTD_INCLUDE_DIR=$SDK_DIR/include \
|
||||
-DZLIB_LIBRARY=$SDK_DIR/lib/libz.a \
|
||||
-DZLIB_INCLUDE_DIR=$SDK_DIR/include \
|
||||
-DLIBEVENT_LIBRARY=$SDK_DIR/lib/libevent.a \
|
||||
-DLIBEVENT_INCLUDE_DIR=$SDK_DIR/include \
|
||||
-DHIDAPI_INCLUDE_DIR=$SDK_DIR/include \
|
||||
-DHIDAPI_LIBRARY=$SDK_DIR/lib/libhidapi.a"
|
||||
|
||||
# Linker Flags
|
||||
# Configure Platform specifics
|
||||
if [ "${{ matrix.sys }}" == "Windows" ]; then
|
||||
LINK_FLAGS="-static -Wl,--allow-multiple-definition -L$SDK_DIR/lib"
|
||||
# Windows: Static linking + multiple definition fix
|
||||
SYS_FLAGS="-DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DCMAKE_RC_COMPILER=${{ matrix.rc }} \
|
||||
-DCMAKE_EXE_LINKER_FLAGS='-static -Wl,--allow-multiple-definition -L$SDK_DIR/lib'"
|
||||
else
|
||||
LINK_FLAGS="-L$SDK_DIR/lib"
|
||||
# Linux: Set SYSROOT so it finds librt/libpthread correctly
|
||||
# We DO NOT set CMAKE_LINKER manually, let the compiler wrapper handle it.
|
||||
SYS_FLAGS="-DCMAKE_SYSTEM_NAME=Linux \
|
||||
-DCMAKE_EXE_LINKER_FLAGS='-L$SDK_DIR/lib'"
|
||||
|
||||
if [ "${{ matrix.sysroot }}" != "" ]; then
|
||||
SYS_FLAGS="$SYS_FLAGS -DCMAKE_SYSROOT=${{ matrix.sysroot }}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# --- FIX 3: Disable Readline explicitly (-DUSE_READLINE=OFF) ---
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cross.cmake \
|
||||
# Disable Readline explicitly
|
||||
cmake .. $SYS_FLAGS \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=${{ matrix.proc }} \
|
||||
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_STATIC=ON \
|
||||
-DCMAKE_PREFIX_PATH="$SDK_DIR" \
|
||||
@@ -175,7 +163,6 @@ jobs:
|
||||
-DLIBUSB_INCLUDE_DIR="$SDK_DIR/include" \
|
||||
-DLIBUSB_LIBRARY="$SDK_DIR/lib/libusb-1.0.a" \
|
||||
-DUSE_READLINE=OFF \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$LINK_FLAGS" \
|
||||
$LIBS
|
||||
|
||||
make -j$(nproc)
|
||||
@@ -184,7 +171,7 @@ jobs:
|
||||
run: |
|
||||
mkdir release
|
||||
if [ "${{ matrix.sys }}" == "Windows" ]; then
|
||||
zip -j release/wownero-lws-${{ matrix.platform }}.zip build/src/wownero-lws-daemon${{ matrix.ext }} build/src/wownero-lws-admin${{ matrix.ext }}
|
||||
zip -j release/wownero-lws-${{ matrix.target }}.zip build/src/wownero-lws-daemon${{ matrix.ext }} build/src/wownero-lws-admin${{ matrix.ext }}
|
||||
else
|
||||
tar -czf release/wownero-lws-${{ matrix.target }}.tar.gz -C build/src wownero-lws-daemon${{ matrix.ext }} wownero-lws-admin${{ matrix.ext }}
|
||||
fi
|
||||
@@ -227,8 +214,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
|
||||
perl -pi -e 's/find_library\(ICUIN_LIBRARIES/# find_library(ICUIN_LIBRARIES/g' external/monero/CMakeLists.txt
|
||||
perl -pi -e 's/find_library\(ICU/# find_library(ICU/g' external/monero/CMakeLists.txt
|
||||
|
||||
- name: Install CMake Only
|
||||
run: brew install cmake
|
||||
@@ -281,18 +267,4 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: wownero-lws-${{ matrix.platform }}
|
||||
path: release/wownero-lws-${{ matrix.platform }}.zip
|
||||
|
||||
release:
|
||||
needs: [build-cross, build-macos]
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Publish Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
wownero-lws-*/wownero-lws-*.tar.gz
|
||||
wownero-lws-*/wownero-lws-*.zip
|
||||
path: release/wownero-lws-${{ matrix.platform }}.zip
|
||||
Reference in New Issue
Block a user