mirror of
https://github.com/ModOrganizer2/build-with-mob-action.git
synced 2026-07-27 14:08:35 -07:00
Start adding dependencies.
This commit is contained in:
+13
-1
@@ -107,10 +107,22 @@ runs:
|
||||
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' }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
|
||||
id: build-third-party-deps
|
||||
shell: pwsh
|
||||
run: |
|
||||
pip install PyYAML
|
||||
$third_parties = (python ${env:GITHUB_ACTION_PATH}/make-dependencies.py ${{ inputs.mo2-dependencies }})
|
||||
Write-Output "Found third parties dependencies: ${third_parties}"
|
||||
Write-Output "MO2_THIRD_PARTIES=${third_parties}" >> "$env:GITHUB_OUTPUT"
|
||||
- if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
|
||||
shell: pwsh
|
||||
name: Build dependencies with mob
|
||||
run: mob.exe -l 4 -d . build ${{ inputs.mo2-third-parties }}
|
||||
run: mob.exe -l 4 -d . build ${{ steps.build-third-party-deps.outputs.MO2_THIRD_PARTIES }} ${{ inputs.mo2-third-parties }}
|
||||
- name: Build dependencies log
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
dependencies:
|
||||
uibase:
|
||||
- boost
|
||||
- fmt
|
||||
- spdlog
|
||||
- gtest
|
||||
|
||||
game_gamebryo:
|
||||
- lz4
|
||||
- zlib
|
||||
@@ -0,0 +1,12 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
with open(Path(__file__).parent.joinpath("dependencies.yml"), "r") as fp:
|
||||
deps: dict[str, list[str]] = yaml.load(fp, Loader=yaml.Loader)["dependencies"]
|
||||
|
||||
mo2_deps = sys.argv[1:]
|
||||
third_party_deps = {dep for mo2_dep in mo2_deps for dep in deps.get(mo2_dep, [])}
|
||||
|
||||
print(" ".join(sorted(third_party_deps)))
|
||||
Reference in New Issue
Block a user