2020-11-04 11:03:28 -05:00
|
|
|
name: .NET Package
|
2019-12-29 14:38:01 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2019-12-30 08:53:04 -05:00
|
|
|
branches:
|
2019-12-29 14:38:01 -05:00
|
|
|
- stable
|
2019-12-30 08:53:04 -05:00
|
|
|
- next
|
2019-12-29 14:38:01 -05:00
|
|
|
|
|
|
|
jobs:
|
2019-12-30 07:26:57 -05:00
|
|
|
|
2019-12-29 14:38:01 -05:00
|
|
|
build-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2019-12-30 07:26:57 -05:00
|
|
|
- name: buildbase.bat
|
2019-12-29 14:38:01 -05:00
|
|
|
run: buildbase.bat ..\vs2019\libsodium.sln 16
|
|
|
|
working-directory: builds/msvc/build/
|
|
|
|
shell: cmd
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: build-win-x64
|
2019-12-29 14:38:01 -05:00
|
|
|
path: bin/x64/Release/v142/dynamic/libsodium.dll
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: build-win-x86
|
2019-12-29 14:38:01 -05:00
|
|
|
path: bin/Win32/Release/v142/dynamic/libsodium.dll
|
2019-12-30 07:26:57 -05:00
|
|
|
|
2019-12-29 14:38:01 -05:00
|
|
|
build-linux-glibc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
2020-12-10 16:54:46 -05:00
|
|
|
image: ubuntu:16.04
|
2019-12-29 14:38:01 -05:00
|
|
|
steps:
|
|
|
|
- name: Set up build environment
|
|
|
|
run: |
|
2020-12-10 16:54:46 -05:00
|
|
|
apt-get update && apt-get install -y build-essential
|
2019-12-29 14:38:01 -05:00
|
|
|
- uses: actions/checkout@v1
|
2019-12-30 07:26:57 -05:00
|
|
|
- name: configure
|
2020-12-10 16:54:46 -05:00
|
|
|
run: ./configure --disable-debug --prefix=$PWD/.libsodium-build
|
2019-12-30 07:26:57 -05:00
|
|
|
- name: make
|
2020-12-10 16:54:46 -05:00
|
|
|
run: make
|
2019-12-30 07:26:57 -05:00
|
|
|
- name: make check
|
2020-12-10 16:54:46 -05:00
|
|
|
run: make check
|
2019-12-30 07:26:57 -05:00
|
|
|
- name: make install
|
2020-12-10 16:54:46 -05:00
|
|
|
run: make install
|
2019-12-30 07:26:57 -05:00
|
|
|
- name: strip
|
2020-12-10 16:54:46 -05:00
|
|
|
run: strip --strip-all .libsodium-build/lib/libsodium.so
|
2019-12-29 14:38:01 -05:00
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: build-linux-x64
|
2019-12-29 14:38:01 -05:00
|
|
|
path: .libsodium-build/lib/libsodium.so
|
2019-12-30 07:26:57 -05:00
|
|
|
|
2019-12-29 14:38:01 -05:00
|
|
|
build-linux-musl:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: alpine:3.7
|
|
|
|
steps:
|
|
|
|
- name: Set up build environment
|
|
|
|
run: |
|
|
|
|
apk update
|
|
|
|
apk add alpine-sdk ca-certificates
|
|
|
|
- uses: actions/checkout@v1
|
2019-12-30 07:26:57 -05:00
|
|
|
- name: configure
|
|
|
|
run: ./configure --disable-debug --prefix=$PWD/.libsodium-build
|
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: make check
|
|
|
|
run: make check
|
|
|
|
- name: make install
|
|
|
|
run: make install
|
|
|
|
- name: strip
|
|
|
|
run: strip --strip-all .libsodium-build/lib/libsodium.so
|
2019-12-29 14:38:01 -05:00
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: build-linux-musl-x64
|
2019-12-29 14:38:01 -05:00
|
|
|
path: .libsodium-build/lib/libsodium.so
|
2019-12-30 07:26:57 -05:00
|
|
|
|
2019-12-29 14:38:01 -05:00
|
|
|
build-macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2019-12-30 07:26:57 -05:00
|
|
|
- name: configure
|
|
|
|
run: ./configure --disable-debug --prefix=$PWD/.libsodium-build
|
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: make check
|
|
|
|
run: make check
|
|
|
|
- name: make install
|
|
|
|
run: make install
|
2019-12-29 14:38:01 -05:00
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: build-osx-x64
|
2019-12-29 14:38:01 -05:00
|
|
|
path: .libsodium-build/lib/libsodium.dylib
|
2019-12-30 07:26:57 -05:00
|
|
|
|
2019-12-29 14:38:01 -05:00
|
|
|
pack:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs:
|
|
|
|
- build-windows
|
|
|
|
- build-linux-glibc
|
|
|
|
- build-linux-musl
|
|
|
|
- build-macos
|
2020-11-04 11:03:28 -05:00
|
|
|
container:
|
|
|
|
image: mcr.microsoft.com/dotnet/sdk:5.0
|
|
|
|
env:
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
|
|
|
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
2019-12-29 14:38:01 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions/download-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: build-win-x64
|
|
|
|
path: .libsodium-pack/runtimes/win-x64/native/
|
2019-12-29 14:38:01 -05:00
|
|
|
- uses: actions/download-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: build-win-x86
|
|
|
|
path: .libsodium-pack/runtimes/win-x86/native/
|
2019-12-29 14:38:01 -05:00
|
|
|
- uses: actions/download-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: build-linux-x64
|
|
|
|
path: .libsodium-pack/runtimes/linux-x64/native/
|
2019-12-29 14:38:01 -05:00
|
|
|
- uses: actions/download-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: build-linux-musl-x64
|
|
|
|
path: .libsodium-pack/runtimes/linux-musl-x64/native/
|
2019-12-29 14:38:01 -05:00
|
|
|
- uses: actions/download-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: build-osx-x64
|
|
|
|
path: .libsodium-pack/runtimes/osx-x64/native/
|
|
|
|
- name: Copy files
|
|
|
|
run: cp AUTHORS ChangeLog LICENSE packaging/dotnet-core/libsodium.pkgproj .libsodium-pack/
|
|
|
|
- name: Create NuGet package
|
2020-11-04 11:03:28 -05:00
|
|
|
run: dotnet pack -c Release .libsodium-pack/libsodium.pkgproj
|
2019-12-29 14:38:01 -05:00
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2019-12-30 07:26:57 -05:00
|
|
|
name: nuget-package
|
2020-11-04 11:03:28 -05:00
|
|
|
path: .libsodium-pack/bin/Release/libsodium.1.0.18.nupkg
|
2019-12-30 07:26:57 -05:00
|
|
|
|
|
|
|
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/
|