Repository navigation
fix(android): add input broadcast APIs for mobile mods #49
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
| name: Build | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| jobs: | |
| # ──── Android AAR ──── | |
| android: | |
| name: Android AAR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Set up Android SDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| packages: 'platforms;android-35 ndk;27.2.12479018 build-tools;35.0.0' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: Build AAR | |
| working-directory: Android | |
| run: | | |
| chmod +x gradlew | |
| ./gradlew :library:assembleRelease | |
| - name: Upload AAR | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: library-release.aar | |
| path: Android/library/build/outputs/aar/library-release.aar | |
| # ──── Windows Native + .NET DLL ──── | |
| windows: | |
| name: Windows | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up MSYS2 (MinGW) | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: mingw64 | |
| update: true | |
| install: >- | |
| mingw-w64-x86_64-gcc | |
| mingw-w64-x86_64-cmake | |
| mingw-w64-x86_64-toolchain | |
| - name: Set up .NET 10 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Build Native (CMake + MinGW) | |
| shell: msys2 {0} | |
| run: | | |
| cd StArray.ModManager.Windows/Native | |
| # Generate cimgui import lib from DLL | |
| gendef - ../dlls/cimgui.dll > cimgui.def | |
| dlltool -d cimgui.def -l libcimgui.a -D ../dlls/cimgui.dll | |
| cmake -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build | |
| - name: Build C# | |
| run: dotnet build StArray.ModManager.Windows/StArray.ModManager.Windows.csproj -c Release -p:BuildNativeDll=false | |
| - name: Package | |
| run: | | |
| src="StArray.ModManager.Windows/bin/Release/net10.0" | |
| dst="artifacts" | |
| mkdir -p "$dst" | |
| cp -r "$src"/* "$dst/" | |
| rm -rf "$dst/runtimes" | |
| tar -czf windows-dll.tar.gz -C "$dst" . | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-dll | |
| path: windows-dll.tar.gz | |
| # ──── Android .NET DLL ──── | |
| android-dll: | |
| name: Android DLL | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up .NET 10 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Build Android | |
| run: dotnet build StArray.ModManager.Android/StArray.ModManager.Android.csproj -c Release | |
| - name: Package output (exclude runtimes) | |
| run: | | |
| src="StArray.ModManager.Android/bin/Release/net10.0" | |
| dst="artifacts" | |
| mkdir -p "$dst" | |
| cp -r "$src"/* "$dst/" | |
| rm -rf "$dst/runtimes" | |
| cd "$dst" && zip -r ../android-dll.zip . && cd .. | |
| - name: Upload Android DLL | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-dll.zip | |
| path: android-dll.zip |