144 lines
4.2 KiB
YAML
144 lines
4.2 KiB
YAML
name: Build Qt Application
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v4
|
|
with:
|
|
version: "6.5.*"
|
|
modules: "qt5compat"
|
|
cache: true
|
|
tools: "tools_ninja"
|
|
install-deps: "true"
|
|
|
|
- name: Build with qmake
|
|
run: |
|
|
qmake Clouck.pro CONFIG+=release
|
|
make
|
|
|
|
- name: Create macOS Bundle
|
|
run: |
|
|
macdeployqt build/Clouck.app -dmg
|
|
|
|
- name: Upload macOS Build
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Clouck-qmake
|
|
path: build/Clouck.dmg
|
|
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup MSVC Environment
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v4
|
|
with:
|
|
version: "6.5.*"
|
|
modules: "qt5compat"
|
|
cache: true
|
|
tools: "tools_ninja"
|
|
install-deps: "true"
|
|
|
|
- name: Build with qmake
|
|
shell: cmd
|
|
run: |
|
|
qmake Clouck.pro CONFIG+=release
|
|
nmake
|
|
|
|
- name: Deploy Windows Build
|
|
run: |
|
|
mkdir Clouck-windows-dist
|
|
copy build\Clouck.exe Clouck-windows-dist\
|
|
windeployqt --release Clouck-windows-dist\Clouck.exe
|
|
|
|
- name: Upload Windows Build
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Clouck-windows-qmake
|
|
path: Clouck-windows-dist
|
|
|
|
# build-linux:
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# - uses: actions/checkout@v6
|
|
|
|
# - name: Install Dependencies
|
|
# run: |
|
|
# sudo apt-get update
|
|
# sudo apt-get install -y build-essential qt6-base-dev qt6-tools-dev libx11-dev libxfixes-dev
|
|
|
|
# - name: Install Qt
|
|
# uses: jurplel/install-qt-action@v4
|
|
# with:
|
|
# version: "6.5.*"
|
|
# modules: "qt5compat"
|
|
# cache: true
|
|
|
|
# - name: Build with qmake
|
|
# run: |
|
|
# qmake Clouck.pro CONFIG+=release
|
|
# make
|
|
|
|
# - name: Create Linux Distribution
|
|
# run: |
|
|
# mkdir -p Clouck-linux-dist
|
|
# cp Clouck Clouck-linux-dist/
|
|
# ldd Clouck | grep -o '/lib[^ ]*' | xargs -I {} cp {} Clouck-linux-dist/ 2>/dev/null || true
|
|
|
|
# - name: Upload Linux Build
|
|
# uses: actions/upload-artifact@v7
|
|
# with:
|
|
# name: Clouck-linux-qmake
|
|
# path: Clouck-linux-dist
|
|
|
|
build-cmake:
|
|
strategy:
|
|
matrix:
|
|
os: [ windows-latest, macos-latest ]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v4
|
|
with:
|
|
version: "6.5.*"
|
|
modules: "qt5compat"
|
|
cache: true
|
|
|
|
- name: Install Linux Dependencies
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential cmake libx11-dev libxfixes-dev
|
|
|
|
- name: Configure CMake
|
|
run: |
|
|
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: Build with CMake
|
|
run: cmake --build build --config Release
|
|
|
|
- name: Upload CMake Build
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Clouck-${{ runner.os }}-cmake
|
|
path: build/Clouck*
|