Skip to content

Commit

Permalink
God this branch is ancient
Browse files Browse the repository at this point in the history
  • Loading branch information
Perksey committed Oct 31, 2024
2 parents b74f286 + dd103f5 commit 852c12a
Show file tree
Hide file tree
Showing 59 changed files with 1,380 additions and 282 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/angle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ANGLE
on:
push:
branches-ignore:
- "ci/**"
- "develop/**"
- "main"
paths:
- build/submodules/ANGLE
- build/nuke/Native/Core.cs
- build/nuke/Native/Angle.cs
- .github/workflows/angle.yml
jobs:
Build:
if: github.repository == 'dotnet/Silk.NET'
strategy:
fail-fast: false
matrix:
env:
- os: macos-13-xlarge
name: Darwin
nuke_invoke: ./build.sh
name: ${{ matrix.env.name }} Build
runs-on: ${{ matrix.env.os }}
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}

- name: Configure git
run: |
git config --local user.email "[email protected]"
git config --local user.name "The Silk.NET Automaton"
# Install python
- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Build ANGLE
run: ${{ matrix.env.nuke_invoke }} Angle
env:
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,25 @@ jobs:
run: ./build.sh ValidateSolution
- name: Pack (CI)
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
# TODO build native mixins such as BuildLibSilkDroid
# Use a release NUKE so it doesn't interfere with the debug build
run: dotnet run --project build/nuke/Silk.NET.NUKE.csproj -c Release -- Pack --configuration Debug --msbuild-properties VersionSuffix=build${{ github.run_number }}.0 ContinuousIntegrationBuild=true
run: dotnet run --project build/nuke/Silk.NET.NUKE.csproj -c Release -- Pack --configuration Debug --msbuild-properties VersionSuffix=${{ github.event_name != 'pull_request' && format('build{0}.0', github.run_number) || format('pr{0}.{1}', github.event.number, github.run_number) }} ContinuousIntegrationBuild=true
env:
ANDROID_HOME: /Users/runner/Library/Android/sdk
- name: Pack (CD)
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
# TODO build native mixins such as BuildLibSilkDroid
run: ./build.sh Pack --configuration Release --msbuild-properties ContinuousIntegrationBuild=true
- name: Upload Unsigned Artifacts to Actions
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4
with:
name: unsigned_nupkgs
path: "build/output_packages/*nupkg"
if-no-files-found: warn
retention-days: 1
- name: Push to Experimental Feed
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
if: ${{ github.repository == 'dotnet/Silk.NET' }}
run: ./build.sh PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://dotnet.github.io/Silk.NET/nuget/experimental/index.json --nuget-username ${{ secrets.EXP_NUGET_USERNAME }} --nuget-password ${{ secrets.EXP_NUGET_PASSWORD }} --nuget-api-key ${{ secrets.EXP_NUGET_PASSWORD }}
- name: Push to GitHub Packages
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
if: ${{ github.repository == 'dotnet/Silk.NET' }}
run: ./build.sh PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://nuget.pkg.github.com/dotnet/index.json --nuget-api-key ${{ secrets.GITHUB_TOKEN }}
PushRelease:
name: Push Release to NuGet
Expand All @@ -90,14 +88,14 @@ jobs:
- uses: actions/[email protected]
with:
submodules: 'false'
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: unsigned_nupkgs
path: build/output_packages
- name: Sign Packages
run: .\build.cmd SignPackages --akv-certificate ${{ secrets.AKV_CERTIFICATE }} --akv-client-id ${{ secrets.AKV_CLIENT_ID }} --akv-client-secret ${{ secrets.AKV_CLIENT_SECRET }} --akv-tenant ${{ secrets.AKV_TENANT }} --akv-vault-url ${{ secrets.AKV_VAULT_URL }}
- name: Upload Signed Artifacts to Actions
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4
with:
name: signed_nupkgs
path: "build/output_packages/*nupkg"
Expand Down
66 changes: 54 additions & 12 deletions .github/workflows/sdl2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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'
Expand Down Expand Up @@ -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 }}


18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@
</div>

<div>

<h1 align="center">🚧 Silk.NET 3.0 is coming... 🚧</h1>

We are currently hard at work on Silk.NET 3.0 - the latest and greatest Silk.NET, laser-focused on addressing pain points and reimagining how C# bindings libraries can be done.

Because of this, Silk.NET 2.X investment is currently limited by the Silk.NET team, who consist entirely of volunteers working in their free time. Silk.NET 2.X updates are now released ad-hoc when development effort is justified and available.

**If you're reading this and would like to step up to keep Silk.NET 2.X going, be that as a contributor or a maintainer, please do not hesitate to reach out to the Silk.NET team in our official Discord server!**

Learn more about Silk.NET 3.0:
- [Silk.NET 3.0 Plan](https://github.com/dotnet/Silk.NET/blob/14ee3f16a1c1b7c5f561c307b956f769c5e89474/documentation/proposals/Proposal%20-%203.0%20%26%203.X%20Software%20Development%20Plan.md)
- [Silk.NET 3.0 Bindings Design](https://github.com/dotnet/Silk.NET/blob/main/documentation/proposals/Proposal%20-%20Generation%20of%20Library%20Sources%20and%20PInvoke%20Mechanisms.md)
- [Silk.NET 3.0 Meeting 1](https://www.youtube.com/watch?v=dac3t0oh3VU)
- [Silk.NET 3.0 Meeting 2](https://www.youtube.com/watch?v=yXNDZDE3AHE)
- [SilkX (Silk.NET 3.0) Design Discussion](https://www.youtube.com/live/N7qcETE4X_I?t=1799)

<h1 align="center">About Silk.NET 2.X</h1>

<!-- End exclude from NuGet readme. -->
<!-- Begin include in NuGet readme.
![Silk.NET Logo](https://raw.githubusercontent.com/dotnet/Silk.NET/main/documentation/readme/silkdotnet_v3_horizontal_96.svg)
Expand Down
15 changes: 15 additions & 0 deletions Silk.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenXR.Extensions.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenXR.Extensions.ANDROIDSYS", "src\OpenXR\Extensions\Silk.NET.OpenXR.Extensions.ANDROIDSYS\Silk.NET.OpenXR.Extensions.ANDROIDSYS.csproj", "{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.Assimp.Tests", "src\Assimp\Silk.NET.Assimp.Tests\Silk.NET.Assimp.Tests.csproj", "{12D0A556-7DDF-4902-8911-1DA3F6331149}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -3757,6 +3759,18 @@ Global
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|x64.Build.0 = Release|Any CPU
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|x86.ActiveCfg = Release|Any CPU
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|x86.Build.0 = Release|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|x64.ActiveCfg = Debug|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|x64.Build.0 = Debug|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|x86.ActiveCfg = Debug|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|x86.Build.0 = Debug|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|Any CPU.ActiveCfg = Release|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|Any CPU.Build.0 = Release|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x64.ActiveCfg = Release|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x64.Build.0 = Release|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x86.ActiveCfg = Release|Any CPU
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -4057,6 +4071,7 @@ Global
{B70533BB-FB84-4BC3-888C-88E5F40FD22D} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
{12D0A556-7DDF-4902-8911-1DA3F6331149} = {6EADA376-E83F-40B7-9539-71DD17AEF7A4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5273D7F-3334-48DF-94E3-41AE6816CD4D}
Expand Down
14 changes: 13 additions & 1 deletion build/nuke/Build.Support.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ partial class Build
/// - Microsoft VSCode https://nuke.build/vscode
public static int Main() => Execute<Build>(x => x.Compile);

[Parameter("Outputs build warnings instead of keeping the MSBuild logging quiet with just errors.")]
[Nuke.Common.Parameter("Outputs build warnings instead of keeping the MSBuild logging quiet with just errors.")]
bool Warnings;

[Parameter("Matrix job argument e.g. a RID for native builds."), CanBeNull]
Expand Down Expand Up @@ -130,6 +130,18 @@ Dictionary<string, object> ProcessedMsbuildProperties
{
// probably hasn't existed yet, don't care.
}
try
{
if (Native)
{
DotNet("workload install android");
}
}
catch
{
// oh well. maybe it's already installed?
}

GenerateSolution();
}
);
Expand Down
Loading

0 comments on commit 852c12a

Please sign in to comment.