Skip to content

Commit c62aaa3

Browse files
committed
Update build action.
1 parent 5be99e7 commit c62aaa3

File tree

1 file changed

+51
-10
lines changed

1 file changed

+51
-10
lines changed

.github/workflows/build-and-test.yml

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,61 @@ on:
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 Plugin Python
14-
id: build-plugin-python
15-
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+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.12"
27+
28+
- name: Install Qt
29+
uses: jurplel/install-qt-action@v3
30+
with:
31+
setup-python: false
32+
version: 6.7.0
33+
modules:
34+
cache: true
35+
36+
- uses: actions/checkout@v4
37+
- uses: lukka/run-vcpkg@v11
38+
39+
# build uibase
40+
- uses: actions/checkout@v4
1641
with:
17-
mo2-third-parties: gtest python spdlog boost sip pyqt pybind11
18-
mo2-dependencies: cmake_common uibase
19-
mo2-cmake-command: -DPLUGIN_PYTHON_TESTS=1 ..
20-
- name: Build Plugin Python Tests
21-
run: cmake --build vsbuild --config RelWithDebInfo -j4 --target python-tests --target runner-tests
22-
working-directory: ${{ steps.build-plugin-python.outputs.working-directory }}
42+
repository: ModOrganizer2/modorganizer-uibase
43+
ref: dev/vcpkg
44+
path: uibase
45+
46+
- name: Build UIBase
47+
run: |
48+
cmake --preset vs2022-windows `
49+
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
50+
"-DCMAKE_INSTALL_PREFIX=install"
51+
cmake --build vsbuild --config RelWithDebInfo --target INSTALL
52+
working-directory: uibase
53+
54+
- name: Configure Plugin Python build
55+
shell: pwsh
56+
run: |
57+
cmake --preset vs2022-windows `
58+
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64;.\uibase\install\lib\cmake" `
59+
-DPLUGIN_PYTHON_TESTING=ON
60+
61+
- name: Build Plugin Python
62+
run: cmake --build vsbuild --config RelWithDebInfo --verbose `
63+
--target python-tests --target runner-tests --target proxy
64+
2365
- name: Test Plugin Python
2466
run: ctest --test-dir vsbuild -C RelWithDebInfo --output-on-failure
25-
working-directory: ${{ steps.build-plugin-python.outputs.working-directory }}

0 commit comments

Comments
 (0)