Skip to content

Commit 3121586

Browse files
authored
[2.0] Fix the experimental feed (#356)
* Add some log messages to find out what's going on * Fix build * Adjust the pipeline * Zero what? Elephants? * Update build.yml * Ok seriously what is going on * Maybe it's a path thing? * Ohhhhh * Comment out the cwd artifact for now, will clean later * Commit finished NUKE build system * Commit finished build pipeline * There was a reason pack and push were separate
1 parent 0b16675 commit 3121586

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ jobs:
2121
dotnet-version: 5.0.100
2222
- name: Setup NUKE
2323
run: dotnet tool install Nuke.GlobalTool --global
24-
- name: Pack
25-
# TODO build native mixins such as BuildLibSilkDroid
26-
run: nuke Pack --configuration Release --msbuild-properties VersionSuffix=build$GITHUB_RUN_NUMBER.0 ContinuousIntegrationBuild=true --feature-sets Android iOS
2724
- name: Test
25+
# skip Clean, Restore, and Compile as this will build the affect the whole solution.
26+
# dotnet test will compile the necessary projects for testing only.
2827
run: nuke Test --skip Clean Restore Compile
28+
- name: Pack
29+
# TODO build native mixins such as BuildLibSilkDroid
30+
run: nuke Pack --configuration Release --msbuild-properties VersionSuffix=build${{ github.run_number }}.0 ContinuousIntegrationBuild=true --feature-sets Android iOS
2931
- name: Push to NuGet
3032
if: ${{ github.repository == 'Ultz/Silk.NET' && github.event_name != 'pull_request' }}
31-
run: nuke PushToNuGet --skip Clean Restore Pack --nuget-feed https://pkgs.dev.azure.com/UltzOS/Silk.NET/_packaging/Experimental/nuget/v3/index.json --nuget-username ${{ secrets.AZDO_ARTIFACTS_USERNAME }} --nuget-password ${{ secrets.AZDO_ARTIFACTS_TOKEN }} --nuget-api-key az
33+
run: nuke PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://pkgs.dev.azure.com/UltzOS/Silk.NET/_packaging/Experimental/nuget/v3/index.json --nuget-username ${{ secrets.AZDO_ARTIFACTS_USERNAME }} --nuget-password ${{ secrets.AZDO_ARTIFACTS_TOKEN }} --nuget-api-key az

build/nuke/Build.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,18 @@ async Task PushPackages()
373373
{
374374
const int rateLimit = 300;
375375
var allFiles = Directory.GetFiles(RootDirectory / "build" / "output_packages", "*.nupkg")
376-
.Where(x => x.StartsWith("Silk.NET"))
376+
.Where(x => Path.GetFileName(x).StartsWith("Silk.NET"))
377377
.Select((x, i) => new {Index = i, Value = x})
378378
.GroupBy(x => x.Index / rateLimit)
379379
.Select(x => x.Select(v => v.Value).ToList())
380380
.ToList();
381381
var first = true;
382+
var pushed = 0;
382383
var feed = NuGetInterface.OpenNuGetFeed(NugetFeed, NugetUsername, NugetPassword);
383384
var uploadResource = await NuGetInterface.GetUploadResourceAsync(feed);
384385
var symbolsResource = await NuGetInterface.GetSymbolsUploadResourceAsync(feed);
386+
var exceptions = new List<Exception>();
387+
Logger.Info($"Searching for packages in \"{RootDirectory / "build" / "output_packages"}\"...");
385388
foreach (var files in allFiles)
386389
{
387390
if (first)
@@ -393,24 +396,25 @@ async Task PushPackages()
393396
await Task.Delay(TimeSpan.FromHours(1));
394397
}
395398

396-
var exceptions = new List<Exception>();
397-
398399
foreach (var file in files)
399400
{
400401
try
401402
{
402403
await NuGetInterface.UploadPackageAsync(uploadResource, NugetNoServiceEndpoint, file, NugetApiKey, symbolsResource);
404+
pushed++;
403405
}
404406
catch (Exception ex)
405407
{
406408
exceptions.Add(new Exception($"Failed to push package \"{file}\"", ex));
407409
}
408410
}
411+
}
409412

410-
if (exceptions.Count > 0)
411-
{
412-
throw new AggregateException(exceptions);
413-
}
413+
Logger.Success($"Successfully pushed {pushed} packages.");
414+
415+
if (exceptions.Count > 0)
416+
{
417+
throw new AggregateException(exceptions);
414418
}
415419
}
416420
}

src/OpenGL/Silk.NET.OpenGL/GL.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ public string GetActiveAttrib(uint program, uint index, out int size, out Attrib
375375
length = (uint) lengthTmp;
376376

377377
GetActiveAttrib
378-
(program, index, (uint) (length == 0 ? 1 : length * 2), out length, out size, out type, out var str);
378+
(program, index, (uint) (length == 0 ? 1 : length * 2), out length, out size, out type, out string str);
379379

380380
return str.Substring(0, (int) length);
381381
}
@@ -408,7 +408,7 @@ public string GetActiveUniform(uint program, uint uniformIndex, out int size, ou
408408
length = (uint) lengthTmp;
409409

410410
GetActiveUniform
411-
(program, uniformIndex, length == 0 ? 1 : length, out length, out size, out type, out var str);
411+
(program, uniformIndex, length == 0 ? 1 : length, out length, out size, out type, out string str);
412412

413413
return str.Substring(0, (int) length);
414414
}

0 commit comments

Comments
 (0)