summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2023-07-09 17:36:09 +0200
committerMikaël Capelle <capelle.mikael@gmail.com>2023-07-09 17:36:09 +0200
commit27cf8372aaadc7fca640f143ec77852a1e5466e8 (patch)
tree9ac1e031e5de504b64409a4817144f3e65b13d40 /.github
parentfc8bdd073f0203fe8caf329d2dbd97716f6c5fc5 (diff)
parentef94aee28464039672b277243a0181ae93550d6c (diff)
Merge branch 'master' of github.com:ModOrganizer2/modorganizer
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml74
-rw-r--r--.github/workflows/linting.yml12
2 files changed, 86 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..e05d7c58
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,74 @@
+name: Build ModOrganizer 2
+on:
+ push:
+ branches: master
+ pull_request:
+ types: [opened, reopened]
+jobs:
+ build:
+ runs-on: windows-2022
+ steps:
+ - name: Checkout mob
+ uses: actions/checkout@master
+ with:
+ repository: modorganizer2/mob
+ 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: Cache dependencies
+ id: cache-dependencies
+ uses: actions/cache@v3
+ with:
+ # TODO: finer cache
+ path: |
+ ./install
+ ./build
+ 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
+ 7z zlib fmt gtest libbsarch libloot openssl libffi bzip2 python lz4 spdlog
+ boost boost-di sip pyqt pybind11 ss licenses explorerpp usvfs
+ - 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
+ # TODO: cache this?
+ - name: Build ModOrganizer dependencies
+ run: .\mob\mob.exe -l 4 -d . build
+ --ignore-uncommitted-changes
+ --redownload --reextract --reconfigure --rebuild
+ githubpp bsatk esptk archive lootcli game_gamebryo
+ - uses: actions/checkout@v3
+ with:
+ path: ./build/modorganizer_super/modorganizer
+ - name: Build ModOrganizer
+ run: .\mob\mob.exe -l 5 -d . build --no-fetch-task --no-pull modorganizer
diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml
new file mode 100644
index 00000000..99427693
--- /dev/null
+++ b/.github/workflows/linting.yml
@@ -0,0 +1,12 @@
+name: Lint ModOrganizer 2
+on: [push]
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Run clang-format
+ uses: jidicula/clang-format-action@v4.11.0
+ with:
+ clang-format-version: "15"
+ check-path: "."