Skip to content

Commit 852c12a

Browse files
committed
God this branch is ancient
2 parents b74f286 + dd103f5 commit 852c12a

File tree

59 files changed

+1380
-282
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1380
-282
lines changed

.github/workflows/angle.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: ANGLE
2+
on:
3+
push:
4+
branches-ignore:
5+
- "ci/**"
6+
- "develop/**"
7+
- "main"
8+
paths:
9+
- build/submodules/ANGLE
10+
- build/nuke/Native/Core.cs
11+
- build/nuke/Native/Angle.cs
12+
- .github/workflows/angle.yml
13+
jobs:
14+
Build:
15+
if: github.repository == 'dotnet/Silk.NET'
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
env:
20+
- os: macos-13-xlarge
21+
name: Darwin
22+
nuke_invoke: ./build.sh
23+
name: ${{ matrix.env.name }} Build
24+
runs-on: ${{ matrix.env.os }}
25+
steps:
26+
- uses: actions/checkout@v2
27+
with:
28+
token: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}
29+
30+
- name: Configure git
31+
run: |
32+
git config --local user.email "9011267+dotnet-bot@users.noreply.github.com"
33+
git config --local user.name "The Silk.NET Automaton"
34+
35+
# Install python
36+
- uses: actions/setup-python@v4
37+
with:
38+
python-version: "3.10"
39+
40+
- name: Build ANGLE
41+
run: ${{ matrix.env.nuke_invoke }} Angle
42+
env:
43+
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}

.github/workflows/build.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,27 +59,25 @@ jobs:
5959
run: ./build.sh ValidateSolution
6060
- name: Pack (CI)
6161
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
62-
# TODO build native mixins such as BuildLibSilkDroid
6362
# Use a release NUKE so it doesn't interfere with the debug build
64-
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
63+
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
6564
env:
6665
ANDROID_HOME: /Users/runner/Library/Android/sdk
6766
- name: Pack (CD)
6867
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
69-
# TODO build native mixins such as BuildLibSilkDroid
7068
run: ./build.sh Pack --configuration Release --msbuild-properties ContinuousIntegrationBuild=true
7169
- name: Upload Unsigned Artifacts to Actions
72-
uses: actions/upload-artifact@v2.2.4
70+
uses: actions/upload-artifact@v4
7371
with:
7472
name: unsigned_nupkgs
7573
path: "build/output_packages/*nupkg"
7674
if-no-files-found: warn
7775
retention-days: 1
7876
- name: Push to Experimental Feed
79-
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
77+
if: ${{ github.repository == 'dotnet/Silk.NET' }}
8078
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 }}
8179
- name: Push to GitHub Packages
82-
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
80+
if: ${{ github.repository == 'dotnet/Silk.NET' }}
8381
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 }}
8482
PushRelease:
8583
name: Push Release to NuGet
@@ -90,14 +88,14 @@ jobs:
9088
- uses: actions/checkout@v3.5.2
9189
with:
9290
submodules: 'false'
93-
- uses: actions/download-artifact@v3
91+
- uses: actions/download-artifact@v4
9492
with:
9593
name: unsigned_nupkgs
9694
path: build/output_packages
9795
- name: Sign Packages
9896
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 }}
9997
- name: Upload Signed Artifacts to Actions
100-
uses: actions/upload-artifact@v2.2.4
98+
uses: actions/upload-artifact@v4
10199
with:
102100
name: signed_nupkgs
103101
path: "build/output_packages/*nupkg"

.github/workflows/sdl2.yml

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
- "build/cmake/*"
1111
- build/nuke/Native/Core.cs
1212
- build/nuke/Native/SDL2.cs
13+
- build/nuke/Native/SilkDroid.cs
14+
- build/nuke/Build.Support.cs
1315
- .github/workflows/sdl2.yml
1416
jobs:
1517
Build:
@@ -21,15 +23,12 @@ jobs:
2123
- os: ubuntu-22.04
2224
name: Linux
2325
nuke_invoke: ./build.sh
24-
- os: windows-2022
26+
- os: windows-latest # runner is not setup for android yet
2527
name: Windows
26-
nuke_invoke: ./build.cmd
27-
extras: |
28-
pwsh build\Install-WindowsSDK.ps1
28+
nuke_invoke: ./build.cmd BuildLibSilkDroid
2929
- os: macos-14
3030
name: Darwin
3131
nuke_invoke: ./build.sh
32-
extras: ""
3332
name: ${{ matrix.env.name }} Build
3433
runs-on: ${{ matrix.env.os }}
3534
steps:
@@ -42,12 +41,52 @@ jobs:
4241
git -c submodule.third_party/git-hooks.update=none submodule update --init --recursive build/submodules/SDL
4342
git config --local user.email "9011267+dotnet-bot@users.noreply.github.com"
4443
git config --local user.name "The Silk.NET Automaton"
45-
46-
- name: Extra prerequisites
44+
- name: Setup .NET Core
45+
uses: actions/setup-dotnet@v3
46+
if: runner.os == 'Windows'
47+
with:
48+
dotnet-version: |
49+
6.0.201
50+
7.0.*
51+
8.0.*
52+
env:
53+
DOTNET_INSTALL_DIR: ~/.dotnet
54+
- name: Setup PowerShell Core
55+
continue-on-error: true
56+
if: runner.os == 'Windows'
57+
run: dotnet tool install --global PowerShell
58+
- name: Setup Java JDK 21
59+
uses: actions/setup-java@v2.3.0
60+
if: runner.os == 'Windows'
61+
with:
62+
java-version: 21
63+
distribution: "temurin"
64+
- name: Set PATH
65+
if: runner.os == 'Windows'
66+
id: set_path
4767
run: |
48-
echo running extras
49-
${{ matrix.env.extras }}
50-
68+
echo "cur_path=$env:PATH\n" >> $env:GITHUB_OUTPUT
69+
- name: Setup Android Environment
70+
uses: android-actions/setup-android@v3
71+
if: runner.os == 'Windows'
72+
env:
73+
PATH: "${{ env.DOTNET_ROOT }};${{ env.DOTNET_ROOT }}\\tools;${{ steps.set_path.outputs.cur_path }}"
74+
- name: Install Android Platforms
75+
if: runner.os == 'Windows'
76+
run: |
77+
sdkmanager --install "build-tools;30.0.2"
78+
sdkmanager --install "platform-tools"
79+
sdkmanager --install "platforms;android-31"
80+
sdkmanager --install "platforms;android-33"
81+
sdkmanager --install "platforms;android-34"
82+
sdkmanager --install "ndk-bundle"
83+
sdkmanager --install "ndk;21.4.7075529"
84+
- name: Setup Java JDK 11
85+
uses: actions/setup-java@v2.3.0
86+
if: runner.os == 'Windows'
87+
with:
88+
java-version: 11
89+
distribution: "temurin"
5190
# Install CMake
5291
- uses: lukka/get-cmake@latest
5392
if: runner.os != 'Linux'
@@ -110,10 +149,13 @@ jobs:
110149
env:
111150
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}
112151

152+
- name: Install Workloads
153+
if: runner.os == 'Windows'
154+
run: dotnet workload install android ios maccatalyst
155+
113156
- name: Build SDL2
114157
if: runner.os != 'Linux'
115-
run: ${{ matrix.env.nuke_invoke }} SDL2
158+
run: ${{ matrix.env.nuke_invoke }} SDL2 ${{ runner.os == 'Windows' && format('{0} {1}', '--native true --android-home-value', env.ANDROID_HOME) || '' }}
116159
env:
117160
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}
118161

119-

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@
1313
</div>
1414

1515
<div>
16+
17+
<h1 align="center">🚧 Silk.NET 3.0 is coming... 🚧</h1>
18+
19+
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.
20+
21+
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.
22+
23+
**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!**
24+
25+
Learn more about Silk.NET 3.0:
26+
- [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)
27+
- [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)
28+
- [Silk.NET 3.0 Meeting 1](https://www.youtube.com/watch?v=dac3t0oh3VU)
29+
- [Silk.NET 3.0 Meeting 2](https://www.youtube.com/watch?v=yXNDZDE3AHE)
30+
- [SilkX (Silk.NET 3.0) Design Discussion](https://www.youtube.com/live/N7qcETE4X_I?t=1799)
31+
32+
<h1 align="center">About Silk.NET 2.X</h1>
33+
1634
<!-- End exclude from NuGet readme. -->
1735
<!-- Begin include in NuGet readme.
1836
![Silk.NET Logo](https://raw.githubusercontent.com/dotnet/Silk.NET/main/documentation/readme/silkdotnet_v3_horizontal_96.svg)

Silk.NET.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenXR.Extensions.
616616
EndProject
617617
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}"
618618
EndProject
619+
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}"
620+
EndProject
619621
Global
620622
GlobalSection(SolutionConfigurationPlatforms) = preSolution
621623
Debug|Any CPU = Debug|Any CPU
@@ -3757,6 +3759,18 @@ Global
37573759
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|x64.Build.0 = Release|Any CPU
37583760
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|x86.ActiveCfg = Release|Any CPU
37593761
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|x86.Build.0 = Release|Any CPU
3762+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3763+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|Any CPU.Build.0 = Debug|Any CPU
3764+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|x64.ActiveCfg = Debug|Any CPU
3765+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|x64.Build.0 = Debug|Any CPU
3766+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|x86.ActiveCfg = Debug|Any CPU
3767+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Debug|x86.Build.0 = Debug|Any CPU
3768+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|Any CPU.ActiveCfg = Release|Any CPU
3769+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|Any CPU.Build.0 = Release|Any CPU
3770+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x64.ActiveCfg = Release|Any CPU
3771+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x64.Build.0 = Release|Any CPU
3772+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x86.ActiveCfg = Release|Any CPU
3773+
{12D0A556-7DDF-4902-8911-1DA3F6331149}.Release|x86.Build.0 = Release|Any CPU
37603774
EndGlobalSection
37613775
GlobalSection(SolutionProperties) = preSolution
37623776
HideSolutionNode = FALSE
@@ -4057,6 +4071,7 @@ Global
40574071
{B70533BB-FB84-4BC3-888C-88E5F40FD22D} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
40584072
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
40594073
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
4074+
{12D0A556-7DDF-4902-8911-1DA3F6331149} = {6EADA376-E83F-40B7-9539-71DD17AEF7A4}
40604075
EndGlobalSection
40614076
GlobalSection(ExtensibilityGlobals) = postSolution
40624077
SolutionGuid = {F5273D7F-3334-48DF-94E3-41AE6816CD4D}

build/nuke/Build.Support.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ partial class Build
3535
/// - Microsoft VSCode https://nuke.build/vscode
3636
public static int Main() => Execute<Build>(x => x.Compile);
3737

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

4141
[Parameter("Matrix job argument e.g. a RID for native builds."), CanBeNull]
@@ -130,6 +130,18 @@ Dictionary<string, object> ProcessedMsbuildProperties
130130
{
131131
// probably hasn't existed yet, don't care.
132132
}
133+
try
134+
{
135+
if (Native)
136+
{
137+
DotNet("workload install android");
138+
}
139+
}
140+
catch
141+
{
142+
// oh well. maybe it's already installed?
143+
}
144+
133145
GenerateSolution();
134146
}
135147
);

0 commit comments

Comments
 (0)