Skip to content

Commit

Permalink
.NET: add ios/tvos/catalyst
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Apr 28, 2024
1 parent 18091f3 commit 11540c8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 29 deletions.
66 changes: 38 additions & 28 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,45 +111,36 @@ jobs:
name: build-linux-musl-arm64
path: zig-out/lib/libsodium.a

build-macos-x64:
build-apple:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: configure
run: env CFLAGS="-Ofast -arch x86_64 -mmacosx-version-min=10.15" LDFLAGS="-arch x86_64 -mmacosx-version-min=10.15" ./configure --host=arm-apple-darwin20 --prefix=$PWD/.libsodium-build
- name: make
run: make
- name: make check
run: make check
- name: make install
run: make install
run: ./configure
- name: build-xcframework
run: env LIBSODIUM_FULL_BUILD=1 LIBSODIUM_SKIP_SIMULATORS=1 dist-build/apple-xcframework.sh
- uses: actions/upload-artifact@v3
with:
name: build-osx-x64
path: .libsodium-build/lib/libsodium.dylib

build-macos-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: configure
run: env CFLAGS="-Ofast -arch arm64 -mmacosx-version-min=10.15" LDFLAGS="-arch arm64 -mmacosx-version-min=10.15" ./configure --host=arm-apple-darwin20 --prefix=$PWD/.libsodium-build
- name: make
run: make
- name: make install
run: make install
name: build-macos
path: libsodium-apple/macos/lib/libsodium.dylib
- uses: actions/upload-artifact@v3
with:
name: build-osx-arm64
path: .libsodium-build/lib/libsodium.dylib

name: build-ios
path: libsodium-apple/ios/lib/libsodium.a
- uses: actions/upload-artifact@v3
with:
name: build-tvos
path: libsodium-apple/tvos/lib/libsodium.a
- uses: actions/upload-artifact@v3
with:
name: build-maccatalyst
path: libsodium-apple/catalyst/lib/libsodium.a
pack:
runs-on: ubuntu-latest
needs:
- build-windows-msvc
- build-apple
- build-others
- build-macos-x64
- build-macos-arm64
container:
image: mcr.microsoft.com/dotnet/sdk:6.0
env:
Expand All @@ -170,6 +161,7 @@ jobs:
with:
name: build-win-arm64
path: .libsodium-pack/runtimes/win-arm64/native/

- uses: actions/download-artifact@v3
with:
name: build-linux-x64
Expand All @@ -194,14 +186,32 @@ jobs:
with:
name: build-linux-musl-arm64
path: .libsodium-pack/runtimes/linux-musl-arm64/native/

- uses: actions/download-artifact@v3
with:
name: build-osx-x64
name: build-macos
path: .libsodium-pack/runtimes/osx-x64/native/
- uses: actions/download-artifact@v3
with:
name: build-osx-arm64
name: build-macos
path: .libsodium-pack/runtimes/osx-arm64/native/
- uses: actions/download-artifact@v3
with:
name: build-ios
path: .libsodium-pack/runtimes/ios-arm64/native/
- uses: actions/download-artifact@v3
with:
name: build-tvos
path: .libsodium-pack/runtimes/tvos-arm64/native/
- uses: actions/download-artifact@v3
with:
name: build-maccatalyst
path: .libsodium-pack/runtimes/maccatalyst-x64/native/
- uses: actions/download-artifact@v3
with:
name: build-maccatalyst
path: .libsodium-pack/runtimes/maccatalyst-arm64/native/

- name: Copy files
run: cp AUTHORS ChangeLog LICENSE packaging/dotnet-core/libsodium.pkgproj .libsodium-pack/
- name: Create NuGet package
Expand Down
6 changes: 5 additions & 1 deletion packaging/dotnet-core/libsodium.pkgproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
<Content Include="runtimes/linux-musl-arm/native/libsodium.a" PackagePath="runtimes/linux-musl-arm/native/" />
<Content Include="runtimes/linux-musl-arm64/native/libsodium.a" PackagePath="runtimes/linux-musl-arm64/native/" />
<Content Include="runtimes/osx-x64/native/libsodium.dylib" PackagePath="runtimes/osx-x64/native/" />
<Content Include="runtimes/osx-arm64/native/libsodium.dylib" PackagePath="runtimes/osx-arm64/native/" />
<Content Include="runtimes/osx-arm64/native/libsodium.dylib" PackagePath="runtimes/osx-arm64/native/" />
<Content Include="runtimes/ios-arm64/native/libsodium.a" PackagePath="runtimes/ios-arm64/native/" />
<Content Include="runtimes/tvos-arm64/native/libsodium.a" PackagePath="runtimes/tvos-arm64/native/" />
<Content Include="runtimes/maccatalyst-x64/native/libsodium.a" PackagePath="runtimes/maccatalyst-x64/native/" />
<Content Include="runtimes/maccatalyst-arm64/native/libsodium.a" PackagePath="runtimes/maccatalyst-arm64/native/" />
</ItemGroup>

</Project>

0 comments on commit 11540c8

Please sign in to comment.