From 4a3bc4b1dd4e2986600054a2925c6e3ee8dcf45c Mon Sep 17 00:00:00 2001 From: ektrah Date: Sat, 4 May 2024 16:35:11 +0200 Subject: [PATCH] Add support for iOS, tvOS, and MacCatalyst --- .github/workflows/test.yml | 7 +++++-- src/Cryptography/NSec.Cryptography.csproj | 3 ++- src/Experimental/NSec.Experimental.csproj | 3 ++- src/Interop/Interop.Libraries.cs | 4 ++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce853e2a..70e3fd7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,7 @@ on: [push, pull_request] jobs: test-win: + needs: test-linux-musl runs-on: windows-latest env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 @@ -15,6 +16,8 @@ jobs: with: dotnet-version: | 8.0.x + - name: Install workloads + run: dotnet workload install ios tvos maccatalyst - run: dotnet --info - uses: actions/checkout@v4 - name: Test (.NET 8.0/Debug) @@ -29,7 +32,7 @@ jobs: path: '**/*.nupkg' test-macos: - needs: [test-win, test-linux-musl] + needs: test-win strategy: fail-fast: false matrix: @@ -55,7 +58,7 @@ jobs: run: dotnet test tests -f net8.0 -c Release test-linux: - needs: [test-win, test-linux-musl] + needs: test-macos strategy: fail-fast: false matrix: diff --git a/src/Cryptography/NSec.Cryptography.csproj b/src/Cryptography/NSec.Cryptography.csproj index f60bbfa2..f0e2bc0a 100644 --- a/src/Cryptography/NSec.Cryptography.csproj +++ b/src/Cryptography/NSec.Cryptography.csproj @@ -1,7 +1,8 @@  - net8.0 + net8.0 + net8.0;net8.0-ios;net8.0-tvos;net8.0-maccatalyst diff --git a/src/Experimental/NSec.Experimental.csproj b/src/Experimental/NSec.Experimental.csproj index 466a356a..1fdda806 100644 --- a/src/Experimental/NSec.Experimental.csproj +++ b/src/Experimental/NSec.Experimental.csproj @@ -1,7 +1,8 @@  - net8.0 + net8.0 + net8.0;net8.0-ios;net8.0-tvos;net8.0-maccatalyst diff --git a/src/Interop/Interop.Libraries.cs b/src/Interop/Interop.Libraries.cs index e6ffc372..c29e8d5a 100644 --- a/src/Interop/Interop.Libraries.cs +++ b/src/Interop/Interop.Libraries.cs @@ -2,6 +2,10 @@ internal static partial class Interop { private static class Libraries { +#if IOS || TVOS || MACCATALYST + internal const string Libsodium = "__Internal"; +#else internal const string Libsodium = "libsodium"; +#endif } }