mirror of
https://codeberg.org/wownero/wownero-lws
synced 2026-01-11 08:05:16 -08:00
Update .gitea/workflows/build.yaml
This commit is contained in:
@@ -103,21 +103,17 @@ jobs:
|
|||||||
files: wownero-lws-linux.zip
|
files: wownero-lws-linux.zip
|
||||||
|
|
||||||
build-windows:
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Manual Checkout (LAN)
|
- name: Manual Checkout (LAN)
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# NOTE: 'rm -rf *' wipes the workspace. This ensures a clean build but
|
# WARNING: 'rm -rf *' deletes the cached dependencies every run.
|
||||||
# deletes the cached 'depends' folder, forcing a Boost rebuild every time.
|
# If builds take too long, consider removing this line later.
|
||||||
# If builds are too slow, we can optimize this later.
|
|
||||||
echo "Cleaning workspace..."
|
echo "Cleaning workspace..."
|
||||||
rm -rf *
|
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 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://github.com/".insteadOf "git@github.com:"
|
||||||
git config --global url."https://codeberg.org/".insteadOf "git@codeberg.org:"
|
git config --global url."https://codeberg.org/".insteadOf "git@codeberg.org:"
|
||||||
@@ -125,8 +121,6 @@ jobs:
|
|||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
||||||
- name: Build Windows via Docker
|
- 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: |
|
run: |
|
||||||
echo "Starting Docker Build..."
|
echo "Starting Docker Build..."
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
@@ -136,20 +130,29 @@ jobs:
|
|||||||
/bin/bash -c "
|
/bin/bash -c "
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# 1. Build Dependencies (Boost, OpenSSL, etc.)
|
# --- FIX 1: Trust the repo (Fixes 'dubious ownership' error) ---
|
||||||
# This runs the standard Monero cross-compile setup
|
git config --global --add safe.directory '*'
|
||||||
echo 'Building Dependencies...'
|
|
||||||
|
# --- 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
|
cd external/monero/contrib/depends
|
||||||
make HOST=x86_64-w64-mingw32 -j$(nproc)
|
make HOST=x86_64-w64-mingw32 -j$(nproc)
|
||||||
|
|
||||||
# 2. Configure Project
|
# 2. Configure Project
|
||||||
# We use the toolchain file generated by step 1
|
echo 'Configuring Wownero LWS...'
|
||||||
echo 'Configuring Project...'
|
|
||||||
cd ../../../..
|
cd ../../../..
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../external/monero/contrib/depends/x86_64-w64-mingw32/share/toolchain.cmake -DCMAKE_BUILD_TYPE=Release
|
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...'
|
echo 'Compiling...'
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
"
|
"
|
||||||
@@ -157,7 +160,6 @@ jobs:
|
|||||||
- name: Package Windows
|
- name: Package Windows
|
||||||
run: |
|
run: |
|
||||||
cd build/src
|
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
|
zip ../../wownero-lws-windows.zip wownero-lws-daemon.exe wownero-lws-admin.exe wownero-lws-client.exe
|
||||||
|
|
||||||
- name: Upload Windows Artifact
|
- name: Upload Windows Artifact
|
||||||
|
|||||||
Reference in New Issue
Block a user