Repository navigation
feat(gui): add ImGui configuration studio and workshop #499
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Based on CanerKaraca23 build script | |
| name: Build ModelExtras | |
| on: | |
| push: | |
| branches: [main, test, imgui-workshop] | |
| pull_request: | |
| branches: [main, test, imgui-workshop] | |
| workflow_dispatch: | |
| inputs: | |
| build_type: | |
| description: 'Build Configuration (release or debug)' | |
| required: true | |
| default: 'release' | |
| type: choice | |
| options: | |
| - release | |
| - debug | |
| include_pdb: | |
| description: 'Include .pdb symbol file in artifact' | |
| required: false | |
| default: true | |
| type: boolean | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v3 | |
| - name: Setup xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| with: | |
| xmake-version: latest | |
| actions-cache-folder: .xmake-cache | |
| - name: Get latest plugin-sdk commit | |
| id: plugin-sdk-ref | |
| shell: bash | |
| run: | | |
| echo "sha=$(git ls-remote https://github.com/DK22Pac/plugin-sdk.git HEAD | cut -f1)" >> "$GITHUB_OUTPUT" | |
| - name: Restore plugin-sdk cache | |
| id: plugin-sdk-cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: plugin-sdk | |
| key: plugin-sdk-win32-msvc-vs2026-${{ steps.plugin-sdk-ref.outputs.sha }} | |
| - name: Build plugin-sdk | |
| if: steps.plugin-sdk-cache.outputs.cache-hit != 'true' | |
| shell: cmd | |
| run: | | |
| if not exist plugin-sdk ( | |
| git clone https://github.com/DK22Pac/plugin-sdk.git plugin-sdk | |
| cd plugin-sdk | |
| git checkout ${{ steps.plugin-sdk-ref.outputs.sha }} | |
| git submodule update --init --recursive | |
| ) else ( | |
| cd plugin-sdk | |
| ) | |
| set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%\plugin-sdk | |
| cd tools\premake | |
| premake5.exe vs2026 | |
| cd ..\.. | |
| if exist plugin.slnx ( | |
| msbuild plugin.slnx /t:plugin_sa /p:Configuration=Release /m | |
| msbuild plugin.slnx /t:plugin_sa /p:Configuration=zDebug /m | |
| ) else if exist plugin.sln ( | |
| msbuild plugin.sln /t:plugin_sa /p:Configuration=Release /m | |
| msbuild plugin.sln /t:plugin_sa /p:Configuration=zDebug /m | |
| ) else if exist tools\premake\plugin.sln ( | |
| msbuild tools\premake\plugin.sln /t:plugin_sa /p:Configuration=Release /m | |
| msbuild tools\premake\plugin.sln /t:plugin_sa /p:Configuration=zDebug /m | |
| ) else ( | |
| for /r %%f in (*plugin_sa.vcxproj) do ( | |
| msbuild "%%f" /p:Configuration=Release /m | |
| msbuild "%%f" /p:Configuration=zDebug /m | |
| ) | |
| ) | |
| if not exist output\lib mkdir output\lib | |
| for /r %%f in (*plugin*d*.lib *plugin_sa*d*.lib) do ( | |
| if not exist output\lib\plugin_d.lib copy /y "%%f" output\lib\plugin_d.lib | |
| ) | |
| for /r %%f in (*plugin.lib *plugin_sa.lib) do ( | |
| if not exist output\lib\plugin.lib copy /y "%%f" output\lib\plugin.lib | |
| ) | |
| dir output\lib | |
| - name: Build ModelExtras with xmake | |
| shell: cmd | |
| env: | |
| PLUGIN_SDK_DIR: ${{ github.workspace }}\plugin-sdk | |
| BUILD_MODE: ${{ github.event.inputs.build_type || 'release' }} | |
| run: | | |
| xmake f -p windows -a x86 -m %BUILD_MODE% -c -y | |
| xmake | |
| - name: Prepare artifact files | |
| shell: pwsh | |
| env: | |
| BUILD_MODE: ${{ github.event.inputs.build_type || 'release' }} | |
| INCLUDE_PDB: ${{ github.event.inputs.include_pdb }} | |
| run: | | |
| $mode = $env:BUILD_MODE | |
| $pdbFlag = $env:INCLUDE_PDB | |
| if ([string]::IsNullOrEmpty($pdbFlag)) { | |
| $pdbFlag = if ($mode -eq "debug") { "true" } else { "false" } | |
| } | |
| New-Item -ItemType Directory -Force -Path "artifact/ModelExtras" | |
| Copy-Item -Path "build/windows/x86/$mode/ModelExtras.asi" -Destination "artifact/ModelExtras.asi" | |
| if ($pdbFlag -eq "true" -and (Test-Path "build/windows/x86/$mode/ModelExtras.pdb")) { | |
| Copy-Item -Path "build/windows/x86/$mode/ModelExtras.pdb" -Destination "artifact/ModelExtras.pdb" | |
| } | |
| Copy-Item -Path "resource/dist/ModelExtras.ini" -Destination "artifact/ModelExtras.ini" | |
| Copy-Item -Path "resource/dist/ModelExtras/*" -Destination "artifact/ModelExtras/" -Recurse | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ModelExtras-${{ github.event.inputs.build_type || 'Release' }}-Build | |
| path: | | |
| artifact/ModelExtras.asi | |
| artifact/ModelExtras.pdb | |
| artifact/ModelExtras.ini | |
| artifact/ModelExtras/** |