-
Notifications
You must be signed in to change notification settings - Fork 10
66 lines (55 loc) · 1.95 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Build & Test Plugin Python
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:
# 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 || '');
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
setup-python: false
version: 6.7.0
modules:
cache: true
- uses: actions/checkout@v4
- uses: lukka/run-vcpkg@v11
# build uibase
- uses: actions/checkout@v4
with:
repository: ModOrganizer2/modorganizer-uibase
ref: dev/vcpkg
path: uibase
- name: Build UIBase
run: |
cmake --preset vs2022-windows `
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
"-DCMAKE_INSTALL_PREFIX=install"
cmake --build vsbuild --config RelWithDebInfo --target INSTALL
working-directory: uibase
- name: Configure Plugin Python build
shell: pwsh
run: |
cmake --preset vs2022-windows `
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64;.\uibase\install" `
-DPLUGIN_PYTHON_TESTING=ON
- name: Build Plugin Python
run: cmake --build vsbuild --config RelWithDebInfo --verbose `
--target python-tests --target runner-tests --target proxy
- name: Test Plugin Python
run: ctest --test-dir vsbuild -C RelWithDebInfo --output-on-failure