Skip to content

Commit

Permalink
Add support for iOS, tvOS, and MacCatalyst
Browse files Browse the repository at this point in the history
  • Loading branch information
ektrah committed May 4, 2024
1 parent fc777a5 commit 4a3bc4b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -29,7 +32,7 @@ jobs:
path: '**/*.nupkg'

test-macos:
needs: [test-win, test-linux-musl]
needs: test-win
strategy:
fail-fast: false
matrix:
Expand All @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion src/Cryptography/NSec.Cryptography.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(RUNNER_OS)'=='Windows'">net8.0;net8.0-ios;net8.0-tvos;net8.0-maccatalyst</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Experimental/NSec.Experimental.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(RUNNER_OS)'=='Windows'">net8.0;net8.0-ios;net8.0-tvos;net8.0-maccatalyst</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/Interop/Interop.Libraries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 4a3bc4b

Please sign in to comment.