2020-11-04 09:03:28 -07:00
|
|
|
name: .NET Package
|
2019-12-29 12:38:01 -07:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2019-12-30 06:53:04 -07:00
|
|
|
branches:
|
2021-11-10 07:59:50 -07:00
|
|
|
- stable
|
|
|
|
- next
|
2019-12-29 12:38:01 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: buildbase.bat
|
2022-02-27 03:39:46 -07:00
|
|
|
run: buildbase.bat ..\vs2022\libsodium.sln 17
|
2021-11-10 07:59:50 -07:00
|
|
|
working-directory: builds/msvc/build/
|
|
|
|
shell: cmd
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-win-x64
|
2022-02-27 03:39:46 -07:00
|
|
|
path: bin/x64/Release/v143/dynamic/libsodium.dll
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-win-x86
|
2022-02-27 03:39:46 -07:00
|
|
|
path: bin/Win32/Release/v143/dynamic/libsodium.dll
|
2021-05-26 07:11:25 -07:00
|
|
|
|
2019-12-29 12:38:01 -07:00
|
|
|
build-linux-glibc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
2022-11-23 11:42:39 -07:00
|
|
|
image: ubuntu:18.04
|
2019-12-29 12:38:01 -07:00
|
|
|
steps:
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: Set up build environment
|
|
|
|
run: |
|
|
|
|
apt-get update && apt-get install -y build-essential
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: configure
|
2021-11-11 04:30:10 -07:00
|
|
|
run: ./configure --disable-dependency-tracking --prefix=$PWD/.libsodium-build
|
2021-11-10 07:59:50 -07:00
|
|
|
- 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
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-linux-x64
|
|
|
|
path: .libsodium-build/lib/libsodium.so
|
2021-05-25 10:25:23 -07:00
|
|
|
|
|
|
|
build-linux-glibc-arm64:
|
2021-05-26 07:23:00 -07:00
|
|
|
runs-on: ubuntu-latest
|
2022-02-27 03:39:46 -07:00
|
|
|
container:
|
2022-11-23 11:42:39 -07:00
|
|
|
image: ubuntu:18.04
|
2021-05-25 10:25:23 -07:00
|
|
|
steps:
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: Set up build environment
|
|
|
|
run: |
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2022-02-27 03:39:46 -07:00
|
|
|
cat <<-EOF | tee /etc/apt/sources.list.d/arm64.list >/dev/null
|
2022-11-23 11:56:12 -07:00
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ bionic main restricted
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ bionic-updates main restricted
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ bionic universe
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ bionic-updates universe
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ bionic multiverse
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ bionic-updates multiverse
|
2021-11-10 07:59:50 -07:00
|
|
|
EOF
|
|
|
|
|
2022-02-27 03:39:46 -07:00
|
|
|
sed -i 's/deb h/deb [arch=amd64] h/g' /etc/apt/sources.list
|
2021-11-10 07:59:50 -07:00
|
|
|
|
2022-02-27 03:39:46 -07:00
|
|
|
dpkg --add-architecture arm64
|
2021-11-10 07:59:50 -07:00
|
|
|
|
2022-02-27 03:39:46 -07:00
|
|
|
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
|
2021-11-10 07:59:50 -07:00
|
|
|
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: configure
|
2021-11-11 04:30:10 -07:00
|
|
|
run: ./configure --disable-dependency-tracking --prefix=$PWD/.libsodium-build --host=aarch64-linux-gnu
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: make
|
|
|
|
run: make -j $(nproc)
|
|
|
|
|
|
|
|
- name: make check
|
2022-02-27 03:39:46 -07:00
|
|
|
# Disable make check on this platform
|
|
|
|
if: ${{ false }}
|
2021-11-10 07:59:50 -07:00
|
|
|
run: |
|
|
|
|
make check
|
|
|
|
|
|
|
|
- name: make install
|
|
|
|
run: make install
|
|
|
|
|
|
|
|
- name: strip
|
|
|
|
run: aarch64-linux-gnu-strip --strip-all .libsodium-build/lib/libsodium.so
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-linux-arm64
|
|
|
|
path: .libsodium-build/lib/libsodium.so
|
2021-05-26 07:11:25 -07:00
|
|
|
|
2021-05-26 10:58:54 -07:00
|
|
|
build-linux-glibc-arm:
|
2022-11-23 11:56:12 -07:00
|
|
|
runs-on: ubuntu-18.04
|
2021-05-26 10:58:54 -07:00
|
|
|
steps:
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: Set up build environment
|
|
|
|
run: |
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
cat <<-EOF | sudo tee /etc/apt/sources.list.d/armhf.list >/dev/null
|
2022-11-23 11:56:12 -07:00
|
|
|
deb [arch=armhf] http://ports.ubuntu.com/ bionic main restricted
|
|
|
|
deb [arch=armhf] http://ports.ubuntu.com/ bionic-updates main restricted
|
|
|
|
deb [arch=armhf] http://ports.ubuntu.com/ bionic universe
|
|
|
|
deb [arch=armhf] http://ports.ubuntu.com/ bionic-updates universe
|
|
|
|
deb [arch=armhf] http://ports.ubuntu.com/ bionic multiverse
|
|
|
|
deb [arch=armhf] http://ports.ubuntu.com/ bionic-updates multiverse
|
2021-11-10 07:59:50 -07:00
|
|
|
EOF
|
|
|
|
|
|
|
|
sudo sed -i 's/deb h/deb [arch=amd64] h/g' /etc/apt/sources.list
|
|
|
|
|
|
|
|
sudo dpkg --add-architecture armhf
|
|
|
|
|
|
|
|
sudo apt-get update && sudo apt-get install -y build-essential qemu-user qemu-user-static gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libstdc++6:armhf
|
|
|
|
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: configure
|
2021-11-11 04:30:10 -07:00
|
|
|
run: ./configure --disable-dependency-tracking --prefix=$PWD/.libsodium-build --host=arm-linux-gnueabihf
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: make
|
|
|
|
run: make -j $(nproc)
|
|
|
|
|
|
|
|
- name: make check
|
|
|
|
run: |
|
|
|
|
make check
|
|
|
|
|
|
|
|
- name: make install
|
|
|
|
run: make install
|
|
|
|
|
|
|
|
- name: strip
|
|
|
|
run: arm-linux-gnueabihf-strip --strip-all .libsodium-build/lib/libsodium.so
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-linux-arm
|
|
|
|
path: .libsodium-build/lib/libsodium.so
|
2021-05-26 10:58:54 -07:00
|
|
|
|
2019-12-29 12:38:01 -07:00
|
|
|
build-linux-musl:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
2022-11-23 11:42:39 -07:00
|
|
|
image: alpine:3.17
|
2019-12-29 12:38:01 -07:00
|
|
|
steps:
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: Set up build environment
|
|
|
|
run: |
|
|
|
|
apk update
|
|
|
|
apk add alpine-sdk ca-certificates
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: configure
|
2021-11-11 04:30:10 -07:00
|
|
|
run: ./configure --disable-dependency-tracking --prefix=$PWD/.libsodium-build
|
2021-11-10 07:59:50 -07:00
|
|
|
- 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
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-linux-musl-x64
|
|
|
|
path: .libsodium-build/lib/libsodium.so
|
2021-05-26 07:11:25 -07:00
|
|
|
|
2022-08-15 07:46:14 -07:00
|
|
|
build-linux-musl-arm64:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
2022-11-23 11:42:39 -07:00
|
|
|
image: alpine:3.17
|
2022-08-15 07:46:14 -07:00
|
|
|
steps:
|
|
|
|
- name: Set up build environment
|
|
|
|
run: |
|
|
|
|
apk update
|
|
|
|
apk add alpine-sdk ca-certificates
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-15 07:46:14 -07:00
|
|
|
- name: configure
|
|
|
|
run: ./configure --disable-dependency-tracking --prefix=$PWD/.libsodium-build --host=aarch64-linux-gnu
|
|
|
|
- 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
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2022-08-15 07:46:14 -07:00
|
|
|
with:
|
|
|
|
name: build-linux-musl-arm64
|
|
|
|
path: .libsodium-build/lib/libsodium.so
|
|
|
|
|
2021-11-11 04:30:10 -07:00
|
|
|
build-macos-x64:
|
|
|
|
runs-on: macos-11
|
2019-12-29 12:38:01 -07:00
|
|
|
steps:
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: configure
|
2022-11-23 11:56:12 -07:00
|
|
|
run: env CFLAGS="-Ofast -arch x86_64 -mmacosx-version-min=10.10" LDFLAGS="-arch x86_64 -mmacosx-version-min=10.10" ./configure --host=arm-apple-darwin20 --prefix=$PWD/.libsodium-build
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: make check
|
|
|
|
run: make check
|
|
|
|
- name: make install
|
|
|
|
run: make install
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-osx-x64
|
|
|
|
path: .libsodium-build/lib/libsodium.dylib
|
2019-12-30 05:26:57 -07:00
|
|
|
|
2021-11-11 04:30:10 -07:00
|
|
|
build-macos-arm64:
|
|
|
|
runs-on: macos-11
|
|
|
|
steps:
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-11 04:30:10 -07:00
|
|
|
- name: configure
|
2022-11-23 11:56:12 -07:00
|
|
|
run: env CFLAGS="-Ofast -arch arm64 -mmacosx-version-min=10.10" LDFLAGS="-arch arm64 -mmacosx-version-min=10.10" ./configure --host=arm-apple-darwin20 --prefix=$PWD/.libsodium-build
|
2021-11-11 04:30:10 -07:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: make install
|
|
|
|
run: make install
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-11 04:30:10 -07:00
|
|
|
with:
|
|
|
|
name: build-osx-arm64
|
|
|
|
path: .libsodium-build/lib/libsodium.dylib
|
|
|
|
|
2019-12-29 12:38:01 -07:00
|
|
|
pack:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs:
|
2021-11-10 07:59:50 -07:00
|
|
|
- build-windows
|
|
|
|
- build-linux-glibc
|
|
|
|
- build-linux-glibc-arm
|
|
|
|
- build-linux-glibc-arm64
|
|
|
|
- build-linux-musl
|
2022-08-15 07:46:14 -07:00
|
|
|
- build-linux-musl-arm64
|
2021-11-11 04:30:10 -07:00
|
|
|
- build-macos-x64
|
|
|
|
- build-macos-arm64
|
2020-11-04 09:03:28 -07:00
|
|
|
container:
|
2022-04-30 12:46:56 -07:00
|
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0
|
2020-11-04 09:03:28 -07:00
|
|
|
env:
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
|
|
|
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
2019-12-29 12:38:01 -07:00
|
|
|
steps:
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/download-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-win-x64
|
|
|
|
path: .libsodium-pack/runtimes/win-x64/native/
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/download-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-win-x86
|
|
|
|
path: .libsodium-pack/runtimes/win-x86/native/
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/download-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-linux-x64
|
|
|
|
path: .libsodium-pack/runtimes/linux-x64/native/
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/download-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-linux-arm64
|
|
|
|
path: .libsodium-pack/runtimes/linux-arm64/native/
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/download-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-linux-arm
|
|
|
|
path: .libsodium-pack/runtimes/linux-arm/native/
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/download-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-linux-musl-x64
|
|
|
|
path: .libsodium-pack/runtimes/linux-musl-x64/native/
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/download-artifact@v3
|
2022-08-15 07:46:14 -07:00
|
|
|
with:
|
|
|
|
name: build-linux-musl-arm64
|
|
|
|
path: .libsodium-pack/runtimes/linux-musl-arm64/native/
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/download-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: build-osx-x64
|
|
|
|
path: .libsodium-pack/runtimes/osx-x64/native/
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/download-artifact@v3
|
2021-11-11 04:30:10 -07:00
|
|
|
with:
|
|
|
|
name: build-osx-arm64
|
|
|
|
path: .libsodium-pack/runtimes/osx-arm64/native/
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: Copy files
|
|
|
|
run: cp AUTHORS ChangeLog LICENSE packaging/dotnet-core/libsodium.pkgproj .libsodium-pack/
|
|
|
|
- name: Create NuGet package
|
|
|
|
run: dotnet pack -c Release .libsodium-pack/libsodium.pkgproj
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: nuget-package
|
|
|
|
path: .libsodium-pack/bin/Release/*.nupkg
|
2019-12-30 05:26:57 -07:00
|
|
|
|
2021-06-01 08:58:01 -07:00
|
|
|
build-test-binaries:
|
2019-12-30 05:26:57 -07:00
|
|
|
runs-on: ubuntu-latest
|
2021-05-26 07:11:25 -07:00
|
|
|
needs:
|
2021-11-10 07:59:50 -07:00
|
|
|
- pack
|
2019-12-30 05:26:57 -07:00
|
|
|
container:
|
2022-04-30 12:46:56 -07:00
|
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0
|
2019-12-30 05:26:57 -07:00
|
|
|
env:
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
|
|
|
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
|
|
|
steps:
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/download-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
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 publish linux-x64
|
|
|
|
run: dotnet publish -c Release -r linux-x64 --self-contained true -p:PublishTrimmed=true
|
|
|
|
working-directory: .libsodium-test/
|
|
|
|
- name: dotnet publish linux-arm
|
|
|
|
run: dotnet publish -c Release -r linux-arm --self-contained true -p:PublishTrimmed=true
|
|
|
|
working-directory: .libsodium-test/
|
|
|
|
- name: dotnet publish linux-arm64
|
|
|
|
run: dotnet publish -c Release -r linux-arm64 --self-contained true -p:PublishTrimmed=true
|
|
|
|
working-directory: .libsodium-test/
|
|
|
|
- name: Move Build Output
|
|
|
|
run: |
|
|
|
|
mkdir .libsodium-builds
|
2022-04-30 12:46:56 -07:00
|
|
|
mv .libsodium-test/bin/Release/net6.0/linux-arm/publish .libsodium-builds/linux-arm
|
|
|
|
mv .libsodium-test/bin/Release/net6.0/linux-arm64/publish .libsodium-builds/linux-arm64
|
|
|
|
mv .libsodium-test/bin/Release/net6.0/linux-x64/publish .libsodium-builds/linux-x64
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: test-builds
|
|
|
|
path: .libsodium-builds/*
|
2021-06-01 08:58:01 -07:00
|
|
|
|
2022-02-27 03:39:46 -07:00
|
|
|
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:
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/download-artifact@v3
|
2022-02-27 03:39:46 -07:00
|
|
|
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:
|
2022-11-23 12:05:50 -07:00
|
|
|
runs-on: ubuntu-22.04
|
2021-06-01 08:58:01 -07:00
|
|
|
needs:
|
2021-11-10 07:59:50 -07:00
|
|
|
- build-test-binaries
|
2021-06-01 08:58:01 -07:00
|
|
|
env:
|
|
|
|
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [x64, arm, arm64]
|
|
|
|
steps:
|
2021-11-10 07:59:50 -07:00
|
|
|
- name: Set up build environment
|
|
|
|
run: |
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2022-08-15 07:46:14 -07:00
|
|
|
# On virtualization systems such as the one used by WSL2, the ARM crypto extensions
|
2022-11-23 12:05:50 -07:00
|
|
|
# don't work as expected. As a result, installing on Ubuntu fails during integrity
|
2022-08-15 07:46:14 -07:00
|
|
|
# checks. As a workaround, the following command disables hardware acceleration for
|
|
|
|
# gcrypt, which the apt-get command relies on.
|
|
|
|
mkdir -p /etc/gcrypt && echo all >> /etc/gcrypt/hwf.deny
|
|
|
|
|
2021-11-10 07:59:50 -07:00
|
|
|
cat <<-EOF | sudo tee /etc/apt/sources.list.d/multiarch.list >/dev/null
|
2022-11-23 12:05:50 -07:00
|
|
|
deb [arch=armhf,arm64] http://ports.ubuntu.com/ jammy main restricted
|
|
|
|
deb [arch=armhf,arm64] http://ports.ubuntu.com/ jammy-updates main restricted
|
|
|
|
deb [arch=armhf,arm64] http://ports.ubuntu.com/ jammy universe
|
|
|
|
deb [arch=armhf,arm64] http://ports.ubuntu.com/ jammy-updates universe
|
|
|
|
deb [arch=armhf,arm64] http://ports.ubuntu.com/ jammy multiverse
|
|
|
|
deb [arch=armhf,arm64] http://ports.ubuntu.com/ jammy-updates multiverse
|
2021-11-10 07:59:50 -07:00
|
|
|
EOF
|
|
|
|
|
|
|
|
sudo sed -i 's/deb h/deb [arch=amd64] h/g' /etc/apt/sources.list
|
|
|
|
|
|
|
|
sudo dpkg --add-architecture armhf
|
|
|
|
sudo dpkg --add-architecture arm64
|
|
|
|
|
|
|
|
sudo apt-get update && sudo apt-get install -y qemu-user qemu-user-static libstdc++6:armhf libstdc++6:arm64
|
|
|
|
|
2022-11-23 11:42:39 -07:00
|
|
|
- uses: actions/download-artifact@v3
|
2021-11-10 07:59:50 -07:00
|
|
|
with:
|
|
|
|
name: test-builds
|
|
|
|
path: .libsodium-builds/
|
|
|
|
|
|
|
|
- name: Run ${{ matrix.arch }}
|
|
|
|
run: |
|
|
|
|
chmod +x .libsodium-builds/linux-${{ matrix.arch }}/Tests
|
|
|
|
.libsodium-builds/linux-${{ matrix.arch }}/Tests
|