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 2m16s
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 2m20s
Build Wownero LWS (Static / Boost 1.90) / build-macos (x86_64, macos-x64, x86_64-apple-darwin11) (push) Failing after 1m4s
Build Wownero LWS (Static / Boost 1.90) / build-cross (gcc, g++, , x86_64, Linux, /, x86_64-linux-gnu) (push) Failing after 1m14s
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 1m55s
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 56s
Some checks failed
Build Wownero LWS (Static / Boost 1.90) / build-macos (arm64, macos-arm64, aarch64-apple-darwin11) (push) Failing after 2m16s
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 2m20s
Build Wownero LWS (Static / Boost 1.90) / build-macos (x86_64, macos-x64, x86_64-apple-darwin11) (push) Failing after 1m4s
Build Wownero LWS (Static / Boost 1.90) / build-cross (gcc, g++, , x86_64, Linux, /, x86_64-linux-gnu) (push) Failing after 1m14s
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 1m55s
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 56s
This commit is contained in:
@@ -11,7 +11,7 @@ env:
|
||||
|
||||
jobs:
|
||||
# ------------------------------------------------------------------
|
||||
# 1. LINUX & WINDOWS
|
||||
# 1. CROSS PLATFORM BUILDS
|
||||
# ------------------------------------------------------------------
|
||||
build-cross:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -22,22 +22,39 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Linux x64
|
||||
- target: x86_64-linux-gnu
|
||||
platform: linux-x64
|
||||
cmake_sys: Linux
|
||||
sys: Linux
|
||||
proc: x86_64
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
ext: ""
|
||||
sysroot: "/" # Native sysroot
|
||||
# Linux ARM64
|
||||
- target: aarch64-linux-gnu
|
||||
platform: linux-arm64
|
||||
cmake_sys: Linux
|
||||
sys: Linux
|
||||
proc: aarch64
|
||||
cc: aarch64-linux-gnu-gcc
|
||||
cxx: aarch64-linux-gnu-g++
|
||||
ext: ""
|
||||
sysroot: "/usr/aarch64-linux-gnu" # Cross sysroot
|
||||
# Linux RISC-V
|
||||
- target: riscv64-linux-gnu
|
||||
platform: linux-riscv64
|
||||
cmake_sys: Linux
|
||||
sys: Linux
|
||||
proc: riscv64
|
||||
cc: riscv64-linux-gnu-gcc
|
||||
cxx: riscv64-linux-gnu-g++
|
||||
ext: ""
|
||||
sysroot: "/usr/riscv64-linux-gnu" # Cross sysroot
|
||||
# Windows x64
|
||||
- target: x86_64-w64-mingw32
|
||||
platform: windows-x64
|
||||
cmake_sys: Windows
|
||||
sys: Windows
|
||||
proc: x86_64
|
||||
cc: x86_64-w64-mingw32-gcc
|
||||
cxx: x86_64-w64-mingw32-g++
|
||||
rc: x86_64-w64-mingw32-windres
|
||||
ext: ".exe"
|
||||
sysroot: "/usr/x86_64-w64-mingw32" # Cross sysroot
|
||||
|
||||
steps:
|
||||
- name: Fix DNS
|
||||
@@ -51,18 +68,16 @@ 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: Code Patches (Final + ICU) ---
|
||||
# --- FIX 1: Code Patches (Final + ICU + Readline) ---
|
||||
- name: Patch Source Code
|
||||
run: |
|
||||
echo "Patching src/rest_server.cpp (Removing final keyword)..."
|
||||
echo "Patching 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
|
||||
@@ -79,7 +94,6 @@ jobs:
|
||||
mkdir -p /opt/wownero-sdk
|
||||
tar -xf sdk.tar.gz -C /opt/wownero-sdk
|
||||
|
||||
# --- 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
|
||||
@@ -92,7 +106,7 @@ jobs:
|
||||
tar -xf cmake.tar.gz
|
||||
echo "$(pwd)/cmake-3.28.1-linux-x86_64/bin" >> $GITHUB_PATH
|
||||
|
||||
# --- FIX 3: Toolchain with 'BOTH' Search Mode (Fixes 'RT' error) ---
|
||||
# --- FIX 2: Toolchain includes SYSROOT (Fixes 'RT' and 'ZLIB' not found) ---
|
||||
- name: Generate Toolchain File
|
||||
run: |
|
||||
cat <<EOF > cross.cmake
|
||||
@@ -101,13 +115,14 @@ jobs:
|
||||
set(CMAKE_C_COMPILER ${{ matrix.cc }})
|
||||
set(CMAKE_CXX_COMPILER ${{ matrix.cxx }})
|
||||
|
||||
# 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)
|
||||
# LOOK HERE: We add the sysroot so it finds /usr/lib/librt.a etc.
|
||||
set(CMAKE_FIND_ROOT_PATH /opt/wownero-sdk ${{ matrix.sysroot }})
|
||||
|
||||
# Allow looking in both SDK and System
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
|
||||
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
EOF
|
||||
@@ -121,7 +136,7 @@ jobs:
|
||||
mkdir build && cd build
|
||||
SDK_DIR="/opt/wownero-sdk"
|
||||
|
||||
# Explicit Library Paths
|
||||
# Define libraries explicitly to avoid CMake guessing wrong
|
||||
LIBS="-DZSTD_LIBRARY=$SDK_DIR/lib/libzstd.a \
|
||||
-DZSTD_INCLUDE_DIR=$SDK_DIR/include \
|
||||
-DLIBEVENT_LIBRARY=$SDK_DIR/lib/libevent.a \
|
||||
@@ -129,12 +144,16 @@ jobs:
|
||||
-DHIDAPI_INCLUDE_DIR=$SDK_DIR/include \
|
||||
-DHIDAPI_LIBRARY=$SDK_DIR/lib/libhidapi.a"
|
||||
|
||||
# Linker Flags
|
||||
if [ "${{ matrix.sys }}" == "Windows" ]; then
|
||||
# Windows: Static + Allow Duplicates (Boost)
|
||||
LINK_FLAGS="-static -Wl,--allow-multiple-definition -L$SDK_DIR/lib"
|
||||
else
|
||||
# Linux: Just path
|
||||
LINK_FLAGS="-L$SDK_DIR/lib"
|
||||
fi
|
||||
|
||||
# --- FIX 3: Disable Readline explicitly (-DUSE_READLINE=OFF) ---
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cross.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_STATIC=ON \
|
||||
@@ -152,6 +171,7 @@ jobs:
|
||||
-DSodium_LIBRARY_RELEASE="$SDK_DIR/lib/libsodium.a" \
|
||||
-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
|
||||
|
||||
@@ -161,7 +181,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
|
||||
@@ -173,7 +193,7 @@ jobs:
|
||||
path: release/wownero-lws-${{ matrix.target }}.*
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# 2. MACOS
|
||||
# 2. MACOS (Hybrid)
|
||||
# ------------------------------------------------------------------
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
@@ -204,7 +224,6 @@ 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
|
||||
@@ -257,18 +276,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