Files
wownero-lws/.gitea/workflows/build.yaml
such-gitea 9577d18354
Some checks failed
Build Wownero LWS / build-macos (push) Successful in 1m38s
Build Wownero LWS / build-linux (push) Successful in 2m0s
Build Wownero LWS / build-windows (push) Failing after 59s
Update .gitea/workflows/build.yaml
2026-01-07 09:16:40 -08:00

192 lines
6.7 KiB
YAML

name: Build Wownero LWS
on:
push:
workflow_dispatch:
# --- GLOBAL FIX FOR SSL UPLOADS ---
env:
NODE_TLS_REJECT_UNAUTHORIZED: '0'
# ----------------------------------
jobs:
build-macos:
runs-on: macos-latest
steps:
- name: Manual Checkout (Local)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Cleaning workspace..."
rm -rf *
git config --global --add safe.directory '*'
# Clone from Localhost (Port 3000)
echo "Cloning from Localhost..."
git clone http://oauth2:$GITHUB_TOKEN@localhost:3000/${{ github.repository }}.git .
# Update Submodules
git config --global url."https://github.com/".insteadOf "git@github.com:"
git config --global url."https://codeberg.org/".insteadOf "git@codeberg.org:"
echo "Initializing submodules..."
git submodule update --init --recursive
- name: Prepare Environment
run: |
cmake --version
qmake --version || echo "QMake found via brew"
- name: Patch for macOS (Remove librt)
run: |
echo "Patching CMakeLists..."
perl -i -pe 's/\brt\b//g' src/CMakeLists.txt
if [ -f "CMakeLists.txt" ]; then
perl -i -pe 's/\brt\b//g' CMakeLists.txt
fi
- name: Build macOS
run: |
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix qt@5) -DCMAKE_BUILD_TYPE=Release
make -j$(sysctl -n hw.ncpu)
- name: Package macOS
run: |
cd build/src
zip ../../wownero-lws-macos.zip wownero-lws-daemon wownero-lws-admin wownero-lws-client
- name: Upload macOS Artifact
uses: actions/upload-artifact@v3
with:
name: wownero-lws-macos
path: wownero-lws-macos.zip
- name: Release macOS
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: wownero-lws-macos.zip
build-linux:
runs-on: ubuntu-latest
steps:
- name: Manual Checkout (LAN)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
rm -rf *
# Clone from Mac's LAN IP
git clone http://oauth2:$GITHUB_TOKEN@192.168.88.230:3000/${{ github.repository }}.git .
git config --global url."https://github.com/".insteadOf "git@github.com:"
git submodule update --init --recursive
- name: Build Linux
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
- name: Package Linux
run: |
cd build/src
zip ../../wownero-lws-linux.zip wownero-lws-daemon wownero-lws-admin wownero-lws-client
- name: Upload Linux Artifact
uses: actions/upload-artifact@v3
with:
name: wownero-lws-linux
path: wownero-lws-linux.zip
- name: Release Linux
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: wownero-lws-linux.zip
build-windows:
runs-on: windows-latest
steps:
- name: Manual Checkout (LAN)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
rm -rf *
git clone http://oauth2:$GITHUB_TOKEN@192.168.88.230:3000/${{ github.repository }}.git .
git config --global url."https://github.com/".insteadOf "git@github.com:"
git submodule update --init --recursive
# --- 1. PROTOCOL A: CACHE PURGE (Fixes Checksum Error) ---
- name: Purge Corrupted Dependency Cache
run: |
echo "Forensic cleanup initiated..."
# Target the specific files identified in the failure log
rm -rf external/monero/contrib/depends/sources/boost_1_80_0.tar.gz
rm -rf external/monero/contrib/depends/sources/download-stamps/*boost*
# Clean build artifacts to prevent 'patch' confusion
rm -rf external/monero/contrib/depends/work/build/x86_64-w64-mingw32/boost
rm -rf external/monero/contrib/depends/built/x86_64-w64-mingw32/boost
rm -rf external/monero/contrib/depends/work/download/boost*
rm -rf external/monero/contrib/depends/packages/boost
# --- 2. CONFIGURE BOOST 1.80 (Fixes Logic/Patch Error) ---
- name: Configure Boost 1.80.0
run: |
echo "Injecting Boost 1.80.0 configuration..."
BOOST_MK="external/monero/contrib/depends/packages/boost.mk"
# 1. Update Version to 1.80.0
sed -i 's/1_69_0/1_80_0/g' $BOOST_MK
sed -i 's/1.69.0/1.80.0/g' $BOOST_MK
# 2. Set Correct SHA256 for .tar.gz (Protocol B verification)
sed -i 's/sha256_hash=.*$/sha256_hash=4b2136f98bdd1f5857f1c3dea9ac2018effe65286cf251534b6ae20cc45e1847/g' $BOOST_MK
# 3. Add Missing Libraries
sed -i 's/chrono,/chrono,context,coroutine,/g' $BOOST_MK
# 4. NEUTRALIZE PATCHES (The "Grep-v" Strategy)
# We remove ANY line containing the word "patches".
# This guarantees the Makefile variable is undefined/empty.
# This prevents "No such file" and "Hunk failed" errors.
grep -v "patches" $BOOST_MK > boost_clean.mk
mv boost_clean.mk $BOOST_MK
# Debug: Verify the file is clean
echo "--- Content of boost.mk (Patches removed) ---"
cat $BOOST_MK
# --- 3. BUILD DEPENDENCIES ---
- name: Build Windows Dependencies
run: |
cd external/monero/contrib/depends
make HOST=x86_64-w64-mingw32 -j$(nproc)
# --- 4. PATCH APP CODE ---
- name: Patch App Source Code
run: |
echo "Fixing missing <cstdint> include for GCC 13..."
sed -i 's/#include <list>/#include <list>\n#include <cstdint>/' external/monero/contrib/epee/include/net/http_base.h
# --- 5. COMPILE APP ---
- name: Build Windows (Cross-Compile)
run: |
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../external/monero/contrib/depends/x86_64-w64-mingw32/share/toolchain.cmake -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
- name: Package Windows
run: |
cd build/src
zip ../../wownero-lws-windows.zip wownero-lws-daemon.exe wownero-lws-admin.exe wownero-lws-client.exe
- name: Upload Windows Artifact
uses: actions/upload-artifact@v3
with:
name: wownero-lws-windows
path: wownero-lws-windows.zip
- name: Release Windows
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: wownero-lws-windows.zip