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 a4033f1 commit a2f4272
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ on: [push, pull_request]
jobs:

test-windows-x64:
needs: test-alpine-x64
runs-on: windows-latest
steps:
- name: Set up .NET
uses: actions/setup-dotnet@v4
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 @@ -26,6 +29,7 @@ jobs:
path: '**/*.nupkg'

test-ubuntu-x64:
needs: test-macos-arm64
runs-on: ubuntu-latest
steps:
- name: Set up .NET
Expand Down Expand Up @@ -53,6 +57,7 @@ jobs:
run: dotnet test -f net8.0 -c Release

test-macos-arm64:
needs: test-windows-x64
runs-on: macos-latest
steps:
- name: Set up .NET
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
}
}
3 changes: 2 additions & 1 deletion src/Sodium.Core/Sodium.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;netstandard2.1;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(RUNNER_OS)'=='Windows'">net8.0;net8.0-ios;net8.0-tvos;net8.0-maccatalyst;netstandard2.1;netstandard2.0</TargetFrameworks>
<LangVersion>12.0</LangVersion>
<Features>strict</Features>
<Nullable>enable</Nullable>
Expand Down

0 comments on commit a2f4272

Please sign in to comment.