mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-17 18:52:06 +00:00
Merge pull request #535 from Laupetin/feature/modman-ci
feat: add modman to the build-test ci
This commit is contained in:
3
.github/workflows/check-formatting.yaml
vendored
3
.github/workflows/check-formatting.yaml
vendored
@@ -6,6 +6,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
check-formatting:
|
check-formatting:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Check formatting
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
@@ -21,4 +22,4 @@ jobs:
|
|||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
export CLANG_FORMAT_BIN="${LLVM_PATH}/bin/clang-format"
|
export CLANG_FORMAT_BIN="${LLVM_PATH}/bin/clang-format"
|
||||||
./scripts/check-format.sh
|
./scripts/check-format.sh
|
||||||
|
|||||||
47
.github/workflows/ci.yaml
vendored
47
.github/workflows/ci.yaml
vendored
@@ -13,6 +13,12 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build_arch: [x86, x64]
|
build_arch: [x86, x64]
|
||||||
|
include:
|
||||||
|
- build_arch: x86
|
||||||
|
additional_packages: gcc-13-multilib g++-13-multilib
|
||||||
|
- build_arch: x64
|
||||||
|
premake_flags: --modman
|
||||||
|
name: Build-Test Linux ${{ matrix.build_arch }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ubuntu:24.04
|
container: ubuntu:24.04
|
||||||
defaults:
|
defaults:
|
||||||
@@ -22,12 +28,17 @@ jobs:
|
|||||||
- name: Install g++ and multilib
|
- name: Install g++ and multilib
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y wget tar git make gcc-13 g++-13 gcc-13-multilib g++-13-multilib
|
apt-get install -y wget tar git make curl gcc-13 g++-13 libgtk-4-dev libwebkitgtk-6.0-dev ${{ matrix.additional_packages }}
|
||||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
|
||||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
|
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
|
||||||
update-alternatives --set gcc /usr/bin/gcc-13
|
update-alternatives --set gcc /usr/bin/gcc-13
|
||||||
update-alternatives --set g++ /usr/bin/g++-13
|
update-alternatives --set g++ /usr/bin/g++-13
|
||||||
|
|
||||||
|
- name: Install node
|
||||||
|
uses: actions/setup-node@v5
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
@@ -37,7 +48,15 @@ jobs:
|
|||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
env:
|
env:
|
||||||
PREMAKE_NO_PROMPT: 1
|
PREMAKE_NO_PROMPT: 1
|
||||||
run: ./generate.sh
|
run: ./generate.sh ${{ matrix.premake_flags }}
|
||||||
|
|
||||||
|
- name: Build UI
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
|
if: ${{ matrix.build_arch == 'x64' }}
|
||||||
|
run: |
|
||||||
|
npm --prefix src/ModManUi install
|
||||||
|
npm --prefix src/ModManUi run lint
|
||||||
|
npm --prefix src/ModManUi run build
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
@@ -65,25 +84,39 @@ jobs:
|
|||||||
msbuild_config: Win32
|
msbuild_config: Win32
|
||||||
- build_arch: x64
|
- build_arch: x64
|
||||||
msbuild_config: x64
|
msbuild_config: x64
|
||||||
|
name: Build-Test Windows ${{ matrix.build_arch }}
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install node
|
||||||
|
uses: actions/setup-node@v5
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
|
||||||
|
- name: Add MSBuild to PATH
|
||||||
|
uses: microsoft/setup-msbuild@v2.0.0
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Add MSBuild to PATH
|
|
||||||
uses: microsoft/setup-msbuild@v2.0.0
|
|
||||||
|
|
||||||
- name: Premake generate
|
- name: Premake generate
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
env:
|
env:
|
||||||
PREMAKE_NO_PROMPT: 1
|
PREMAKE_NO_PROMPT: 1
|
||||||
run: ./generate.bat
|
run: ./generate.bat --modman
|
||||||
|
|
||||||
|
- name: Build UI
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
|
run: |
|
||||||
|
npm --prefix src/ModManUi install
|
||||||
|
npm --prefix src/ModManUi run lint
|
||||||
|
npm --prefix src/ModManUi run build
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: msbuild /m /p:Configuration=Release /p:Platform=${{ matrix.msbuild_config }} build
|
run: |
|
||||||
|
msbuild /m /p:Configuration=Release /p:Platform=${{ matrix.msbuild_config }} build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
working-directory: ${{ github.workspace }}/build/lib/Release_${{ matrix.build_arch }}/tests
|
working-directory: ${{ github.workspace }}/build/lib/Release_${{ matrix.build_arch }}/tests
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ namespace
|
|||||||
if (foundUiFile != assetLookup.end())
|
if (foundUiFile != assetLookup.end())
|
||||||
{
|
{
|
||||||
const Microsoft::WRL::ComPtr<IStream> responseStream =
|
const Microsoft::WRL::ComPtr<IStream> responseStream =
|
||||||
SHCreateMemStream(static_cast<const BYTE*>(foundUiFile->second.data), foundUiFile->second.dataSize);
|
SHCreateMemStream(static_cast<const BYTE*>(foundUiFile->second.data), static_cast<UINT>(foundUiFile->second.dataSize));
|
||||||
|
|
||||||
const auto headers = HeadersForAssetName(asset, foundUiFile->second.dataSize);
|
const auto headers = HeadersForAssetName(asset, foundUiFile->second.dataSize);
|
||||||
if (!SUCCEEDED(environment->CreateWebResourceResponse(responseStream.Get(), 200, L"OK", headers.data(), &response)))
|
if (!SUCCEEDED(environment->CreateWebResourceResponse(responseStream.Get(), 200, L"OK", headers.data(), &response)))
|
||||||
|
|||||||
Reference in New Issue
Block a user