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 c3b8649
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 39 deletions.
43 changes: 17 additions & 26 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,13 @@ jobs:
arch: arm64

steps:
- name: Restore windows vcpkg
if: startsWith(matrix.os, 'windows')
uses: actions/cache/restore@v3
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
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
- name: Install dependencies on ubuntu
if: startsWith(matrix.os, 'ubuntu')
shell: bash
Expand All @@ -84,25 +70,14 @@ jobs:
ninja --version
cmake --version
gcc --version
vcpkg install breakpad --triplet x64-linux
- name: Install dependencies on macos-x86_64
if: startsWith(matrix.os, 'macos') && matrix.arch == 'x86_64'
shell: bash
run: |
brew install ninja pkg-config
ninja --version
cmake --version
clang --version
vcpkg install breakpad --triplet x64-osx
- name: Install dependencies on macos-arm64
if: startsWith(matrix.os, 'macos') && matrix.arch == 'arm64'
if: startsWith(matrix.os, 'macos')
shell: bash
run: |
brew install ninja pkg-config
ninja --version
cmake --version
clang --version
vcpkg install breakpad --triplet arm64-osx
- name: Install Qt
uses: jurplel/install-qt-action@v3
Expand All @@ -116,6 +91,22 @@ jobs:
with:
fetch-depth: 1

- name: Update vcpkg manifest baseline
shell: bash
run: |
vcpkg x-update-baseline
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/build/vcpkg_installed
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-vcpkg-installed-${{ matrix.os }}-
${{ runner.os }}-vcpkg-installed-
${{ runner.os }}-
save-always: true

- name: Enable Developer Command Prompt
if: startsWith(matrix.os, 'windows')
uses: ilammy/[email protected]
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
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 c3b8649

Please sign in to comment.