Merge pull request #111 from ModOrganizer2/ci/mob-github-action

Switch to generic mob action.
This commit is contained in:
Mikaël Capelle
2023-07-10 20:10:48 +02:00
committed by GitHub
2 changed files with 17 additions and 70 deletions
+11 -69
View File
@@ -1,4 +1,4 @@
name: Build Plugin Python
name: Build & Test Plugin Python
on:
push:
@@ -6,78 +6,20 @@ on:
pull_request:
types: [opened, synchronize, reopened]
env:
MO_BRANCH: ${{ github.head_ref || github.ref_name }}
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 .
-s task/mo_fallback=master -s task/mo_branch=${{ env.MO_BRANCH }}
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
id: build-plugin-python
uses: ModOrganizer2/build-with-mob-action@master
with:
mo2-third-parties: fmt gtest python spdlog boost sip pyqt pybind11
mo2-dependencies: cmake_common uibase
mo2-cmake-command: -DPLUGIN_PYTHON_TESTS=1 ..
- name: Build Plugin Python Tests
run: cmake --build vsbuild --config RelWithDebInfo -j4 --target python-tests --target runner-tests
working-directory: ${{ steps.build-plugin-python.outputs.working-directory }}
- name: Test Plugin Python
run: ctest --test-dir vsbuild -C RelWithDebInfo --output-on-failure
working-directory: ./build/modorganizer_super/plugin_python
working-directory: ${{ steps.build-plugin-python.outputs.working-directory }}
+6 -1
View File
@@ -1,5 +1,10 @@
name: Lint Plugin Python
on: [push]
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
runs-on: ubuntu-latest