Build dotnet core x64 binaries in Ubuntu 16.04

...to provide support for CentOS 7 and Debian 9

Contributed by @enclave-alistair

Fixes #1099
This commit is contained in:
Frank Denis 2022-02-27 11:39:46 +01:00
parent 0e88616f87
commit 32cba2b5e9
3 changed files with 45 additions and 19 deletions

View File

@ -12,22 +12,22 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: buildbase.bat
run: buildbase.bat ..\vs2019\libsodium.sln 16
run: buildbase.bat ..\vs2022\libsodium.sln 17
working-directory: builds/msvc/build/
shell: cmd
- uses: actions/upload-artifact@v2
with:
name: build-win-x64
path: bin/x64/Release/v142/dynamic/libsodium.dll
path: bin/x64/Release/v143/dynamic/libsodium.dll
- uses: actions/upload-artifact@v2
with:
name: build-win-x86
path: bin/Win32/Release/v142/dynamic/libsodium.dll
path: bin/Win32/Release/v143/dynamic/libsodium.dll
build-linux-glibc:
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
image: ubuntu:16.04
steps:
- name: Set up build environment
run: |
@ -50,26 +50,28 @@ jobs:
build-linux-glibc-arm64:
runs-on: ubuntu-latest
container:
image: ubuntu:16.04
steps:
- name: Set up build environment
run: |
export DEBIAN_FRONTEND=noninteractive
cat <<-EOF | sudo tee /etc/apt/sources.list.d/arm64.list >/dev/null
deb [arch=arm64] http://ports.ubuntu.com/ focal main restricted
deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main restricted
deb [arch=arm64] http://ports.ubuntu.com/ focal universe
deb [arch=arm64] http://ports.ubuntu.com/ focal-updates universe
deb [arch=arm64] http://ports.ubuntu.com/ focal multiverse
deb [arch=arm64] http://ports.ubuntu.com/ focal-updates multiverse
deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse
cat <<-EOF | tee /etc/apt/sources.list.d/arm64.list >/dev/null
deb [arch=arm64] http://ports.ubuntu.com/ xenial main restricted
deb [arch=arm64] http://ports.ubuntu.com/ xenial-updates main restricted
deb [arch=arm64] http://ports.ubuntu.com/ xenial universe
deb [arch=arm64] http://ports.ubuntu.com/ xenial-updates universe
deb [arch=arm64] http://ports.ubuntu.com/ xenial multiverse
deb [arch=arm64] http://ports.ubuntu.com/ xenial-updates multiverse
deb [arch=arm64] http://ports.ubuntu.com/ xenial-backports main restricted universe multiverse
EOF
sudo sed -i 's/deb h/deb [arch=amd64] h/g' /etc/apt/sources.list
sed -i 's/deb h/deb [arch=amd64] h/g' /etc/apt/sources.list
sudo dpkg --add-architecture arm64
dpkg --add-architecture arm64
sudo apt-get update && sudo apt-get install -y build-essential qemu-user qemu-user-static gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libstdc++6:arm64
apt-get update && apt-get install -y build-essential qemu-user qemu-user-static gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libstdc++6:arm64
- uses: actions/checkout@v1
- name: configure
@ -78,6 +80,8 @@ jobs:
run: make -j $(nproc)
- name: make check
# Disable make check on this platform
if: ${{ false }}
run: |
make check
@ -137,7 +141,7 @@ jobs:
build-linux-musl:
runs-on: ubuntu-latest
container:
image: alpine:3.13
image: alpine:3.15
steps:
- name: Set up build environment
run: |
@ -292,7 +296,29 @@ jobs:
name: test-builds
path: .libsodium-builds/*
run-test-binaries:
run-test-binaries-os-versions:
runs-on: ubuntu-latest
needs:
- build-test-binaries
strategy:
matrix:
# CentOS 7 and Debian 9 use an older GCC version; make sure we can run on those platforms.
arch: [ 'centos:7', 'debian:9' ]
container:
image: ${{ matrix.arch }}
env:
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
steps:
- uses: actions/download-artifact@v2
with:
name: test-builds
path: .libsodium-builds/
- name: Run x64 tests
run: |
chmod +x .libsodium-builds/linux-x64/Tests
.libsodium-builds/linux-x64/Tests
run-test-binaries-cross-plat:
runs-on: ubuntu-20.04
needs:
- build-test-binaries

View File

@ -9,7 +9,7 @@
<PropertyGroup>
<PackageId>libsodium</PackageId>
<Version>1.0.18.1</Version>
<Version>1.0.18.2</Version>
<Authors>Frank Denis</Authors>
<Description>Internal implementation package not meant for direct consumption. Please do not reference directly.</Description>
<Copyright>&#169; $([System.DateTime]::UtcNow.ToString(yyyy)) Frank Denis</Copyright>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- These values are populated into the package.gsl templates by package.bat. -->
<!-- The target attribute controls path and file name only, id controls package naming. -->
<package id="libsodium_vc120" target="libsodium" version = "1.0.18.1" pathversion="1_0_18_1" platformtoolset="v120" />
<package id="libsodium_vc120" target="libsodium" version = "1.0.18.2" pathversion="1_0_18_2" platformtoolset="v120" />