From 8664bdaa75f9a4de0c9f63430918f34d45beba7b Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Mon, 27 Sep 2021 16:32:39 -0600 Subject: [PATCH 1/6] Run all tests in one action --- .github/workflows/tests.yaml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 99e59277..a6329920 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -24,19 +24,6 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - project: - - Wabbajack.Compiler.Test - - Wabbajack.Compression.BSA.Test - - Wabbajack.Downloaders.Dispatcher.Test - - Wabbajack.DTOs.Test - - Wabbajack.FileExtractor.Test - - Wabbajack.Hashing.PHash.Test - - Wabbajack.Hashing.xxHash64.Test - - Wabbajack.Installer.Test - - Wabbajack.Networking.NexusApi.Test - - Wabbajack.Paths.Test - - Wabbajack.Paths.IO.Test - - Wabbajack.VFS.Test steps: - uses: actions/checkout@v2 @@ -52,11 +39,11 @@ jobs: include-prerelease: true - name: Install dependencies - run: dotnet restore ${{ matrix.project }}/${{ matrix.project }}.csproj + run: dotnet restore - name: Build - run: dotnet build ${{ matrix.project }}/${{ matrix.project }}.csproj --configuration Release --no-restore + run: dotnet build --configuration Release --no-restore - name: Test - run: dotnet test ${{ matrix.project }}/${{ matrix.project }}.csproj --no-restore + run: dotnet test --no-restore publish: name: Publish ${{ matrix.project }} From db9b1234f557a2a87b75f62b4a75ab19d8824ac3 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Mon, 27 Sep 2021 16:43:21 -0600 Subject: [PATCH 2/6] Fix cef download command --- Wabbajack.App/Wabbajack.App.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Wabbajack.App/Wabbajack.App.csproj b/Wabbajack.App/Wabbajack.App.csproj index 25d4a176..6611305b 100644 --- a/Wabbajack.App/Wabbajack.App.csproj +++ b/Wabbajack.App/Wabbajack.App.csproj @@ -37,6 +37,6 @@ - + From cc0c2d2eac5490868f0bb258781d1fa8f80ff778 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Mon, 27 Sep 2021 16:51:27 -0600 Subject: [PATCH 3/6] Try to get this to work on an action --- Wabbajack.App/Wabbajack.App.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Wabbajack.App/Wabbajack.App.csproj b/Wabbajack.App/Wabbajack.App.csproj index 6611305b..952308e7 100644 --- a/Wabbajack.App/Wabbajack.App.csproj +++ b/Wabbajack.App/Wabbajack.App.csproj @@ -37,6 +37,6 @@ - + From fb8bbfaf7e923b22347d198ef8467e77256d01dc Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Mon, 27 Sep 2021 17:59:01 -0600 Subject: [PATCH 4/6] Fix OSX detection --- Wabbajack.CLI/DTOs/CefCDNResponse.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Wabbajack.CLI/DTOs/CefCDNResponse.cs b/Wabbajack.CLI/DTOs/CefCDNResponse.cs index 61b0e5bd..3401e7f5 100644 --- a/Wabbajack.CLI/DTOs/CefCDNResponse.cs +++ b/Wabbajack.CLI/DTOs/CefCDNResponse.cs @@ -127,16 +127,22 @@ namespace Wabbajack.CLI.DTOs public File FindSource(string downloadVersion) { - var tuple = (OSDescription.Split(" ").First().Trim(), ProcessArchitecture); - - if (OSDescription.StartsWith("Microsoft Windows")) - tuple = ("Windows", tuple.ProcessArchitecture); + string os = ""; + if (IsOSPlatform(OSPlatform.Linux)) + os = "Linux"; + if (IsOSPlatform(OSPlatform.Windows)) + os = "Windows"; + if (IsOSPlatform(OSPlatform.OSX)) + os = "OSX"; + + var tuple = (os, ProcessArchitecture); List versions = new(); if (tuple == ("Linux", Architecture.X64)) versions = Linux64.Versions; else if (tuple == ("Linux", Architecture.X86)) versions = Linux32.Versions; else if (tuple == ("Windows", Architecture.X64)) versions = Windows64.Versions; + else if (tuple == ("OSX", Architecture.X64)) versions = Macosx64.Versions; var version = versions.Where(v => v.CefVersion.StartsWith(downloadVersion + ".")) .OrderByDescending(v => v.ChromiumVersion) From ecb5e80b84e7d659f86be1a561fc327537f8c247 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Mon, 27 Sep 2021 19:44:12 -0600 Subject: [PATCH 5/6] Fix slightly broken OSX tests --- Wabbajack.RateLimiter.Test/RateLimiterTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Wabbajack.RateLimiter.Test/RateLimiterTests.cs b/Wabbajack.RateLimiter.Test/RateLimiterTests.cs index 279d04cb..fb7b6332 100644 --- a/Wabbajack.RateLimiter.Test/RateLimiterTests.cs +++ b/Wabbajack.RateLimiter.Test/RateLimiterTests.cs @@ -109,7 +109,7 @@ namespace Wabbajack.RateLimiter.Test { tasks.Add(Task.Run(async () => { - using var job = await rateLimiter.Begin("Transferring", 1024 * 1024 / 10 * 5,CancellationToken.None); + using var job = await rateLimiter.Begin("Transferring", 1024 * 1024 / 10 * 5, CancellationToken.None); for (var x = 0; x < 5; x++) { await job.Report(1024 * 1024 / 10, CancellationToken.None); @@ -120,7 +120,7 @@ namespace Wabbajack.RateLimiter.Test await WhenAll(tasks.ToArray()); var elapsed = sw.Elapsed; Assert.True(elapsed > TimeSpan.FromSeconds(0.5)); - Assert.True(elapsed < TimeSpan.FromSeconds(1)); + Assert.True(elapsed < TimeSpan.FromSeconds(1.5)); } } } \ No newline at end of file From 80b69be528ef2fbbafbb9bb5a8509cfccdaa8d78 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Mon, 27 Sep 2021 21:33:52 -0600 Subject: [PATCH 6/6] Fix publish action --- .github/workflows/tests.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a6329920..e6bfd3c7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -46,16 +46,22 @@ jobs: run: dotnet test --no-restore publish: - name: Publish ${{ matrix.project }} + name: Publish Projects runs-on: ubuntu-latest if: ${{ github.event_name == 'push' }} strategy: matrix: project: + - Wabbajack.CLI - Wabbajack.Common - Wabbajack.Compiler - - Wabbajack.Compression.BSA - Wabbajack.Downloaders.Interfaces + - Wabbajack.Downloaders.Dispatcher + - Wabbajack.Compression.BSA + - Wabbajack.Downloaders.IPS4OAuth2Downloader + - Wabbajack.Downloaders.MediaFire + - Wabbajack.Downloaders.Mega + - Wabbajack.Downloaders.ModDB - Wabbajack.Downloaders.GoogleDrive - Wabbajack.Downloaders.Http - Wabbajack.Downloaders.Nexus @@ -65,6 +71,8 @@ jobs: - Wabbajack.Hashing.PHash - Wabbajack.Hashing.xxHash64 - Wabbajack.Installer + - Wabbajack.Networking.Discord + - Wabbajack.Networking.GitHub - Wabbajack.Networking.Http - Wabbajack.Networking.Http.Interfaces - Wabbajack.Networking.NexusApi @@ -73,7 +81,6 @@ jobs: - Wabbajack.Paths.IO - Wabbajack.RateLimiter - Wabbajack.VFS - needs: build steps: