Skip to content

Commit f1e5d65

Browse files
authored
Merge pull request #111 from ModOrganizer2/ci/mob-github-action
Switch to generic mob action.
2 parents 8091571 + 5a8d3e1 commit f1e5d65

2 files changed

Lines changed: 17 additions & 70 deletions

File tree

Lines changed: 11 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,25 @@
1-
name: Build Plugin Python
1+
name: Build & Test Plugin Python
22

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

9-
env:
10-
MO_BRANCH: ${{ github.head_ref || github.ref_name }}
11-
129
jobs:
1310
build:
1411
runs-on: windows-2022
1512
steps:
16-
- name: Checkout mob
17-
uses: actions/checkout@v3
18-
with:
19-
repository: modorganizer2/mob
20-
ref: master
21-
path: ./mob
22-
- name: Cache mob
23-
id: cache-mob
24-
uses: actions/cache@v3
25-
with:
26-
path: |
27-
./mob/mob.exe
28-
key: ${{ runner.OS }}-mob-cache-${{ hashFiles('mob/.git/refs/heads/master') }}
29-
restore-keys: |
30-
${{ runner.OS }}-mob-cache-
31-
- if: steps.cache-mob.outputs.cache-hit != 'true'
32-
name: Build mob
33-
run: .\mob\bootstrap.ps1
34-
- name: Install Qt
35-
uses: jurplel/install-qt-action@v3
36-
with:
37-
version: 6.5.1
38-
# modules: qtpositioning qtwebchannel qtwebengine qtwebsockets
39-
cache: true
40-
- name: Add Qt bins to PATH
41-
run: echo "${QT_ROOT_DIR }/msvc2019_64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
42-
- name: Cache dependencies
43-
id: cache-dependencies
44-
uses: actions/cache@v3
45-
with:
46-
path: |
47-
./build
48-
!./build/modorganizer_super
49-
key: ${{ runner.OS }}-mo2-dependencies-${{ hashFiles('mob/.git/refs/heads/master') }}
50-
restore-keys: |
51-
${{ runner.OS }}-mo2-dependencies-
52-
- if: steps.cache-dependencies.outputs.cache-hit != 'true'
53-
name: Build dependencies with mob
54-
run: .\mob\mob.exe
55-
-l 4 -d .
56-
build
57-
fmt gtest python spdlog boost sip pyqt pybind11
58-
- name: Build dependencies log
59-
uses: actions/upload-artifact@v3
60-
with:
61-
name: build-dependencies-log
62-
path: |
63-
mob.log
64-
# TODO: cache this?
65-
- name: Build cmake_common and uibase
66-
run: .\mob\mob.exe -l 4 -d .
67-
-s task/mo_fallback=master -s task/mo_branch=${{ env.MO_BRANCH }}
68-
build
69-
--ignore-uncommitted-changes
70-
--redownload --reextract --reconfigure --rebuild
71-
cmake_common uibase
72-
- uses: actions/checkout@v3
73-
with:
74-
path: ./build/modorganizer_super/plugin_python
7513
- name: Build Plugin Python
76-
run: |
77-
..\..\..\mob\mob.exe -l 5 cmake -c "-DPLUGIN_PYTHON_TESTS=1 .." vsbuild
78-
cmake --build vsbuild --config RelWithDebInfo -j4
79-
cmake --build vsbuild --config RelWithDebInfo -j4 --target python-tests --target runner-tests
80-
working-directory: ./build/modorganizer_super/plugin_python
14+
id: build-plugin-python
15+
uses: ModOrganizer2/build-with-mob-action@master
16+
with:
17+
mo2-third-parties: fmt 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 }}
8123
- name: Test Plugin Python
8224
run: ctest --test-dir vsbuild -C RelWithDebInfo --output-on-failure
83-
working-directory: ./build/modorganizer_super/plugin_python
25+
working-directory: ${{ steps.build-plugin-python.outputs.working-directory }}

.github/workflows/linting.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Lint Plugin Python
2-
on: [push]
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
38
jobs:
49
lint:
510
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)