2025-01-30 21:45:31 +01:00
|
|
|
# Build with `mob` GitHub Action
|
2023-07-10 13:43:05 +02:00
|
|
|
|
2025-01-30 21:45:31 +01:00
|
|
|
Action to build ModOrganizer 2 components within GitHub workflows.
|
2023-07-10 13:43:05 +02:00
|
|
|
|
|
|
|
|
**Example usage**:
|
|
|
|
|
|
|
|
|
|
```yml
|
2025-05-28 13:53:53 +02:00
|
|
|
name: Build My Plugin
|
2023-07-10 13:43:05 +02:00
|
|
|
on:
|
|
|
|
|
push:
|
2025-05-28 13:53:53 +02:00
|
|
|
branches: [master]
|
2023-07-10 13:43:05 +02:00
|
|
|
pull_request:
|
|
|
|
|
types: [opened, synchronize, reopened]
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
runs-on: windows-2022
|
|
|
|
|
steps:
|
2025-05-28 13:53:53 +02:00
|
|
|
- name: Build My Plugin
|
2023-07-10 13:43:05 +02:00
|
|
|
uses: ModOrganizer2/build-with-mob-action@master
|
|
|
|
|
with:
|
2025-05-28 13:53:53 +02:00
|
|
|
mo2-dependencies: uibase
|
2023-07-10 13:43:05 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The action must be run on `windows-2022` since MSVC is required.
|
|
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
|
|
The following options should be specified most of the time:
|
|
|
|
|
|
|
|
|
|
- `mo2-dependencies` - List of MO2 components to build before the current one.
|
2025-05-28 13:53:53 +02:00
|
|
|
- `cmake_common` will always be included, whether you specify it or not,
|
|
|
|
|
- these components will be built on a matching branch (when possible),
|
2023-07-10 13:43:05 +02:00
|
|
|
e.g., if the current branch is `dev-branch`, components will be built on the
|
|
|
|
|
`dev-branch` branch (if available) or `master` otherwise.
|
|
|
|
|
- these builds are not cached between runs.
|
|
|
|
|
|
2025-05-28 13:53:53 +02:00
|
|
|
The following inputs are not mandatory but can be used to customize the build:
|
2023-07-10 13:43:05 +02:00
|
|
|
|
2025-05-28 13:53:53 +02:00
|
|
|
- `mo2-owner` - The Github organization to use to lookup dependencies, default to
|
|
|
|
|
the current organization.
|
2023-07-10 13:43:05 +02:00
|
|
|
- `mo2-branch` - The branch to build, default to the current branch.
|
2025-05-28 13:53:53 +02:00
|
|
|
- `mo2-skip-checkout` - Skip checkout for the component (imply `mo2-skip-configure`
|
|
|
|
|
and `mo2-skip-build`).
|
|
|
|
|
- `mo2-skip-configure` - Skip the CMake configure step for the component (not for
|
|
|
|
|
dependencies), imply `mo2-skip-build`.
|
|
|
|
|
- `mo2-skip-build` - Skip the CMake build step for the component (not for dependencies).
|
2023-07-10 13:43:05 +02:00
|
|
|
- `qt-install` - Default is `'true'`, set to `'false'` to disable installing Qt (build
|
|
|
|
|
will most likely fail unless Qt is installed before running this action).
|
|
|
|
|
- `qt-version` - Version of Qt to install. Default is to use the version defined by
|
|
|
|
|
`mob.ini` in the `mob` repository.
|
|
|
|
|
- `qt-modules` - List of extra Qt modules to install.
|
2025-05-28 13:53:53 +02:00
|
|
|
|
|
|
|
|
The following outputs are available:
|
|
|
|
|
|
|
|
|
|
- `cmake-prefix-path` - Suitable value to set `CMAKE_PREFIX_PATH` to if configuring
|
|
|
|
|
manually.
|
|
|
|
|
- `cmake-install-path` - Suitable value to set `CMAKE_INSTALL_PATH` to if configuring
|
|
|
|
|
manually.
|
|
|
|
|
- `working-directory` - Directory where the component was checked out (if
|
|
|
|
|
`mo2-skip-checkout` was not specified).
|