Skip to content

Commit

Permalink
vcpkg manifest;
Browse files Browse the repository at this point in the history
  • Loading branch information
RealChuan committed Mar 29, 2024
1 parent 57ef0c8 commit 69aa1e5
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 72 deletions.
12 changes: 2 additions & 10 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
---
Checks: '-*,clang-analyzer-*,readability-*,performance-*,modernize-*,bugprone-*,cert-,cppcoreguidelines-,portability-*,llvm-*,google-*'
Checks: 'clang-analyzer-*,readability-*,performance-*,modernize-*,bugprone-*,cert-*,portability-*,llvm-*,google-*'
WarningsAsErrors: ''
HeaderFilterRegex: '.'
AnalyzeTemporaryDtors: false
FormatStyle: file
FormatStyle: none
User: user
CheckOptions:
- key: readability-identifier-naming.ClassMemberPrefix
value: 'm_'
- key: readability-identifier-naming.ConstexprVariablePrefix
value: 'k'
- key: readability-identifier-naming.GlobalVariablePrefix
value: 'g_'

24 changes: 17 additions & 7 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,35 +46,38 @@ jobs:
- "Ninja"
arch:
- x86_64
vcpkg_libs:
- breakpad
include:
- os: macos-latest
qt_ver: 6.6.2
build_type: "RelWithDebInfo"
generators: "Ninja"
arch: arm64
vcpkg_libs: breakpad

steps:
- name: Restore windows vcpkg
if: startsWith(matrix.os, 'windows')
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: C:\vcpkg\installed
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}
- name: Restore macos or ubuntu vcpkg
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: /usr/local/share/vcpkg/installed
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}

- name: Install dependencies on windows
if: startsWith(matrix.os, 'windows')
shell: bash
run: |
choco install ninja
ninja --version
cmake --version
vcpkg install breakpad --triplet x64-windows
vcpkg install ${{ matrix.vcpkg_libs }} --triplet x64-windows
- name: Install dependencies on ubuntu
if: startsWith(matrix.os, 'ubuntu')
shell: bash
Expand All @@ -84,7 +87,7 @@ jobs:
ninja --version
cmake --version
gcc --version
vcpkg install breakpad --triplet x64-linux
vcpkg install ${{ matrix.vcpkg_libs }} --triplet x64-linux
- name: Install dependencies on macos-x86_64
if: startsWith(matrix.os, 'macos') && matrix.arch == 'x86_64'
shell: bash
Expand All @@ -93,7 +96,7 @@ jobs:
ninja --version
cmake --version
clang --version
vcpkg install breakpad --triplet x64-osx
vcpkg install ${{ matrix.vcpkg_libs }} --triplet x64-osx
- name: Install dependencies on macos-arm64
if: startsWith(matrix.os, 'macos') && matrix.arch == 'arm64'
shell: bash
Expand All @@ -102,7 +105,7 @@ jobs:
ninja --version
cmake --version
clang --version
vcpkg install breakpad --triplet arm64-osx
vcpkg install ${{ matrix.vcpkg_libs }} --triplet arm64-osx
- name: Install Qt
uses: jurplel/install-qt-action@v3
Expand All @@ -116,6 +119,13 @@ jobs:
with:
fetch-depth: 1

# jurplel/install-qt-action@v3, 这个action会修改默认的python版本,
# 会导致部分使用vcpkg的库编译失败,比如libsystemd,所以需要删除vcpkg.json
- name: Delete vcpkg.json
shell: bash
run: |
rm vcpkg.json
- name: Enable Developer Command Prompt
if: startsWith(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1.12.1
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/qmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'vcpkg.json'
pull_request:
paths-ignore: # 下列文件的变更不触发部署,可以自行添加
- '.github/workflows/clean_cache.yml'
Expand All @@ -26,6 +27,7 @@ on:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'vcpkg.json'

jobs:
build:
Expand All @@ -42,21 +44,24 @@ jobs:
- 6.6.2
arch:
- x86_64
vcpkg_libs:
- breakpad
include:
- os: macos-latest
qt_ver: 6.6.2
arch: arm64
vcpkg_libs: breakpad

steps:
- name: Restore windows vcpkg
if: startsWith(matrix.os, 'windows')
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: C:\vcpkg\installed
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}
- name: Restore macos or ubuntu vcpkg
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: /usr/local/share/vcpkg/installed
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}
Expand All @@ -68,7 +73,7 @@ jobs:
choco install ninja
ninja --version
cmake --version
vcpkg install breakpad --triplet x64-windows
vcpkg install ${{ matrix.vcpkg_libs }} --triplet x64-windows
- name: Install dependencies on ubuntu
if: startsWith(matrix.os, 'ubuntu')
shell: bash
Expand All @@ -78,7 +83,7 @@ jobs:
ninja --version
cmake --version
gcc --version
vcpkg install breakpad --triplet x64-linux
vcpkg install ${{ matrix.vcpkg_libs }} --triplet x64-linux
- name: Install dependencies on macos-x86_64
if: startsWith(matrix.os, 'macos') && matrix.arch == 'x86_64'
shell: bash
Expand All @@ -87,7 +92,7 @@ jobs:
ninja --version
cmake --version
clang --version
vcpkg install breakpad --triplet x64-osx
vcpkg install ${{ matrix.vcpkg_libs }} --triplet x64-osx
- name: Install dependencies on macos-arm64
if: startsWith(matrix.os, 'macos') && matrix.arch == 'arm64'
shell: bash
Expand All @@ -96,7 +101,7 @@ jobs:
ninja --version
cmake --version
clang --version
vcpkg install breakpad --triplet arm64-osx
vcpkg install ${{ matrix.vcpkg_libs }} --triplet arm64-osx
- name: Install Qt
uses: jurplel/install-qt-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 12.x
node-version: 20.x
# ISO Langusge Codes: https://cloud.google.com/translate/docs/languages
- name: Adding README - English
uses: dephraiim/translate-readme@main
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- ubuntu-latest
qt_ver:
- 6.6.2
vcpkg_libs:
- breakpad

steps:
- name: Install Qt
Expand All @@ -39,7 +41,7 @@ jobs:
choco install ninja
ninja --version
cmake --version
vcpkg install breakpad --triplet x64-windows
vcpkg install ${{ matrix.vcpkg_libs }} --triplet x64-windows
- name: Install dependencies on macos
if: startsWith(matrix.os, 'macos')
shell: bash
Expand All @@ -48,8 +50,8 @@ jobs:
ninja --version
cmake --version
clang --version
vcpkg install breakpad --triplet x64-osx
vcpkg install breakpad --triplet arm64-osx
vcpkg install ${{ matrix.vcpkg_libs }} --triplet x64-osx
vcpkg install ${{ matrix.vcpkg_libs }} --triplet arm64-osx
- name: Install dependencies on ubuntu
if: startsWith(matrix.os, 'ubuntu')
shell: bash
Expand All @@ -59,17 +61,17 @@ jobs:
ninja --version
cmake --version
gcc --version
vcpkg install breakpad --triplet x64-linux
vcpkg install ${{ matrix.vcpkg_libs }} --triplet x64-linux
- name: cache windows vcpkg
if: startsWith(matrix.os, 'windows')
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: C:\vcpkg\installed
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}
- name: cache macos or ubuntu vcpkg
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: /usr/local/share/vcpkg/installed
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}
Expand Down
41 changes: 0 additions & 41 deletions README.en.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Qt-App

- 基于插件是开发的桌面应用程序框架,可以用于快速开发桌面应用程序;
- 插件式开发的桌面应用程序框架,可以用于快速开发桌面应用程序;
[qt-creator/src/libs/extensionsystem at master · qt-creator/qt-creator (github.com)](https://github.com/qt-creator/qt-creator/tree/master/src/libs/extensionsystem)
- 配合[vcpkg](https://github.com/microsoft/vcpkg)进行使用;
- 同时支持[cmake](.github/workflows/cmake.yml)[qmake](.github/workflows/qmake.yml)编译;
Expand Down
10 changes: 10 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "qt-app",
"version": "0.0.1",
"description": "manifest",
"dependencies": [
"breakpad"
],
"builtin-baseline": "3c76dc55f8bd2b7f4824bcd860055094bfbbb9ea"
}

0 comments on commit 69aa1e5

Please sign in to comment.