Drop support for EOL .NET versions, remove obsolete tests #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
unit-test: | |
name: Verify unit tests pass | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
container_image: | |
- docker.io/library/alpine:latest | |
- docker.io/library/alpine:edge | |
- quay.io/centos/centos:stream9 | |
- registry.fedoraproject.org/fedora:38 | |
- registry.fedoraproject.org/fedora:39 | |
- registry.fedoraproject.org/fedora:40 | |
- registry.fedoraproject.org/fedora:rawhide | |
- registry.access.redhat.com/ubi8 | |
- registry.access.redhat.com/ubi9 | |
dotnet_version: | |
- "6.0" | |
- "8.0" | |
exclude: | |
- container_image: registry.fedoraproject.org/fedora:rawhide | |
dotnet_version: "6.0" | |
include: | |
- container_image: registry.fedoraproject.org/fedora:40 | |
dotnet_version: "9.0" | |
container: | |
image: ${{ matrix.container_image }} | |
options: --security-opt seccomp=unconfined | |
steps: | |
- name: Install build dependencies | |
timeout-minutes: 5 | |
run: | | |
set -euo pipefail | |
cat /etc/os-release | |
if grep fedora /etc/os-release; then | |
if [[ ${{ matrix.dotnet_version }} == 9.* ]]; then | |
dnf install 'dnf-command(copr)' -y | |
dnf copr enable @dotnet-sig/dotnet-preview -y | |
dnf install -y dotnet-sdk-aot-${{ matrix.dotnet_version }} | |
fi | |
dnf install -y dotnet-sdk-${{ matrix.dotnet_version }} git make | |
if [[ ! ${{ matrix.dotnet_version }} == *6* ]]; then | |
dnf install -y \ | |
dotnet-sdk-dbg-${{ matrix.dotnet_version }} \ | |
dotnet-runtime-dbg-${{ matrix.dotnet_version }} \ | |
aspnetcore-runtime-dbg-${{ matrix.dotnet_version }} | |
fi | |
elif grep alpine /etc/os-release; then | |
if grep edge /etc/os-release; then | |
echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | |
fi | |
apk add dotnet-sdk-${{ matrix.dotnet_version }} dotnet-doc git make | |
if [[ ! ${{ matrix.dotnet_version }} == *6* ]]; then | |
apk add \ | |
dotnet-sdk-dbg-${{ matrix.dotnet_version }} \ | |
dotnet-runtime-dbg-${{ matrix.dotnet_version }} \ | |
aspnetcore-runtime-dbg-${{ matrix.dotnet_version }} | |
fi | |
fi | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Sanity check | |
run: | | |
set -euo pipefail | |
PATH=$PATH:$HOME/.dotnet/ | |
git config --global safe.directory "$GITHUB_WORKSPACE" | |
make | |
mkdir -p no-reproducers | |
dotnet turkey/Turkey.dll no-reproducers | |
- name: Run tests | |
run: | | |
set -euo pipefail | |
PATH=$PATH:$HOME/.dotnet/ | |
make check | |
reproducers: | |
name: Verify reproducers work | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
container_image: | |
- docker.io/library/alpine:latest | |
- docker.io/library/alpine:edge | |
- quay.io/centos/centos:stream9 | |
- registry.fedoraproject.org/fedora:38 | |
- registry.fedoraproject.org/fedora:39 | |
- registry.fedoraproject.org/fedora:40 | |
- registry.fedoraproject.org/fedora:rawhide | |
- registry.access.redhat.com/ubi8 | |
- registry.access.redhat.com/ubi9 | |
dotnet_version: | |
- "6.0" | |
- "8.0" | |
exclude: | |
- container_image: registry.fedoraproject.org/fedora:rawhide | |
dotnet_version: "6.0" | |
include: | |
- container_image: registry.fedoraproject.org/fedora:40 | |
dotnet_version: "9.0" | |
container: | |
image: ${{ matrix.container_image }} | |
options: --security-opt seccomp=unconfined | |
steps: | |
- name: Install build dependencies | |
timeout-minutes: 5 | |
run: | | |
set -euo pipefail | |
cat /etc/os-release | |
if grep fedora /etc/os-release ; then | |
if [[ ${{ matrix.dotnet_version }} == 9.* ]]; then | |
dnf install 'dnf-command(copr)' -y | |
dnf copr enable @dotnet-sig/dotnet-preview -y | |
dnf install -y dotnet-sdk-aot-${{ matrix.dotnet_version }} | |
fi | |
dnf install -y dotnet-sdk-${{ matrix.dotnet_version }} git make | |
if [[ ! ${{ matrix.dotnet_version }} == *6* ]]; then | |
dnf install -y \ | |
dotnet-sdk-dbg-${{ matrix.dotnet_version }} \ | |
dotnet-runtime-dbg-${{ matrix.dotnet_version }} \ | |
aspnetcore-runtime-dbg-${{ matrix.dotnet_version }} | |
fi | |
elif grep alpine /etc/os-release; then | |
if grep edge /etc/os-release; then | |
echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | |
fi | |
apk add dotnet-sdk-${{ matrix.dotnet_version }} dotnet-doc | |
if [[ ! ${{ matrix.dotnet_version }} == *6* ]]; then | |
apk add \ | |
dotnet-sdk-dbg-${{ matrix.dotnet_version }} \ | |
dotnet-runtime-dbg-${{ matrix.dotnet_version }} \ | |
aspnetcore-runtime-dbg-${{ matrix.dotnet_version }} | |
fi | |
fi | |
# We need to fetch the tags, so 'git tag' in 'make publish' below works | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Build test runner | |
timeout-minutes: 2 | |
run: | | |
set -euo pipefail | |
git config --global --add safe.directory $(pwd) | |
make publish | |
- name: Get reproducers | |
run: | | |
set -euo pipefail | |
git clone https://github.com/redhat-developer/dotnet-regular-tests/ | |
- name: Install Test dependencies | |
timeout-minutes: 2 | |
run: | | |
if grep fedora /etc/os-release ; then | |
dnf install -y python3 wget $(grep '^Dependencies(dnf): ' README.md | cut -d: -f2-) --skip-broken | |
elif grep alpine /etc/os-release; then | |
apk add python3 wget curl $(grep '^Dependencies(apk): ' README.md | cut -d: -f2-) | |
echo -e '[PostgreSQL]\nDescription=PostgreSQL Unicode\nDriver=/usr/lib/psqlodbcw.so\nUsageCount=1' > /etc/odbcinst.ini | |
fi | |
- name: Run reproducers | |
run: | | |
set -euo pipefail | |
### HACK: Filter tests that can't pass in Containers | |
rm -r dotnet-regular-tests/debugging-sos-lldb* dotnet-regular-tests/createdump-aspnet dotnet-regular-tests/cgroup-limit | |
### HACK: UBI 8 is missing strace and bash-completion packages for these tests | |
if [[ ${{ matrix.container_image }} == *ubi* ]] ; then | |
rm -r dotnet-regular-tests/telemetry-is-off-by-default dotnet-regular-tests/bash-completion dotnet-regular-tests/system-data-odbc | |
fi | |
dotnet --info | |
dotnet turkey/Turkey.dll dotnet-regular-tests -v --timeout 600 | |
- name: Show Logs | |
if: ${{ always() }} | |
run: | | |
set -euo pipefail | |
find -iname '*.log' -exec echo {} \; -exec cat {} \; |