Skip to content

Commit 1dfd789

Browse files
committed
Add standalone preset to fix CI.
1 parent 50b094c commit 1dfd789

3 files changed

Lines changed: 49 additions & 10 deletions

File tree

.github/workflows/build.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,46 @@
1-
name: Build Installer OMOD Plugin
1+
name: Build Installer OMOD Library
22

33
on:
44
push:
55
branches: master
66
pull_request:
77
types: [opened, synchronize, reopened]
88

9+
env:
10+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
11+
912
jobs:
1013
build:
1114
runs-on: windows-2022
1215
steps:
13-
- name: Build Installer OMOD Plugin
14-
uses: ModOrganizer2/build-with-mob-action@master
16+
# https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
23+
24+
- name: Install Qt
25+
uses: jurplel/install-qt-action@v3
1526
with:
16-
mo2-dependencies: cmake_common uibase
27+
version: 6.7.0
28+
modules:
29+
cache: true
30+
31+
- uses: actions/checkout@v4
32+
33+
- name: "Set environmental variables"
34+
shell: bash
35+
run: |
36+
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
37+
38+
- name: Configure Installer OMOD
39+
shell: pwsh
40+
run: |
41+
cmake --preset vs2022-windows-standalone `
42+
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
43+
"-DCMAKE_INSTALL_PREFIX=install"
44+
45+
- name: Build Installer OMOD
46+
run: cmake --build vsbuild --config RelWithDebInfo --target INSTALL

CMakePresets.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@
3636
"inherits": ["cmake-dev", "vcpkg"],
3737
"name": "vs2022-windows",
3838
"toolset": "v143"
39-
}
40-
],
41-
"buildPresets": [
39+
},
4240
{
43-
"name": "vs2022-windows",
44-
"resolvePackageReferences": "on",
45-
"configurePreset": "vs2022-windows"
41+
"cacheVariables": {
42+
"VCPKG_MANIFEST_FEATURES": {
43+
"type": "STRING",
44+
"value": "standalone"
45+
}
46+
},
47+
"inherits": "vs2022-windows",
48+
"name": "vs2022-windows-standalone"
4649
}
4750
],
4851
"version": 4

vcpkg.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"dependencies": ["mo2-cmake"],
3+
"features": {
4+
"standalone": {
5+
"description": "Build Standalone.",
6+
"dependencies": ["mo2-uibase"]
7+
}
8+
},
39
"vcpkg-configuration": {
410
"default-registry": {
511
"kind": "git",

0 commit comments

Comments
 (0)