Skip to content

Version v0.4.7

Version v0.4.7 #63

Workflow file for this run

name: Unix Test
on:
push:
branches: [ master ]
paths:
- 'src/**.csproj'
- 'src/**.cs'
- 'src/**.so'
- 'src/**.dylib'
- '.github/workflows/unix-test.yml'
jobs:
ubuntu-test:
runs-on: ${{ matrix.target.runs-on }}
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
strategy:
matrix:
target:
- name: ubuntu20
runs-on: 'ubuntu-20.04'
shell: bash -e
rid: linux-x64
- name: ubuntu22
runs-on: 'ubuntu-22.04'
shell: bash -e
rid: linux-x64
- name: alpine
runs-on: 'ubuntu-latest'
shell: alpine.sh --root
rid: linux-musl-x64
- name: osx
runs-on: 'macos-13'
shell: bash -e
rid: osx-x64
steps:
- uses: actions/checkout@v2
- name: Setup Shell
run: |
echo "#!/bin/sh
${{matrix.target.shell}} \"\$@\"" > shell.sh
cat shell.sh
chmod +x shell.sh
echo "$PWD" >> $GITHUB_PATH
- name: Setup Alpine OS
if: startsWith(matrix.target.name,'alpine')
uses: jirutka/setup-alpine@v1
id: alpine-target
with:
arch: x86_64
branch: v3.18
packages: >
sudo
bash
icu-libs
krb5-libs
libgcc
libintl
libssl1.1
libstdc++
zlib
grpc-plugins
shell-name: alpine.sh
- name: Caching
uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ matrix.target.name }}-${{ hashFiles('**/*.csproj') }} #hash of project files
restore-keys: |
${{ matrix.target.name }}-
- name: Setup Dotnet
run: |
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh --channel 3.1 --install-dir ~/.dotnet
./dotnet-install.sh --channel 5.0 --install-dir ~/.dotnet
./dotnet-install.sh --channel 6.0 --install-dir ~/.dotnet
./dotnet-install.sh --channel 7.0 --install-dir ~/.dotnet
./dotnet-install.sh --channel 8.0 --install-dir ~/.dotnet
echo "DOTNET_ROOT=~/.dotnet" >> $GITHUB_ENV
echo "$DOTNET_ROOT" >> $GITHUB_PATH
echo "$DOTNET_ROOT/tools" >> $GITHUB_PATH
shell: shell.sh {0}
- name: GrpcTool Fix on Alpine
if: startsWith(matrix.target.name,'alpine')
run: |
# grpc protoc wants glibc on Alpine builds. so we build at ubuntu instead. https://github.com/grpc/grpc/issues/18428#issuecomment-535041155
# wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
# wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-2.35-r1.apk
# apk add glibc-2.35-r1.apk
# https://github.com/grpc/grpc/issues/24188
echo 'PROTOBUF_PROTOC=/usr/bin/protoc' >> $GITHUB_ENV
echo 'GRPC_PROTOC_PLUGIN=/usr/bin/grpc_csharp_plugin' >> $GITHUB_ENV
shell: shell.sh {0}
# - name: Setup .NET Sdk
# if: startsWith(matrix.target.name,'alpine') == 'false'
# uses: actions/setup-dotnet@v3
# with:
# dotnet-version: |
# 3.1.x
# 5.x
# 6.x
# 7.x
# 8.x
- name: List SDKs
run: ~/.dotnet/dotnet --list-sdks
shell: shell.sh {0}
- name: Test .NET 8
run: ~/.dotnet/dotnet test -v quiet -f net8.0 -r ${{ matrix.target.rid }} --logger "console;verbosity=detailed" --nologo /nologo
shell: shell.sh {0}
- name: Test .NET 7
run: ~/.dotnet/dotnet test -v quiet -f net7.0 -r ${{ matrix.target.rid }} --logger "console;verbosity=detailed" --nologo /nologo
shell: shell.sh {0}
- name: Test .NET 6
run: ~/.dotnet/dotnet test -v quiet -f net6.0 -r ${{ matrix.target.rid }} --logger "console;verbosity=detailed" --nologo /nologo
shell: shell.sh {0}
- name: Test .NET 5
run: ~/.dotnet/dotnet test -v quiet -f net5.0 -r ${{ matrix.target.rid }} --logger "console;verbosity=detailed" --nologo /nologo
shell: shell.sh {0}
- name: Test .NET Core 3.1
run: ~/.dotnet/dotnet test -v quiet -f netcoreapp3.1 -r ${{ matrix.target.rid }} --logger "console;verbosity=detailed" --nologo /nologo
shell: shell.sh {0}