diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1678fb7c6f..0b5734d3e8 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -20,20 +20,29 @@ jobs:
os: windows-latest
- rid: win-x86
os: windows-latest
+
# given there appear to be significant differences
# we test all available ubuntu versions here
# if this causes significant slow downs, remove
- - rid: linux-x64
- os: ubuntu-22.04
- - rid: linux-x64
+
+ # no clangsharp support https://github.com/dotnet/ClangSharp/issues/364
+ # - rid: linux-x64
+ # os: ubuntu-22.04
+
+ - rid: ubuntu.20.04-x64
os: ubuntu-20.04
- - rid: linux-x64
- os: ubuntu-18.04
+
+ # Ubuntu raises an SEH exception, see https://discord.com/channels/521092042781229087/1004867182787838043/1004887853500739684
+ # - rid: ubuntu.18.04-x64
+ # os: ubuntu-18.04
+
# macos 10.15 is not tested as the runner image is deprecated.
- - rid: osx.12-x64
- os: macos-12
- - rid: osx.11.0-x64
- os: macos-11
+
+ # OSX is currently broken as standard headers (stdint.h) can't be found
+ # - rid: osx.12-x64
+ # os: macos-12
+ # - rid: osx.11.0-x64
+ # os: macos-11
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
@@ -41,5 +50,10 @@ jobs:
submodules: "true"
- name: Setup .NET
uses: actions/setup-dotnet@v2
+ - name: Restore
+ run: dotnet restore --runtime ${{ matrix.rid }}
+ # Build can't be done in a separate step as building for a specific runtime & configuration is unsupported for some reason...
+ # https://github.com/dotnet/sdk/issues/14281
+ # doing the same (building for a specific configuration and runtime is supported via dotnet test)
- name: Test
- run: dotnet test -c Release --no-build --runtime ${{ matrix.rid }}
+ run: dotnet test -c Release --no-restore --runtime ${{ matrix.rid }}
diff --git a/Directory.Packages.props b/Directory.Packages.props
index e8b85332be..457763170e 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -3,16 +3,19 @@
This file tracks all package versions used in Silk.NET, including tests.
For more information what this is see https://github.com/NuGet/Home/wiki/Centrally-managing-NuGet-package-versions
-->
+
+ 4.2.0
+
-
+
-
-
+
+
@@ -38,7 +41,6 @@
-
diff --git a/src/generators/Silk.NET.SilkTouch.Scraper/ClangScraper.cs b/src/generators/Silk.NET.SilkTouch.Scraper/ClangScraper.cs
index d8676e96d5..2cc06cdd70 100644
--- a/src/generators/Silk.NET.SilkTouch.Scraper/ClangScraper.cs
+++ b/src/generators/Silk.NET.SilkTouch.Scraper/ClangScraper.cs
@@ -79,20 +79,19 @@ Stream OutputStreamFactory(string fileName)
return files[fileName] = new MemoryStream();
}
-
- var commandLineArgs = new string[3 + definedMacros.Length + includeDirectories.Length];
- commandLineArgs[0] = "--language=c++";
- commandLineArgs[1] = "--std=c++17";
- commandLineArgs[2] = "-Wno-pragma-once-outside-header";
+ var commandLineArgs = new List();
+ commandLineArgs.Add("--language=c++");
+ commandLineArgs.Add("--std=c++17");
+ commandLineArgs.Add("-Wno-pragma-once-outside-header");
for (int i = 0; i < definedMacros.Length; i++)
{
- commandLineArgs[3 + i] = "--define-macro=" + definedMacros[i];
+ commandLineArgs.Add("--define-macro=" + definedMacros[i]);
}
for (int i = 0; i < includeDirectories.Length; i++)
{
- commandLineArgs[3 + definedMacros.Length] = "--include-directory=" + definedMacros[i];
+ commandLineArgs.Add("--include-directory=" + includeDirectories[i]);
}
var translationFlags = CXTranslationUnit_Flags.CXTranslationUnit_None;
@@ -106,7 +105,7 @@ Stream OutputStreamFactory(string fileName)
try
{
using (var pinvokeGenerator = new PInvokeGenerator(config, OutputStreamFactory))
- GenerateBindings(pinvokeGenerator, headerFile, commandLineArgs, translationFlags);
+ GenerateBindings(pinvokeGenerator, headerFile, commandLineArgs.ToArray(), translationFlags);
foreach (var (name, stream) in files)
{