Skip to content

Commit

Permalink
Add standalone preset to fix CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jul 12, 2024
1 parent 50b094c commit 2e26160
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 10 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,42 @@
name: Build Installer OMOD Plugin
name: Build Installer OMOD Library

on:
push:
branches: master
pull_request:
types: [opened, synchronize, reopened]

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

jobs:
build:
runs-on: windows-2022
steps:
- name: Build Installer OMOD Plugin
uses: ModOrganizer2/build-with-mob-action@master
# https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
mo2-dependencies: cmake_common uibase
version: 6.7.0
modules:
cache: true

- uses: actions/checkout@v4
- uses: lukka/run-vcpkg@v11

- name: Configure Installer OMOD
shell: pwsh
run: |
cmake --preset vs2022-windows-standalone `
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
"-DCMAKE_INSTALL_PREFIX=install"
- name: Build Installer OMOD
run: cmake --build vsbuild --config RelWithDebInfo --target INSTALL
15 changes: 9 additions & 6 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@
"inherits": ["cmake-dev", "vcpkg"],
"name": "vs2022-windows",
"toolset": "v143"
}
],
"buildPresets": [
},
{
"name": "vs2022-windows",
"resolvePackageReferences": "on",
"configurePreset": "vs2022-windows"
"cacheVariables": {
"VCPKG_MANIFEST_FEATURES": {
"type": "STRING",
"value": "standalone"
}
},
"inherits": "vs2022-windows",
"name": "vs2022-windows-standalone"
}
],
"version": 4
Expand Down
6 changes: 6 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"dependencies": ["mo2-cmake"],
"features": {
"standalone": {
"description": "Build Standalone.",
"dependencies": ["mo2-uibase"]
}
},
"vcpkg-configuration": {
"default-registry": {
"kind": "git",
Expand Down

0 comments on commit 2e26160

Please sign in to comment.