name: CI Build on: push: branches: - '**' pull_request: jobs: build-windows: runs-on: windows steps: - name: Checkout uses: actions/checkout@v4 - name: Setup MSVC uses: ilammy/msvc-dev-cmd@v1 with: arch: x64 - name: Build shell: cmd run: | set PATH=C:\Qt\6.10.1\msvc2022_64\bin;C:\Qt\Tools\QtCreator\bin\jom;%PATH% if not exist build mkdir build cd build echo === Running qmake === qmake.exe ..\XPlor.pro -spec win32-msvc "CONFIG+=release" if errorlevel 1 exit /b 1 echo === Building with jom === jom.exe -j 1 if errorlevel 1 exit /b 1 echo === Build successful === - name: Deploy Qt shell: cmd run: | set PATH=C:\Qt\6.10.1\msvc2022_64\bin;%PATH% cd build\app\release windeployqt6.exe --release --no-translations app.exe if errorlevel 1 exit /b 1 echo === windeployqt successful === build-macos: runs-on: macos steps: - name: Checkout uses: actions/checkout@v4 - name: Build shell: bash run: | # Try multiple Qt locations for QT_PATH in ~/Qt/6.10.1/macos ~/Qt/6.9.0/macos ~/Qt/6.8.0/macos /opt/homebrew/opt/qt@6; do if [ -f "$QT_PATH/bin/qmake" ]; then echo "Found Qt at: $QT_PATH" export PATH="$QT_PATH/bin:$PATH" break fi done # Verify qmake exists which qmake || { echo "ERROR: qmake not found"; exit 1; } mkdir -p build cd build echo "=== Running qmake ===" qmake ../XPlor.pro -spec macx-clang "CONFIG+=release" echo "=== Building with make ===" make -j$(sysctl -n hw.ncpu) echo "=== Build successful ===" - name: Deploy Qt shell: bash run: | # Find Qt again for this step for QT_PATH in ~/Qt/6.10.1/macos ~/Qt/6.9.0/macos ~/Qt/6.8.0/macos /opt/homebrew/opt/qt@6; do if [ -f "$QT_PATH/bin/macdeployqt" ]; then export PATH="$QT_PATH/bin:$PATH" break fi done cd build/app if [ -d "XPlor.app" ]; then macdeployqt XPlor.app -verbose=1 fi echo "=== macdeployqt complete ===" build-ubuntu: runs-on: ubuntu steps: - name: Checkout uses: actions/checkout@v4 - name: Install Dependencies shell: bash run: | sudo apt-get update sudo apt-get install -y build-essential libgl1-mesa-dev zlib1g-dev - name: Build shell: bash run: | # Try multiple Qt locations for QT_PATH in ~/Qt/6.10.1/gcc_64 ~/Qt/6.9.0/gcc_64 ~/Qt/6.8.0/gcc_64 /opt/Qt/6.10.1/gcc_64 /usr/lib/qt6; do if [ -f "$QT_PATH/bin/qmake" ]; then echo "Found Qt at: $QT_PATH" export PATH="$QT_PATH/bin:$PATH" export LD_LIBRARY_PATH="$QT_PATH/lib:$LD_LIBRARY_PATH" break fi done # Verify qmake exists which qmake || { echo "ERROR: qmake not found"; exit 1; } mkdir -p build cd build echo "=== Running qmake ===" qmake ../XPlor.pro -spec linux-g++ "CONFIG+=release" echo "=== Building with make ===" make -j$(nproc) echo "=== Build successful ==="