Skip to content

修改qmake编译,以及各桌面端打包脚本; #36

修改qmake编译,以及各桌面端打包脚本;

修改qmake编译,以及各桌面端打包脚本; #36

Workflow file for this run

name: CMake Build
on:
push:
paths-ignore: # 下列文件的变更不触发部署,可以自行添加
- '**/picture/**'
- 'packaging/**'
- '.clang-format'
- '.gitignore'
- 'LICENSE'
- 'README*'
pull_request:
paths-ignore: # 下列文件的变更不触发部署,可以自行添加
- '**/picture/**'
- 'packaging/**'
- '.clang-format'
- '.gitignore'
- 'LICENSE'
- 'README*'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- macos-latest
- ubuntu-latest
qt_ver:
- 6.6.0
build_type:
- "RelWithDebInfo"
generators:
- "Ninja"
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
install-deps: 'true'
modules: 'addons.qtcharts addons.qtnetworkauth'
cache: 'true'
- name: Install dependencies on windows
if: startsWith(matrix.os, 'windows')
run: |
choco install ninja
ninja --version
cmake --version
- name: Install dependencies on macos
if: startsWith(matrix.os, 'macos')
run: |
brew install ninja
ninja --version
cmake --version
- name: Install dependencies on ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y ninja-build build-essential libgl1-mesa-dev
ninja --version
cmake --version
gcc --version
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Enable Developer Command Prompt
if: startsWith(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1.12.1
with:
arch: amd64
- name: Configure windows
if: startsWith(matrix.os, 'windows')
shell: bash
run: |
cmake \
-S . \
-B ./build \
-DCMAKE_C_COMPILER=cl \
-DCMAKE_CXX_COMPILER=cl \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-G "${{ matrix.generators }}" \
-DCMAKE_INSTALL_PREFIX:PATH=instdir
- name: Configure macos or ubuntu
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
shell: bash
run: |
cmake \
-S . \
-B ./build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-G "${{ matrix.generators }}" \
-DCMAKE_INSTALL_PREFIX:PATH=instdir
- name: Build
shell: bash
run: |
cmake --build ./build --config ${{ matrix.build_type }}