Update packaging for .NET Core
This commit is contained in:
parent
4472242f42
commit
1f49263c50
136
.github/workflows/dotnet-core.yml
vendored
136
.github/workflows/dotnet-core.yml
vendored
@ -6,22 +6,24 @@ on:
|
|||||||
- stable
|
- stable
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Build libsodium
|
- name: buildbase.bat
|
||||||
run: buildbase.bat ..\vs2019\libsodium.sln 16
|
run: buildbase.bat ..\vs2019\libsodium.sln 16
|
||||||
working-directory: builds/msvc/build/
|
working-directory: builds/msvc/build/
|
||||||
shell: cmd
|
shell: cmd
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: libsodium-win-x64
|
name: build-win-x64
|
||||||
path: bin/x64/Release/v142/dynamic/libsodium.dll
|
path: bin/x64/Release/v142/dynamic/libsodium.dll
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: libsodium-win-x86
|
name: build-win-x86
|
||||||
path: bin/Win32/Release/v142/dynamic/libsodium.dll
|
path: bin/Win32/Release/v142/dynamic/libsodium.dll
|
||||||
|
|
||||||
build-linux-glibc:
|
build-linux-glibc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
@ -32,16 +34,21 @@ jobs:
|
|||||||
yum install -q -y centos-release-scl ca-certificates
|
yum install -q -y centos-release-scl ca-certificates
|
||||||
yum install -q -y devtoolset-7-gcc*
|
yum install -q -y devtoolset-7-gcc*
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Build libsodium
|
- name: configure
|
||||||
run: |
|
run: scl enable devtoolset-7 './configure --disable-debug --prefix=$PWD/.libsodium-build'
|
||||||
scl enable devtoolset-7 './configure --disable-debug --prefix=$PWD/.libsodium-build'
|
- name: make
|
||||||
scl enable devtoolset-7 'make && make check'
|
run: scl enable devtoolset-7 'make'
|
||||||
scl enable devtoolset-7 'make install'
|
- name: make check
|
||||||
scl enable devtoolset-7 'strip --strip-all .libsodium-build/lib/libsodium.so'
|
run: scl enable devtoolset-7 'make check'
|
||||||
|
- name: make install
|
||||||
|
run: scl enable devtoolset-7 'make install'
|
||||||
|
- name: strip
|
||||||
|
run: scl enable devtoolset-7 'strip --strip-all .libsodium-build/lib/libsodium.so'
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: libsodium-linux-x64
|
name: build-linux-x64
|
||||||
path: .libsodium-build/lib/libsodium.so
|
path: .libsodium-build/lib/libsodium.so
|
||||||
|
|
||||||
build-linux-musl:
|
build-linux-musl:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
@ -52,29 +59,38 @@ jobs:
|
|||||||
apk update
|
apk update
|
||||||
apk add alpine-sdk ca-certificates
|
apk add alpine-sdk ca-certificates
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Build libsodium
|
- name: configure
|
||||||
run: |
|
run: ./configure --disable-debug --prefix=$PWD/.libsodium-build
|
||||||
./configure --disable-debug --prefix=$PWD/.libsodium-build
|
- name: make
|
||||||
make && make check
|
run: make
|
||||||
make install
|
- name: make check
|
||||||
strip --strip-all .libsodium-build/lib/libsodium.so
|
run: make check
|
||||||
|
- name: make install
|
||||||
|
run: make install
|
||||||
|
- name: strip
|
||||||
|
run: strip --strip-all .libsodium-build/lib/libsodium.so
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: libsodium-linux-musl-x64
|
name: build-linux-musl-x64
|
||||||
path: .libsodium-build/lib/libsodium.so
|
path: .libsodium-build/lib/libsodium.so
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Build libsodium
|
- name: configure
|
||||||
run: |
|
run: ./configure --disable-debug --prefix=$PWD/.libsodium-build
|
||||||
./configure --disable-debug --prefix=$PWD/.libsodium-build
|
- name: make
|
||||||
make && make check
|
run: make
|
||||||
make install
|
- name: make check
|
||||||
|
run: make check
|
||||||
|
- name: make install
|
||||||
|
run: make install
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: libsodium-osx-x64
|
name: build-osx-x64
|
||||||
path: .libsodium-build/lib/libsodium.dylib
|
path: .libsodium-build/lib/libsodium.dylib
|
||||||
|
|
||||||
pack:
|
pack:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
@ -88,36 +104,60 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dotnet-version: 2.1.607
|
dotnet-version: 2.1.607
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: build-win-x64
|
||||||
|
path: .libsodium-pack/runtimes/win-x64/native/
|
||||||
|
- uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: build-win-x86
|
||||||
|
path: .libsodium-pack/runtimes/win-x86/native/
|
||||||
|
- uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: build-linux-x64
|
||||||
|
path: .libsodium-pack/runtimes/linux-x64/native/
|
||||||
|
- uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: build-linux-musl-x64
|
||||||
|
path: .libsodium-pack/runtimes/linux-musl-x64/native/
|
||||||
|
- uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: build-osx-x64
|
||||||
|
path: .libsodium-pack/runtimes/osx-x64/native/
|
||||||
- name: Copy files
|
- name: Copy files
|
||||||
run: |
|
run: cp AUTHORS ChangeLog LICENSE packaging/dotnet-core/libsodium.pkgproj .libsodium-pack/
|
||||||
mkdir -p .libsodium-pack/
|
- name: Create NuGet package
|
||||||
cp AUTHORS ChangeLog LICENSE packaging/dotnet-core/libsodium.pkgproj .libsodium-pack/
|
|
||||||
- uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: libsodium-win-x64
|
|
||||||
path: .libsodium-pack/runtimes/win-x64/native/libsodium.dll
|
|
||||||
- uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: libsodium-win-x86
|
|
||||||
path: .libsodium-pack/runtimes/win-x86/native/libsodium.dll
|
|
||||||
- uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: libsodium-linux-x64
|
|
||||||
path: .libsodium-pack/runtimes/linux-x64/native/libsodium.so
|
|
||||||
- uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: libsodium-linux-musl-x64
|
|
||||||
path: .libsodium-pack/runtimes/linux-musl-x64/native/libsodium.so
|
|
||||||
- uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: libsodium-osx-x64
|
|
||||||
path: .libsodium-pack/runtimes/osx-x64/native/libsodium.dylib
|
|
||||||
- name: Pack
|
|
||||||
run: dotnet pack .libsodium-pack/libsodium.pkgproj
|
run: dotnet pack .libsodium-pack/libsodium.pkgproj
|
||||||
env:
|
env:
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: libsodium.1.0.18.nupkg
|
name: nuget-package
|
||||||
path: .libsodium-pack/libsodium.1.0.18.nupkg
|
path: .libsodium-pack/libsodium.1.0.18.nupkg
|
||||||
|
|
||||||
|
test-ubuntu18_04:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- pack
|
||||||
|
container:
|
||||||
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1-bionic
|
||||||
|
env:
|
||||||
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||||
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
||||||
|
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: nuget-package
|
||||||
|
path: .libsodium-pack/
|
||||||
|
- name: dotnet new
|
||||||
|
run: dotnet new console -n Tests -o .libsodium-test/
|
||||||
|
- name: dotnet add package libsodium
|
||||||
|
run: dotnet add .libsodium-test/Tests.csproj package libsodium -s $PWD/.libsodium-pack
|
||||||
|
- name: Copy files
|
||||||
|
run: cp -f packaging/dotnet-core/test.cs .libsodium-test/Program.cs
|
||||||
|
- name: dotnet run
|
||||||
|
run: dotnet run
|
||||||
|
working-directory: .libsodium-test/
|
||||||
|
Loading…
Reference in New Issue
Block a user