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 src/CMakeLists.txt to remove Linux-only 'rt' library..." # Use sed to find " rt " and replace it with a space. # The -i '' is required for macOS sed to edit in-place. sed -i '' 's/ rt / /g' src/CMakeLists.txt sed -i '' 's/ rt)/ )/g' src/CMakeLists.txt - 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