-
-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build SDL2 for Android in CI and productise iOS support (#2211)
* Update sdl2.yml * Add aar to staging for CI * --native flag * Install workload * Retry * Install android workload in NUKE instead * Remove extra prereq * Update android action * Update sdl2.yml * Update sdl2.yml * Env var help * Install android workload somewhere else * Update sdl2.yml * Command line oddities * It appears this was no place for intelligence * ANDROID_HOME isn't being respected? * Override ANDROID_HOME? idk * Fix * Fix the attribute problem * Update paths for workflow * Contd attr fix * Use older JDK, and turns out it was our runner causing issues * Install JDK 21 AND 11 * Fix glaring issue with Path.PathSeparator * Atempt to fix override logic * I really don't know anymore * More respect env var changes * Fix parameter being misused * Fix a silly mistake * Fix a silly mistake 2 * Update Core.cs * Don't force include *everything* * Fix build error * Declare public API in CI If this is incorrect, a human is expected to notice. * Declare APIs in CI using dotnet format for Windowing.Sdl * Install .NET 7 * Install workloads * Install even more workloads * Update SilkDroid.cs * Attempt * Ugh I give up * May have figured it out? * Update SDL2 binaries (#2223) * New binaries for SDL2 on Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:39 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_VMAPPLE * New binaries for SDL2 on Microsoft Windows 10.0.20348 * New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE * New binaries for SDL2 on Microsoft Windows 10.0.20348 * New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE * New binaries for SDL2 on Microsoft Windows 10.0.20348 * New binaries for SDL2 on Microsoft Windows 10.0.20348 * New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE * New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE * New binaries for SDL2 on Microsoft Windows 10.0.20348 * New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE * New binaries for SDL2 on Microsoft Windows 10.0.20348 * New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE * New binaries for SDL2 on Microsoft Windows 10.0.20348 * New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE * New binaries for SDL2 on Microsoft Windows 10.0.20348 * New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE * New binaries for SDL2 on Microsoft Windows 10.0.20348 --------- Co-authored-by: The Silk.NET Automaton <[email protected]> Co-authored-by: Dylan Perks <[email protected]> * Push PRs to experimental feed with a different version string * Stop pulling in GLFW on Android * Add buildTransitive as well as build * Productise iOS support * Stop duplicating build into buildTransitive, use csproj instead * Fix build * Upversion native binary package * Attempt to stop linking away Microsoft.iOS.dll * Fix build * Fix MonoPInvokeCallback usage * Fix NewsstandKit problem * Revert to last working build and build back up from there * Undo SilkMobile changes as doing things properly is breaking in 2.X --------- Co-authored-by: silkdotnet <[email protected]> Co-authored-by: The Silk.NET Automaton <[email protected]>
- Loading branch information
1 parent
a9c75a6
commit dd103f5
Showing
37 changed files
with
520 additions
and
132 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ on: | |
- "build/cmake/*" | ||
- build/nuke/Native/Core.cs | ||
- build/nuke/Native/SDL2.cs | ||
- build/nuke/Native/SilkDroid.cs | ||
- build/nuke/Build.Support.cs | ||
- .github/workflows/sdl2.yml | ||
jobs: | ||
Build: | ||
|
@@ -21,15 +23,12 @@ jobs: | |
- os: ubuntu-22.04 | ||
name: Linux | ||
nuke_invoke: ./build.sh | ||
- os: windows-2022 | ||
- os: windows-latest # runner is not setup for android yet | ||
name: Windows | ||
nuke_invoke: ./build.cmd | ||
extras: | | ||
pwsh build\Install-WindowsSDK.ps1 | ||
nuke_invoke: ./build.cmd BuildLibSilkDroid | ||
- os: macos-14 | ||
name: Darwin | ||
nuke_invoke: ./build.sh | ||
extras: "" | ||
name: ${{ matrix.env.name }} Build | ||
runs-on: ${{ matrix.env.os }} | ||
steps: | ||
|
@@ -42,12 +41,52 @@ jobs: | |
git -c submodule.third_party/git-hooks.update=none submodule update --init --recursive build/submodules/SDL | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "The Silk.NET Automaton" | ||
- name: Extra prerequisites | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
if: runner.os == 'Windows' | ||
with: | ||
dotnet-version: | | ||
6.0.201 | ||
7.0.* | ||
8.0.* | ||
env: | ||
DOTNET_INSTALL_DIR: ~/.dotnet | ||
- name: Setup PowerShell Core | ||
continue-on-error: true | ||
if: runner.os == 'Windows' | ||
run: dotnet tool install --global PowerShell | ||
- name: Setup Java JDK 21 | ||
uses: actions/[email protected] | ||
if: runner.os == 'Windows' | ||
with: | ||
java-version: 21 | ||
distribution: "temurin" | ||
- name: Set PATH | ||
if: runner.os == 'Windows' | ||
id: set_path | ||
run: | | ||
echo running extras | ||
${{ matrix.env.extras }} | ||
echo "cur_path=$env:PATH\n" >> $env:GITHUB_OUTPUT | ||
- name: Setup Android Environment | ||
uses: android-actions/setup-android@v3 | ||
if: runner.os == 'Windows' | ||
env: | ||
PATH: "${{ env.DOTNET_ROOT }};${{ env.DOTNET_ROOT }}\\tools;${{ steps.set_path.outputs.cur_path }}" | ||
- name: Install Android Platforms | ||
if: runner.os == 'Windows' | ||
run: | | ||
sdkmanager --install "build-tools;30.0.2" | ||
sdkmanager --install "platform-tools" | ||
sdkmanager --install "platforms;android-31" | ||
sdkmanager --install "platforms;android-33" | ||
sdkmanager --install "platforms;android-34" | ||
sdkmanager --install "ndk-bundle" | ||
sdkmanager --install "ndk;21.4.7075529" | ||
- name: Setup Java JDK 11 | ||
uses: actions/[email protected] | ||
if: runner.os == 'Windows' | ||
with: | ||
java-version: 11 | ||
distribution: "temurin" | ||
# Install CMake | ||
- uses: lukka/get-cmake@latest | ||
if: runner.os != 'Linux' | ||
|
@@ -110,10 +149,13 @@ jobs: | |
env: | ||
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }} | ||
|
||
- name: Install Workloads | ||
if: runner.os == 'Windows' | ||
run: dotnet workload install android ios maccatalyst | ||
|
||
- name: Build SDL2 | ||
if: runner.os != 'Linux' | ||
run: ${{ matrix.env.nuke_invoke }} SDL2 | ||
run: ${{ matrix.env.nuke_invoke }} SDL2 ${{ runner.os == 'Windows' && format('{0} {1}', '--native true --android-home-value', env.ANDROID_HOME) || '' }} | ||
env: | ||
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }} | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Binary file modified
BIN
-800 Bytes
(100%)
src/Native/Silk.NET.SDL.Native/runtimes/ios/native/libSDL2.a
Binary file not shown.
Binary file modified
BIN
-320 Bytes
(100%)
src/Native/Silk.NET.SDL.Native/runtimes/iossimulator/native/libSDL2.a
Binary file not shown.
Binary file modified
BIN
-32.2 KB
(99%)
src/Native/Silk.NET.SDL.Native/runtimes/osx/native/libSDL2-2.0.dylib
Binary file not shown.
Binary file modified
BIN
-856 Bytes
(100%)
src/Native/Silk.NET.SDL.Native/runtimes/tvos/native/libSDL2.a
Binary file not shown.
Binary file modified
BIN
-360 Bytes
(100%)
src/Native/Silk.NET.SDL.Native/runtimes/tvossimulator/native/libSDL2.a
Binary file not shown.
Binary file modified
BIN
-6 KB
(100%)
src/Native/Silk.NET.SDL.Native/runtimes/win-arm64/native/SDL2.dll
Binary file not shown.
Binary file modified
BIN
+5 KB
(100%)
src/Native/Silk.NET.SDL.Native/runtimes/win-x64/native/SDL2.dll
Binary file not shown.
Binary file modified
BIN
+512 Bytes
(100%)
src/Native/Silk.NET.SDL.Native/runtimes/win-x86/native/SDL2.dll
Binary file not shown.
Oops, something went wrong.