Skip to content

Commit 7f1dab2

Browse files
authored
Merge pull request #2025 from tyrielv/tyrielv/drop-debug-ci
ci: drop Debug configuration from build and test matrices
2 parents 2934dd3 + 19efa87 commit 7f1dab2

6 files changed

Lines changed: 20 additions & 10 deletions

File tree

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ jobs:
261261

262262
strategy:
263263
matrix:
264-
configuration: [ Debug, Release ]
264+
configuration: [ Release ]
265265
fail-fast: false
266266

267267
steps:

.github/workflows/functional-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161

6262
strategy:
6363
matrix:
64-
configuration: [ Debug, Release ]
64+
configuration: [ Release ]
6565
architecture: [ x86_64, arm64 ]
6666
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] # 12 parallel jobs to speed up the tests
6767
fail-fast: false # most failures are flaky tests, no need to stop the other jobs from succeeding

.github/workflows/upgrade-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
strategy:
2828
matrix:
29-
configuration: [ Debug ]
29+
configuration: [ Release ]
3030
scenario:
3131
- staging-upgrade
3232
- clean-upgrade

GVFS/GVFS.Common/GitStatusCache.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using GVFS.Common.Tracing;
44
using System;
55
using System.ComponentModel;
6-
using System.Diagnostics;
6+
77
using System.IO;
88
using System.Threading;
99
using System.Threading.Tasks;
@@ -597,7 +597,10 @@ private bool TryRebuildStatusCache()
597597

598598
private bool TryDeleteStatusCacheFile()
599599
{
600-
Debug.Assert(this.cacheFileLock.IsHeldByCurrentThread, "Attempting to delete the git status cache file without the cacheFileLock");
600+
if (!this.cacheFileLock.IsHeldByCurrentThread)
601+
{
602+
throw new InvalidOperationException("Attempting to delete the git status cache file without the cacheFileLock");
603+
}
601604

602605
try
603606
{
@@ -635,7 +638,10 @@ private bool TryDeleteStatusCacheFile()
635638
/// <returns>True on success, False on failure</returns>
636639
private bool MoveCacheFileToFinalLocation(string tmpStatusFilePath)
637640
{
638-
Debug.Assert(this.cacheFileLock.IsHeldByCurrentThread, "Attempting to update the git status cache file without the cacheFileLock");
641+
if (!this.cacheFileLock.IsHeldByCurrentThread)
642+
{
643+
throw new InvalidOperationException("Attempting to update the git status cache file without the cacheFileLock");
644+
}
639645

640646
try
641647
{

GVFS/GVFS.Common/Tracing/QueuedPipeStringWriter.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22
using System.Collections.Concurrent;
3-
using System.Diagnostics;
3+
44
using System.IO.Pipes;
55
using System.Text;
66
using System.Threading;
@@ -86,7 +86,10 @@ public void Stop()
8686
this.queue.CompleteAdding();
8787
this.writerThread.Join();
8888

89-
Debug.Assert(this.queue.IsCompleted, "Message queue should be empty after being stopped");
89+
if (!this.queue.IsCompleted)
90+
{
91+
throw new InvalidOperationException("Message queue should be empty after being stopped");
92+
}
9093
}
9194

9295
public void Dispose()

GVFS/GVFS.UnitTests/Mock/Common/MockPhysicalGitObjects.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
using GVFS.Common.Git;
44
using GVFS.Common.Http;
55
using GVFS.Common.Tracing;
6-
using System.Diagnostics;
6+
7+
using System;
78
using System.IO;
89

910
namespace GVFS.UnitTests.Mock.Common
@@ -26,7 +27,7 @@ public override string WriteLooseObject(Stream responseStream, string sha, bool
2627

2728
public override string WriteTempPackFile(Stream stream)
2829
{
29-
Debug.Assert(stream != null, "WriteTempPackFile should not receive a null stream");
30+
ArgumentNullException.ThrowIfNull(stream);
3031

3132
using (stream)
3233
using (StreamReader reader = new StreamReader(stream))

0 commit comments

Comments
 (0)