From 896b0e254dbd0479070b8ad611c72a8e57587e82 Mon Sep 17 00:00:00 2001 From: ektrah Date: Sun, 29 Dec 2019 20:38:01 +0100 Subject: [PATCH 1/2] Build NuGet package using GitHub Actions --- .github/workflows/dotnet-core.yml | 123 ++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 .github/workflows/dotnet-core.yml diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml new file mode 100644 index 00000000..2c00b249 --- /dev/null +++ b/.github/workflows/dotnet-core.yml @@ -0,0 +1,123 @@ +name: .NET Core Package + +on: + push: + branches: + - stable + +jobs: + build-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + - name: Build libsodium + run: buildbase.bat ..\vs2019\libsodium.sln 16 + working-directory: builds/msvc/build/ + shell: cmd + - uses: actions/upload-artifact@v1 + with: + name: libsodium-win-x64 + path: bin/x64/Release/v142/dynamic/libsodium.dll + - uses: actions/upload-artifact@v1 + with: + name: libsodium-win-x86 + path: bin/Win32/Release/v142/dynamic/libsodium.dll + build-linux-glibc: + runs-on: ubuntu-latest + container: + image: centos:6 + steps: + - name: Set up build environment + run: | + yum install -q -y centos-release-scl ca-certificates + yum install -q -y devtoolset-7-gcc* + - uses: actions/checkout@v1 + - name: Build libsodium + run: | + scl enable devtoolset-7 './configure --disable-debug --prefix=$PWD/.libsodium-build' + scl enable devtoolset-7 'make && make check' + scl enable devtoolset-7 'make install' + scl enable devtoolset-7 'strip --strip-all .libsodium-build/lib/libsodium.so' + - uses: actions/upload-artifact@v1 + with: + name: libsodium-linux-x64 + path: .libsodium-build/lib/libsodium.so + 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 + - name: Build libsodium + run: | + ./configure --disable-debug --prefix=$PWD/.libsodium-build + make && make check + make install + strip --strip-all .libsodium-build/lib/libsodium.so + - uses: actions/upload-artifact@v1 + with: + name: libsodium-linux-musl-x64 + path: .libsodium-build/lib/libsodium.so + build-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + - name: Build libsodium + run: | + ./configure --disable-debug --prefix=$PWD/.libsodium-build + make && make check + make install + - uses: actions/upload-artifact@v1 + with: + name: libsodium-osx-x64 + path: .libsodium-build/lib/libsodium.dylib + pack: + runs-on: ubuntu-latest + needs: + - build-windows + - build-linux-glibc + - build-linux-musl + - build-macos + steps: + - name: Set up .NET Core SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 2.1.607 + - uses: actions/checkout@v1 + - name: Copy files + run: | + mkdir -p .libsodium-pack/ + 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 + env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + - uses: actions/upload-artifact@v1 + with: + name: libsodium.1.0.18.nupkg + path: .libsodium-pack/libsodium.1.0.18.nupkg From 76289a2db1fa166b187eae3e9b9f0cf343528bc0 Mon Sep 17 00:00:00 2001 From: ektrah Date: Sun, 29 Dec 2019 20:43:54 +0100 Subject: [PATCH 2/2] Update packaging for .NET Core --- packaging/dotnet-core/.gitignore | 5 - packaging/dotnet-core/README.md | 59 ---- .../{libsodium.props => libsodium.pkgproj} | 13 +- packaging/dotnet-core/prepare.py | 302 ------------------ packaging/dotnet-core/recipes/alpine-x64 | 3 - packaging/dotnet-core/recipes/build | 9 - packaging/dotnet-core/recipes/centos-x64 | 3 - packaging/dotnet-core/recipes/debian-x64 | 4 - packaging/dotnet-core/recipes/fedora-x64 | 3 - packaging/dotnet-core/recipes/linux-x64 | 4 - packaging/dotnet-core/recipes/opensuse-x64 | 3 - packaging/dotnet-core/recipes/pack | 5 - packaging/dotnet-core/recipes/test | 27 -- packaging/dotnet-core/recipes/ubuntu-x64 | 4 - 14 files changed, 7 insertions(+), 437 deletions(-) delete mode 100644 packaging/dotnet-core/.gitignore delete mode 100644 packaging/dotnet-core/README.md rename packaging/dotnet-core/{libsodium.props => libsodium.pkgproj} (78%) delete mode 100755 packaging/dotnet-core/prepare.py delete mode 100644 packaging/dotnet-core/recipes/alpine-x64 delete mode 100644 packaging/dotnet-core/recipes/build delete mode 100644 packaging/dotnet-core/recipes/centos-x64 delete mode 100644 packaging/dotnet-core/recipes/debian-x64 delete mode 100644 packaging/dotnet-core/recipes/fedora-x64 delete mode 100644 packaging/dotnet-core/recipes/linux-x64 delete mode 100644 packaging/dotnet-core/recipes/opensuse-x64 delete mode 100644 packaging/dotnet-core/recipes/pack delete mode 100644 packaging/dotnet-core/recipes/test delete mode 100644 packaging/dotnet-core/recipes/ubuntu-x64 diff --git a/packaging/dotnet-core/.gitignore b/packaging/dotnet-core/.gitignore deleted file mode 100644 index 827f395a..00000000 --- a/packaging/dotnet-core/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -build -cache -temp -Makefile -!recipes/* diff --git a/packaging/dotnet-core/README.md b/packaging/dotnet-core/README.md deleted file mode 100644 index a9016b6b..00000000 --- a/packaging/dotnet-core/README.md +++ /dev/null @@ -1,59 +0,0 @@ -This directory contains scripts and files to package libsodium for .NET Core. - -*Note:* The NuGet package is intended for the implementation of language -bindings such as [NSec](https://github.com/ektrah/nsec). It does not provide a -.NET API itself. - -In .NET Core, it is customary to provide pre-compiled binaries for all platforms -as NuGet packages. The purpose of the `prepare.py` script in this directory is -to generate a `Makefile` that downloads and builds libsodium binaries for a -number of platforms and assembles them in a NuGet package that can be uploaded -to [nuget.org](https://nuget.org/). - -* For Windows, binaries are obtained from - [download.libsodium.org](https://download.libsodium.org/libsodium/releases/). -* For macOS, binaries are extracted from the - [Homebrew libsodium bottle](https://bintray.com/homebrew/bottles/libsodium). -* For Linux, libsodium is compiled in Docker containers. - -See `prepare.py` for the complete list of supported platforms. - -The metadata for the NuGet package is located in `libsodium.props`. - - -**Versioning** - -Version numbers for the packages for .NET Core consist of three components: - -* *libsodium version* - The libsodium version is in the format `X.Y.Z`. -* *package revision* - It may be necessary to release more than one package for a libsodium version, - e.g., when adding support for a new platform or if a release contains a broken - binary. In this case, a package revision number is added as a fourth part to - the libsodium version, starting at `1`. For example, `1.0.18` is the initial - release of the package for libsodium 1.0.18 and `1.0.18.5` is the fifth - revision (sixth release) of that package. -* *pre-release label* - If a package is a pre-release, a label is appended to the version number in - `-preview-##` format where `##` is the number of the pre-release, starting at - `01`. For example, `1.0.18-preview-01` is the first pre-release of the package - for libsodium 1.0.18 and `1.0.18.5-preview-02` the second pre-release of the - fifth revision of the package for libsodium 1.0.18. - - -**Making a release** - -1. Update any existing Docker images. -2. Run `python3 prepare.py ` to generate the `Makefile`, where - `` is the package version number in the format described above. -3. Take a look at the generated `Makefile`. It uses `sudo` a few times. -4. Run `make` to download and build the binaries and create the NuGet package. - You may need to install `docker`, `make`, `curl`, `tar` and `unzip` first. -5. Grab a cup of coffee. Downloading the Docker images and compiling the Linux - binaries takes a while. When done, the NuGet package is output as a `.nupkg` - file in the `build` directory. -6. Run `make test` to perform a quick test of the NuGet package. Verify that - everything else in the `.nupkg` file is in place. -7. Publish the release by uploading the `.nupkg` file to - [nuget.org](https://nuget.org/). diff --git a/packaging/dotnet-core/libsodium.props b/packaging/dotnet-core/libsodium.pkgproj similarity index 78% rename from packaging/dotnet-core/libsodium.props rename to packaging/dotnet-core/libsodium.pkgproj index 32a1c0f5..e85ff0cd 100644 --- a/packaging/dotnet-core/libsodium.props +++ b/packaging/dotnet-core/libsodium.pkgproj @@ -1,24 +1,25 @@ - - + netstandard1.1 - true true false + true $(MSBuildProjectDirectory) $(MSBuildProjectFullPath) libsodium - + 1.0.18 Frank Denis Internal implementation package not meant for direct consumption. Please do not reference directly. - © 2013-2019 Frank Denis + © $([System.DateTime]::UtcNow.ToString(yyyy)) Frank Denis + ISC true - https://raw.githubusercontent.com/jedisct1/libsodium/master/LICENSE https://libsodium.org/ + https://github.com/jedisct1/libsodium.git + git 4.0 diff --git a/packaging/dotnet-core/prepare.py b/packaging/dotnet-core/prepare.py deleted file mode 100755 index 7a4883f5..00000000 --- a/packaging/dotnet-core/prepare.py +++ /dev/null @@ -1,302 +0,0 @@ -#!/usr/bin/env python3 - -import os.path -import re -import sys - -WINDOWS = [ - # --------------------- ----------------- # - # Runtime ID Platform # - # --------------------- ----------------- # - ("win-x64", "x64"), - ("win-x86", "Win32"), - # --------------------- ----------------- # -] - -MACOS = [ - # --------------------- ----------------- # - # Runtime ID Codename # - # --------------------- ----------------- # - ("osx-x64", "mojave"), - # --------------------- ----------------- # -] - -LINUX = [ - # --------------------- ----------------- # - # Runtime ID Docker Image # - # --------------------- ----------------- # - ("linux-x64", "debian:stretch"), - # --------------------- ----------------- # -] - -EXTRAS = ["LICENSE", "AUTHORS", "ChangeLog"] - -PROPSFILE = "libsodium.props" -MAKEFILE = "Makefile" -BUILDDIR = "build" -CACHEDIR = "cache" -TEMPDIR = "temp" - -PACKAGE = "libsodium" -LIBRARY = "libsodium" - -DOCKER = "sudo docker" - - -class Version: - def __init__(self, libsodium_version, package_version): - self.libsodium_version = libsodium_version - self.package_version = package_version - - self.builddir = os.path.join(BUILDDIR, libsodium_version) - self.tempdir = os.path.join(TEMPDIR, libsodium_version) - self.projfile = os.path.join( - self.builddir, "{0}.{1}.pkgproj".format(PACKAGE, package_version) - ) - self.propsfile = os.path.join(self.builddir, "{0}.props".format(PACKAGE)) - self.pkgfile = os.path.join( - BUILDDIR, "{0}.{1}.nupkg".format(PACKAGE, package_version) - ) - - -class WindowsItem: - def __init__(self, version, rid, platform): - self.url = "https://download.libsodium.org/libsodium/releases/libsodium-{0}-stable-msvc.zip".format( - version.libsodium_version - ) - self.cachefile = os.path.join(CACHEDIR, re.sub(r"[^A-Za-z0-9.]", "-", self.url)) - self.packfile = os.path.join( - version.builddir, "runtimes", rid, "native", LIBRARY + ".dll" - ) - self.itemfile = "{0}/Release/v140/dynamic/libsodium.dll".format(platform) - self.tempdir = os.path.join(version.tempdir, rid) - self.tempfile = os.path.join(self.tempdir, os.path.normpath(self.itemfile)) - - def make(self, f): - f.write("\n") - f.write("{0}: {1}\n".format(self.packfile, self.tempfile)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write("\tcp -f $< $@\n") - f.write("\n") - f.write("{0}: {1}\n".format(self.tempfile, self.cachefile)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write( - "\tcd {0} && unzip -q -DD -o {1} '{2}'\n".format( - self.tempdir, - os.path.relpath(self.cachefile, self.tempdir), - self.itemfile, - ) - ) - - -class MacOSItem: - def __init__(self, version, rid, codename): - self.url = "https://bintray.com/homebrew/bottles/download_file?file_path=libsodium-{0}.{1}.bottle.tar.gz".format( - version.libsodium_version, codename - ) - self.cachefile = os.path.join(CACHEDIR, re.sub(r"[^A-Za-z0-9.]", "-", self.url)) - self.packfile = os.path.join( - version.builddir, "runtimes", rid, "native", LIBRARY + ".dylib" - ) - self.itemfile = "libsodium/{0}/lib/libsodium.dylib".format( - version.libsodium_version - ) - self.tempdir = os.path.join(version.tempdir, rid) - self.tempfile = os.path.join(self.tempdir, os.path.normpath(self.itemfile)) - - def make(self, f): - f.write("\n") - f.write("{0}: {1}\n".format(self.packfile, self.tempfile)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write("\tcp -f $< $@\n") - f.write("\n") - f.write("{0}: {1}\n".format(self.tempfile, self.cachefile)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write( - "\tcd {0} && tar xzmf {1} '{2}'\n".format( - self.tempdir, - os.path.relpath(self.cachefile, self.tempdir), - os.path.dirname(self.itemfile), - ) - ) - - -class LinuxItem: - def __init__(self, version, rid, docker_image): - self.url = "https://download.libsodium.org/libsodium/releases/libsodium-{0}.tar.gz".format( - version.libsodium_version - ) - self.cachefile = os.path.join(CACHEDIR, re.sub(r"[^A-Za-z0-9.]", "-", self.url)) - self.packfile = os.path.join( - version.builddir, "runtimes", rid, "native", LIBRARY + ".so" - ) - self.tempdir = os.path.join(version.tempdir, rid) - self.tempfile = os.path.join(self.tempdir, "libsodium.so") - self.docker_image = docker_image - self.recipe = rid - - def make(self, f): - recipe = self.recipe - while not os.path.exists(os.path.join("recipes", recipe)): - m = re.fullmatch(r"([^.-]+)((([.][^.-]+)*)[.][^.-]+)?([-].*)?", recipe) - if m.group(5) is None: - recipe = "build" - break - elif m.group(2) is None: - recipe = m.group(1) - else: - recipe = m.group(1) + m.group(3) + m.group(5) - - f.write("\n") - f.write("{0}: {1}\n".format(self.packfile, self.tempfile)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write("\tcp -f $< $@\n") - f.write("\n") - f.write("{0}: {1}\n".format(self.tempfile, self.cachefile)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write( - "\t{0} run --rm ".format(DOCKER) - + "-v $(abspath recipes):/io/recipes " - + "-v $(abspath $<):/io/libsodium.tar.gz " - + "-v $(abspath $(dir $@)):/io/output " - + "{0} sh -x -e /io/recipes/{1}\n".format(self.docker_image, recipe) - ) - - -class ExtraItem: - def __init__(self, version, filename): - self.url = "https://download.libsodium.org/libsodium/releases/libsodium-{0}.tar.gz".format( - version.libsodium_version - ) - self.cachefile = os.path.join(CACHEDIR, re.sub(r"[^A-Za-z0-9.]", "-", self.url)) - self.packfile = os.path.join(version.builddir, filename) - self.itemfile = "libsodium-{0}/{1}".format(version.libsodium_version, filename) - self.tempdir = os.path.join(version.tempdir, "extras") - self.tempfile = os.path.join(self.tempdir, os.path.normpath(self.itemfile)) - - def make(self, f): - f.write("\n") - f.write("{0}: {1}\n".format(self.packfile, self.tempfile)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write("\tcp -f $< $@\n") - f.write("\n") - f.write("{0}: {1}\n".format(self.tempfile, self.cachefile)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write( - "\tcd {0} && tar xzmf {1} '{2}'\n".format( - self.tempdir, - os.path.relpath(self.cachefile, self.tempdir), - self.itemfile, - ) - ) - - -def main(args): - m = ( - re.fullmatch(r"((\d+\.\d+\.\d+)(\.\d+)?)(?:-(\w+(?:[_.-]\w+)*))?", args[1]) - if len(args) == 2 - else None - ) - - if m is None: - print("Usage:") - print(" python3 prepare.py ") - print() - print("Examples:") - print(" python3 prepare.py 1.0.18-preview-01") - print(" python3 prepare.py 1.0.18-preview-02") - print(" python3 prepare.py 1.0.18-preview-03") - print(" python3 prepare.py 1.0.18") - print(" python3 prepare.py 1.0.18.1-preview-01") - print(" python3 prepare.py 1.0.18.1") - print(" python3 prepare.py 1.0.18.2") - return 1 - - version = Version(m.group(2), m.group(0)) - - items = ( - [WindowsItem(version, rid, platform) for (rid, platform) in WINDOWS] - + [MacOSItem(version, rid, codename) for (rid, codename) in MACOS] - + [LinuxItem(version, rid, docker_image) for (rid, docker_image) in LINUX] - + [ExtraItem(version, filename) for filename in EXTRAS] - ) - - downloads = {item.cachefile: item.url for item in items} - - with open(MAKEFILE, "w") as f: - f.write("all: {0}\n".format(version.pkgfile)) - - for download in sorted(downloads): - f.write("\n") - f.write("{0}:\n".format(download)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write("\tcurl -f#Lo $@ '{0}'\n".format(downloads[download])) - - for item in items: - item.make(f) - - f.write("\n") - f.write("{0}: {1}\n".format(version.propsfile, PROPSFILE)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write("\tcp -f $< $@\n") - - f.write("\n") - f.write("{0}: {1}\n".format(version.projfile, version.propsfile)) - f.write("\t@mkdir -p $(dir $@)\n") - f.write( - "\techo '" - + '' - + ''.format( - os.path.relpath(version.propsfile, os.path.dirname(version.projfile)) - ) - + "" - + "{0}".format(version.package_version) - + "" - + "' > $@\n" - ) - - f.write("\n") - f.write("{0}:".format(version.pkgfile)) - f.write(" \\\n\t\t{0}".format(version.projfile)) - f.write(" \\\n\t\t{0}".format(version.propsfile)) - for item in items: - f.write(" \\\n\t\t{0}".format(item.packfile)) - f.write("\n") - f.write("\t@mkdir -p $(dir $@)\n") - f.write( - "\t{0} run --rm ".format(DOCKER) - + "-v $(abspath recipes):/io/recipes " - + "-v $(abspath $(dir $<)):/io/input " - + "-v $(abspath $(dir $@)):/io/output " - + "{0} sh -x -e /io/recipes/{1} {2}\n".format( - "microsoft/dotnet:2.0-sdk", - "pack", - os.path.relpath(version.projfile, version.builddir), - ) - ) - - f.write("\n") - f.write("test: {0}\n".format(version.pkgfile)) - f.write( - "\t{0} run --rm ".format(DOCKER) - + "-v $(abspath recipes):/io/recipes " - + "-v $(abspath $(dir $<)):/io/packages " - + '{0} sh -x -e /io/recipes/{1} "{2}"\n'.format( - "microsoft/dotnet:2.0-sdk", "test", version.package_version - ) - ) - - print( - "prepared", - MAKEFILE, - "to make", - version.pkgfile, - "for libsodium", - version.libsodium_version, - ) - return 0 - - -if __name__ == "__main__": - sys.exit(main(sys.argv)) - diff --git a/packaging/dotnet-core/recipes/alpine-x64 b/packaging/dotnet-core/recipes/alpine-x64 deleted file mode 100644 index c0eb4186..00000000 --- a/packaging/dotnet-core/recipes/alpine-x64 +++ /dev/null @@ -1,3 +0,0 @@ -apk add --update alpine-sdk - -. $(dirname $0)/build diff --git a/packaging/dotnet-core/recipes/build b/packaging/dotnet-core/recipes/build deleted file mode 100644 index a5ffe270..00000000 --- a/packaging/dotnet-core/recipes/build +++ /dev/null @@ -1,9 +0,0 @@ -cd ~ -tar xzf /io/libsodium.tar.gz -cd libsodium-* -./configure -make -make check -make install -strip --strip-all /usr/local/lib/libsodium.so -cp /usr/local/lib/libsodium.so /io/output diff --git a/packaging/dotnet-core/recipes/centos-x64 b/packaging/dotnet-core/recipes/centos-x64 deleted file mode 100644 index 04db18b2..00000000 --- a/packaging/dotnet-core/recipes/centos-x64 +++ /dev/null @@ -1,3 +0,0 @@ -yum install -y binutils gcc make tar - -. $(dirname $0)/build diff --git a/packaging/dotnet-core/recipes/debian-x64 b/packaging/dotnet-core/recipes/debian-x64 deleted file mode 100644 index e22c9efc..00000000 --- a/packaging/dotnet-core/recipes/debian-x64 +++ /dev/null @@ -1,4 +0,0 @@ -apt-get update -apt-get install -y --no-install-recommends build-essential - -. $(dirname $0)/build diff --git a/packaging/dotnet-core/recipes/fedora-x64 b/packaging/dotnet-core/recipes/fedora-x64 deleted file mode 100644 index aebdb40a..00000000 --- a/packaging/dotnet-core/recipes/fedora-x64 +++ /dev/null @@ -1,3 +0,0 @@ -dnf install -y binutils gcc make tar - -. $(dirname $0)/build diff --git a/packaging/dotnet-core/recipes/linux-x64 b/packaging/dotnet-core/recipes/linux-x64 deleted file mode 100644 index e22c9efc..00000000 --- a/packaging/dotnet-core/recipes/linux-x64 +++ /dev/null @@ -1,4 +0,0 @@ -apt-get update -apt-get install -y --no-install-recommends build-essential - -. $(dirname $0)/build diff --git a/packaging/dotnet-core/recipes/opensuse-x64 b/packaging/dotnet-core/recipes/opensuse-x64 deleted file mode 100644 index 13cfee47..00000000 --- a/packaging/dotnet-core/recipes/opensuse-x64 +++ /dev/null @@ -1,3 +0,0 @@ -zypper install -y --no-recommends -n binutils gcc make tar - -. $(dirname $0)/build diff --git a/packaging/dotnet-core/recipes/pack b/packaging/dotnet-core/recipes/pack deleted file mode 100644 index f2936c2e..00000000 --- a/packaging/dotnet-core/recipes/pack +++ /dev/null @@ -1,5 +0,0 @@ -cp -r /io/input ~/build -cd ~/build -dotnet restore $1 -dotnet pack $1 -cp *.nupkg /io/output diff --git a/packaging/dotnet-core/recipes/test b/packaging/dotnet-core/recipes/test deleted file mode 100644 index 5022fa39..00000000 --- a/packaging/dotnet-core/recipes/test +++ /dev/null @@ -1,27 +0,0 @@ -TEST_PROGRAM='using System; -using System.Runtime.InteropServices; - -static class Program -{ - [DllImport("libsodium")] - static extern int sodium_init(); - - static int Main() - { - int error = sodium_init(); - Console.WriteLine(error == 0 - ? "ok" - : "error: sodium_init() returned {0}", error); - return error == 0 ? 0 : 1; - } -} -' - -dotnet --info -cd ~ -dotnet new console --name Test -cd Test -echo "$TEST_PROGRAM" > Program.cs -dotnet add package libsodium --version $1 --source /io/packages -dotnet restore -dotnet run diff --git a/packaging/dotnet-core/recipes/ubuntu-x64 b/packaging/dotnet-core/recipes/ubuntu-x64 deleted file mode 100644 index e22c9efc..00000000 --- a/packaging/dotnet-core/recipes/ubuntu-x64 +++ /dev/null @@ -1,4 +0,0 @@ -apt-get update -apt-get install -y --no-install-recommends build-essential - -. $(dirname $0)/build