Files
wownero-lws/.gitea/workflows/build.yaml
such-gitea 44b3155116
All checks were successful
Build Wowlet / build-macos (push) Successful in 1m33s
Update .gitea/workflows/build.yaml
2026-01-05 06:42:31 -08:00

69 lines
2.5 KiB
YAML

name: Build Wowlet
on:
push:
workflow_dispatch:
jobs:
build-macos:
runs-on: macos-latest # Runs on your Mac Mini
steps:
- name: Manual Checkout (Local)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Cleaning workspace..."
rm -rf *
# 1. (Optional) Safety config just in case
git config --global --add safe.directory '*'
# 2. Clone using LOCALHOST (Port 3000)
# We switch to HTTP to bypass SSL/Certificate errors entirely
echo "Cloning from Localhost..."
git clone http://oauth2:$GITHUB_TOKEN@localhost:3000/${{ github.repository }}.git .
# 3. Update Submodules
# We keep the forced HTTPS for submodules (since they live on GitHub/Codeberg)
# But we do NOT force it for the main repo anymore.
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: |
echo "Checking dependency versions..."
cmake --version
qmake --version || echo "QMake found via brew"
- name: Patch for macOS (Remove librt)
run: |
echo "Patching CMakeLists to remove Linux-only 'rt' library..."
# 1. Use Perl to replace 'rt' with nothing, respecting word boundaries (\b).
# This catches " rt ", " rt)", " rt", etc., regardless of whitespace.
perl -i -pe 's/\brt\b//g' src/CMakeLists.txt
# 2. Just in case it's in the root file too (some forks do this)
if [ -f "CMakeLists.txt" ]; then
perl -i -pe 's/\brt\b//g' CMakeLists.txt
fi
# 3. Print the file to the log so we can verify the patch worked (Debugging)
echo "--- DEBUG: src/CMakeLists.txt content after patch ---"
grep -C 5 "target_link_libraries" src/CMakeLists.txt || true
- name: Build macOS
run: |
mkdir build
cd build
# Standard CMake build for Mac
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix qt@5) -DCMAKE_BUILD_TYPE=Release
make -j$(sysctl -n hw.ncpu)
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: wowlet-macos
path: build/wowlet.app