njohnson 5a8eff078d
Some checks failed
CI Build / build-macos (push) Failing after 15s
CI Build / build-windows (push) Failing after 53s
Add macOS build to CI pipeline
2026-01-13 13:57:26 -05:00

94 lines
1.9 KiB
YAML

name: CI Build
on:
push:
branches:
- '**'
pull_request:
jobs:
build-windows:
runs-on: windows
env:
QT_PATH: C:\Qt\6.10.0\msvc2022_64
JOM_PATH: C:\Qt\Tools\QtCreator\bin\jom
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=%QT_PATH%\bin;%JOM_PATH%;%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=%QT_PATH%\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
env:
QT_PATH: ~/Qt/6.10.0/macos
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
shell: bash
run: |
export PATH="$QT_PATH/bin:$PATH"
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: |
export PATH="$QT_PATH/bin:$PATH"
cd build/app
if [ -d "XPlor.app" ]; then
macdeployqt XPlor.app -verbose=1
elif [ -f "release/app" ]; then
echo "Binary built at release/app"
fi
echo "=== macdeployqt successful ==="