forked from such-gitea/wownero-lws
Update .gitea/workflows/build.yaml
This commit is contained in:
@@ -103,21 +103,17 @@ jobs:
|
||||
files: wownero-lws-linux.zip
|
||||
|
||||
build-windows:
|
||||
# We use the Linux runner because that is where Docker is installed and where
|
||||
# we can run the Linux-based cross-compilation toolchain.
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Manual Checkout (LAN)
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# NOTE: 'rm -rf *' wipes the workspace. This ensures a clean build but
|
||||
# deletes the cached 'depends' folder, forcing a Boost rebuild every time.
|
||||
# If builds are too slow, we can optimize this later.
|
||||
# WARNING: 'rm -rf *' deletes the cached dependencies every run.
|
||||
# If builds take too long, consider removing this line later.
|
||||
echo "Cleaning workspace..."
|
||||
rm -rf *
|
||||
|
||||
# Clone from Mac's LAN IP (Matches your logic in build-linux)
|
||||
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 config --global url."https://codeberg.org/".insteadOf "git@codeberg.org:"
|
||||
@@ -125,8 +121,6 @@ jobs:
|
||||
git submodule update --init --recursive
|
||||
|
||||
- name: Build Windows via Docker
|
||||
# We use the 'wownero-builder' image you created.
|
||||
# We mount the current directory ($PWD) to /source so artifacts are saved to the host.
|
||||
run: |
|
||||
echo "Starting Docker Build..."
|
||||
docker run --rm \
|
||||
@@ -136,20 +130,29 @@ jobs:
|
||||
/bin/bash -c "
|
||||
set -e
|
||||
|
||||
# 1. Build Dependencies (Boost, OpenSSL, etc.)
|
||||
# This runs the standard Monero cross-compile setup
|
||||
echo 'Building Dependencies...'
|
||||
# --- FIX 1: Trust the repo (Fixes 'dubious ownership' error) ---
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
# --- FIX 2: Relax Boost Requirement ---
|
||||
# The 'depends' system built Boost 1.69. The CMake file wants 1.70.
|
||||
# We change the requirement to 1.69 to match what we have.
|
||||
echo 'Patching CMakeLists.txt to accept Boost 1.69...'
|
||||
sed -i 's/1.70/1.69/g' CMakeLists.txt || true
|
||||
sed -i 's/1\.70/1\.69/g' CMakeLists.txt || true
|
||||
|
||||
# 1. Build Dependencies
|
||||
# Since these are already built in your folder, this step will be instant!
|
||||
echo 'Checking Dependencies...'
|
||||
cd external/monero/contrib/depends
|
||||
make HOST=x86_64-w64-mingw32 -j$(nproc)
|
||||
|
||||
# 2. Configure Project
|
||||
# We use the toolchain file generated by step 1
|
||||
echo 'Configuring Project...'
|
||||
echo 'Configuring Wownero LWS...'
|
||||
cd ../../../..
|
||||
mkdir -p build && cd build
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../external/monero/contrib/depends/x86_64-w64-mingw32/share/toolchain.cmake -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
# 3. Compile the actual application
|
||||
# 3. Compile
|
||||
echo 'Compiling...'
|
||||
make -j$(nproc)
|
||||
"
|
||||
@@ -157,7 +160,6 @@ jobs:
|
||||
- name: Package Windows
|
||||
run: |
|
||||
cd build/src
|
||||
# The .exe files were created by the docker container and exist on the host now
|
||||
zip ../../wownero-lws-windows.zip wownero-lws-daemon.exe wownero-lws-admin.exe wownero-lws-client.exe
|
||||
|
||||
- name: Upload Windows Artifact
|
||||
|
||||
Reference in New Issue
Block a user