Start adding dependencies.

This commit is contained in:
Mikael CAPELLE
2023-09-18 10:02:59 +02:00
parent 0af78f1596
commit aa39cb12cd
3 changed files with 36 additions and 1 deletions
+13 -1
View File
@@ -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:
+11
View File
@@ -0,0 +1,11 @@
---
dependencies:
uibase:
- boost
- fmt
- spdlog
- gtest
game_gamebryo:
- lz4
- zlib
+12
View File
@@ -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)))