Skip to content

Commit

Permalink
CI: modify qt and vcpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Jan 3, 2024
1 parent f31c2ae commit c93c34b
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 55 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.BUILD_TYPE}}
Calendar_VERSION: v1.0.15
VCPKGGITCOMMITID: 6359372f3ca1e6072e302e1d7238f31b259c5b51
VCPKGGITCOMMITID: f1c6efee2245009540dde947e0e3d008f3aa7dbb
ANDROID_PLATFORM: android-23
ANDROID_NATIVE_API_LEVEL: 23
qt_modules: 'qtimageformats qtmultimedia qtscxml'
Expand Down Expand Up @@ -67,14 +67,6 @@ jobs:
${{env.INSTALL_DIR}}
key: cache-installed-android-qt${{matrix.qt_version}}-${{matrix.VCPKG_TARGET_TRIPLET}}-${{matrix.BUILD_TYPE}}

- name: Cache Qt
#if: false
id: cache-qt
uses: actions/cache@v1 # not v2!
with:
path: ${{env.TOOSL_DIR}}/qt
key: qt${{matrix.qt_version}}_${{matrix.qt_arch}}

- name: Install Qt of gcc_64
uses: jurplel/install-qt-action@v3
with:
Expand All @@ -84,7 +76,8 @@ jobs:
target: 'desktop'
arch: 'gcc_64'
set-env: false
cached: '${{ steps.cache-qt.outputs.cache-hit }}' # optional, default is false
cache: true
cache-key-prefix: install-qt-action

- name: Install Qt of android
uses: jurplel/install-qt-action@v3
Expand All @@ -101,23 +94,32 @@ jobs:
arch: '${{matrix.qt_arch}}' # optional
# Additional Qt modules to install
modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/
cached: '${{ steps.cache-qt.outputs.cache-hit }}' # optional, default is false
cache: true
cache-key-prefix: install-qt-action

- name: Cache vcpkg
if: false
uses: actions/cache@v2
id: cache-vcpkg
with:
path: |
${{ runner.workspace }}/vcpkg/
key: cache-vcpkg

- name: run-vcpkg
if: false
uses: lukka/run-vcpkg@v7.4
uses: lukka/run-vcpkg@v11
with:
# Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port.
#setupOnly: # optional
#vcpkgGitURL: https://github.com/KangLin/vcpkg.git
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
# Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key.
appendedCacheKey: android_${{matrix.os}}-qt${{matrix.qt_version}}-${{matrix.VCPKG_TARGET_TRIPLET}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
additionalCachedPaths: $VCPKG_ROOT/installed
vcpkgTriplet: '${{ matrix.VCPKG_TARGET_TRIPLET }}'
vcpkgArguments: 'openssl '

- name: run vcpkg
if: false
run: |
vcpkg install --triplet=${{matrix.triplet}}
- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
Expand Down
37 changes: 20 additions & 17 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ jobs:
matrix:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: [Release, Debug]
qt_version: [6.5.1, 5.15.2, 5.12.12]
qt_version: [6.6.1, 5.15.2, 5.12.12]
qt_arch: [clang_64]
triplet: [x64-osx]
include:
- qt_version: 6.5.1
- qt_version: 6.6.1
qt_modules: qtscxml qtmultimedia qtwebchannel qtwebsockets qtwebview qtpositioning

- qt_version: 5.15.2
Expand All @@ -36,7 +37,7 @@ jobs:
qt_modules: qtwebengine ${{matrix.qt_modules}}
Calendar_VERSION: 1.0.15
artifact_name: build_macos
VCPKGGITCOMMITID: 6359372f3ca1e6072e302e1d7238f31b259c5b51
VCPKGGITCOMMITID: f1c6efee2245009540dde947e0e3d008f3aa7dbb

# Map the job outputs to step outputs
outputs:
Expand All @@ -63,23 +64,24 @@ jobs:
${{env.INSTALL_DIR}}
key: Cache-installed-macos

- name: Cache vcpkg
if: false
uses: actions/cache@v2
id: cache-vcpkg
with:
path: |
${{ runner.workspace }}/vcpkg/
key: cache-vcpkg

- name: run-vcpkg
uses: lukka/run-vcpkg@v7.4
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
vcpkgDirectory: ${{runner.workspace}}/vcpkg/
# Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key.
appendedCacheKey: cache-vcpkg-msvc-${{matrix.os}}-vc${{matrix.VCPKG_PLATFORM_TOOLSET}}-${{matrix.triplet}}-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
vcpkgTriplet: '${{matrix.triplet}}'
vcpkgArguments: 'zlib openssl'

- name: Cache Qt
id: cache-qt
uses: actions/cache@v1 # not v2!
with:
path: ${{env.TOOSL_DIR}}/qt
key: qt${{matrix.qt_version}}-${{matrix.qt_arch}}

- name: run vcpkg
run: |
vcpkg install --triplet ${{matrix.triplet}}
- name: Install Qt
uses: jurplel/install-qt-action@v3
Expand All @@ -88,7 +90,8 @@ jobs:
version: '${{matrix.qt_version}}' # optional, default is 5.15.2
arch: '${{matrix.qt_arch}}' # optional
modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/
cached: '${{steps.cache-qt.outputs.cache-hit}}' # optional, default is false
cache: true
cache-key-prefix: install-qt-action

- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
Expand Down
42 changes: 22 additions & 20 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
strategy:
matrix:
BUILD_TYPE: [Release, Debug]
qt_version: [6.5.1, 5.15.2, 5.12.12]
qt_version: [6.6.1, 5.15.2, 5.12.12]
include:
- qt_version: 6.5.1
- qt_version: 6.6.1
triplet: x64-windows
VCPKG_PLATFORM_TOOLSET: v142
qt_arch: win64_msvc2019_64
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}}
Calendar_VERSION: v1.0.15
VCPKGGITCOMMITID: 6359372f3ca1e6072e302e1d7238f31b259c5b51
VCPKGGITCOMMITID: f1c6efee2245009540dde947e0e3d008f3aa7dbb
qt_modules: ${{matrix.qt_modules}}
artifact_name: build_msvc

Expand Down Expand Up @@ -85,24 +85,25 @@ jobs:
path: |
${{env.INSTALL_DIR}}
key: cache-installed-msvc


- name: Cache vcpkg
#if: false
uses: actions/cache@v2
id: cache-vcpkg
with:
path: |
${{ runner.workspace }}/vcpkg/
key: cache-vcpkg

- name: run-vcpkg
uses: lukka/run-vcpkg@v7.4
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
vcpkgDirectory: ${{runner.workspace}}/vcpkg/
# Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key.
appendedCacheKey: cache-vcpkg-msvc-${{matrix.os}}-vc${{matrix.VCPKG_PLATFORM_TOOLSET}}-${{matrix.triplet}}-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
vcpkgTriplet: '${{matrix.triplet}}'
vcpkgArguments: 'zlib openssl'

- name: Cache Qt
id: cache-qt
uses: actions/cache@v1 # not v2!
with:
path: ${{env.TOOSL_DIR}}/qt
key: qt${{matrix.qt_version}}_${{matrix.qt_arch}}

- name: run vcpkg
run: |
vcpkg install --triplet=${{matrix.triplet}}
- name: Install Qt
uses: jurplel/install-qt-action@v3
Expand All @@ -111,7 +112,8 @@ jobs:
version: '${{matrix.qt_version}}' # optional, default is 5.15.2
arch: '${{matrix.qt_arch}}' # optional
modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/
cached: '${{steps.cache-qt.outputs.cache-hit}}' # optional, default is false
cache: true
cache-key-prefix: install-qt-action

- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
Expand Down Expand Up @@ -149,7 +151,7 @@ jobs:
copy Calendar_Setup_${{env.Calendar_VERSION}}.exe Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe
- name: Update xml file
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.5.1' }}
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.6.1' }}
working-directory: ${{github.workspace}}\build
run: |
.\install\bin\CalendarApp.exe ^
Expand All @@ -159,7 +161,7 @@ jobs:
-u "https://github.com/KangLin/Calendar/releases/download/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe;https://sourceforge.net/projects/rabbitcalendar/files/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe"
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.5.1' }}
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.6.1' }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
Expand Down
11 changes: 11 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "lunarcalendar",
"version-string":"0.3.1",
"dependencies": [
"openssl"
],
"builtin-baseline":"9259a0719d94c402aae2ab7975bc096afdec15df",
"overrides": [
{ "name": "openssl", "version-string": "1.1.1n" }
]
}

0 comments on commit c93c34b

Please sign in to comment.