mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
.NET: build Apple targets with the xcframework build script
Including support for iOS, tvOS and Catalyst in the .NET package by the way.
This commit is contained in:
parent
9cad824a9c
commit
ee0fe028ec
87
.github/workflows/dotnet-core.yml
vendored
87
.github/workflows/dotnet-core.yml
vendored
@ -158,37 +158,31 @@ jobs:
|
|||||||
name: build-linux-musl-arm64
|
name: build-linux-musl-arm64
|
||||||
path: zig-out/lib/libsodium.so
|
path: zig-out/lib/libsodium.so
|
||||||
|
|
||||||
build-macos-x64:
|
build-apple:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: configure
|
- name: build-xcframework
|
||||||
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
|
run: env LIBSODIUM_FULL_BUILD=1 LIBSODIUM_SKIP_SIMULATORS=1 dist-build/apple-xcframework.sh
|
||||||
- name: make
|
|
||||||
run: make
|
|
||||||
- name: make check
|
|
||||||
run: make check
|
|
||||||
- name: make install
|
|
||||||
run: make install
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-osx-x64
|
name: build-macos
|
||||||
path: .libsodium-build/lib/libsodium.dylib
|
path: libsodium-apple/macos/lib/libsodium.a
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
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
|
||||||
|
|
||||||
build-macos-arm64:
|
# The list of .NET targets can be found here:
|
||||||
runs-on: macos-latest
|
# https://learn.microsoft.com/en-us/dotnet/core/rid-catalog
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- 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
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: build-osx-arm64
|
|
||||||
path: .libsodium-build/lib/libsodium.dylib
|
|
||||||
|
|
||||||
pack:
|
pack:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -200,17 +194,14 @@ jobs:
|
|||||||
- build-linux-musl
|
- build-linux-musl
|
||||||
- build-linux-musl-arm
|
- build-linux-musl-arm
|
||||||
- build-linux-musl-arm64
|
- build-linux-musl-arm64
|
||||||
- build-macos-x64
|
- build-apple
|
||||||
- build-macos-arm64
|
container:
|
||||||
|
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||||
env:
|
env:
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
||||||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
||||||
steps:
|
steps:
|
||||||
- name: Setup .NET SDK 6.0.x
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
with:
|
|
||||||
dotnet-version: 6.0.x
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
@ -224,14 +215,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: build-linux-x64
|
name: build-linux-x64
|
||||||
path: .libsodium-pack/runtimes/linux-x64/native/
|
path: .libsodium-pack/runtimes/linux-x64/native/
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: build-linux-arm64
|
|
||||||
path: .libsodium-pack/runtimes/linux-arm64/native/
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-linux-arm
|
name: build-linux-arm
|
||||||
path: .libsodium-pack/runtimes/linux-arm/native/
|
path: .libsodium-pack/runtimes/linux-arm/native/
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: build-linux-arm64
|
||||||
|
path: .libsodium-pack/runtimes/linux-arm64/native/
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-linux-musl-x64
|
name: build-linux-musl-x64
|
||||||
@ -246,12 +237,28 @@ jobs:
|
|||||||
path: .libsodium-pack/runtimes/linux-musl-arm64/native/
|
path: .libsodium-pack/runtimes/linux-musl-arm64/native/
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-osx-x64
|
name: build-macos
|
||||||
path: .libsodium-pack/runtimes/osx-x64/native/
|
path: .libsodium-pack/runtimes/osx-x64/native/
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-osx-arm64
|
name: build-macos
|
||||||
path: .libsodium-pack/runtimes/osx-arm64/native/
|
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
|
- name: Copy files
|
||||||
run: cp AUTHORS ChangeLog LICENSE packaging/dotnet-core/libsodium.pkgproj .libsodium-pack/
|
run: cp AUTHORS ChangeLog LICENSE packaging/dotnet-core/libsodium.pkgproj .libsodium-pack/
|
||||||
- name: Create NuGet package
|
- name: Create NuGet package
|
||||||
@ -265,15 +272,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- pack
|
- pack
|
||||||
|
container:
|
||||||
|
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||||
env:
|
env:
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
||||||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
||||||
steps:
|
steps:
|
||||||
- name: Setup .NET SDK 6.0.x
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
with:
|
|
||||||
dotnet-version: 6.0.x
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
Loading…
Reference in New Issue
Block a user