mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
73 lines
2.6 KiB
YAML
73 lines
2.6 KiB
YAML
name: Build Plugin Python
|
|
on: [push]
|
|
jobs:
|
|
build:
|
|
runs-on: windows-2022
|
|
steps:
|
|
- name: Checkout mob
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: modorganizer2/mob
|
|
ref: master
|
|
path: ./mob
|
|
- name: Cache mob
|
|
id: cache-mob
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
./mob/mob.exe
|
|
key: ${{ runner.OS }}-mob-cache-${{ hashFiles('mob/.git/refs/heads/master') }}
|
|
restore-keys: |
|
|
${{ runner.OS }}-mob-cache-
|
|
- if: ${{ steps.cache-mob.outputs.cache-hit != 'true' }}
|
|
name: Build mob
|
|
run: .\mob\bootstrap.ps1
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v3
|
|
with:
|
|
version: 6.5.1
|
|
# modules: qtpositioning qtwebchannel qtwebengine qtwebsockets
|
|
cache: true
|
|
- name: Add Qt bins to PATH
|
|
run: echo "${QT_ROOT_DIR }/msvc2019_64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
- name: Cache dependencies
|
|
id: cache-dependencies
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
./build
|
|
!./build/modorganizer_super
|
|
key: ${{ runner.OS }}-mo2-dependencies-${{ hashFiles('mob/.git/refs/heads/master') }}
|
|
restore-keys: |
|
|
${{ runner.OS }}-mo2-dependencies-
|
|
- if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
|
|
name: Build dependencies with mob
|
|
run: .\mob\mob.exe
|
|
-l 4 -d .
|
|
build
|
|
fmt gtest python spdlog boost sip pyqt pybind11
|
|
- name: Build dependencies log
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: build-dependencies-log
|
|
path: |
|
|
mob.log
|
|
# TODO: cache this?
|
|
- name: Build cmake_common and uibase
|
|
run: .\mob\mob.exe -l 4 -d . build
|
|
--ignore-uncommitted-changes
|
|
--redownload --reextract --reconfigure --rebuild
|
|
cmake_common uibase
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
path: ./build/modorganizer_super/plugin_python
|
|
- name: Build Plugin Python
|
|
run: |
|
|
..\..\..\mob\mob.exe -l 5 cmake -c "-DPLUGIN_PYTHON_TESTS=1 .." vsbuild
|
|
cmake --build vsbuild --config RelWithDebInfo -j4
|
|
cmake --build vsbuild --config RelWithDebInfo -j4 --target python-tests --target runner-tests
|
|
working-directory: ./build/modorganizer_super/plugin_python
|
|
- name: Test Plugin Python
|
|
run: ctest --test-dir vsbuild -C RelWithDebInfo --output-on-failure
|
|
working-directory: ./build/modorganizer_super/plugin_python
|