-
Notifications
You must be signed in to change notification settings - Fork 10
177 lines (148 loc) · 5.42 KB
/
ci.yml
File metadata and controls
177 lines (148 loc) · 5.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
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
- quay.io/centos/centos:stream9
- quay.io/centos/centos:stream10
- registry.fedoraproject.org/fedora:43
- registry.fedoraproject.org/fedora:44
- registry.fedoraproject.org/fedora:rawhide
- registry.access.redhat.com/ubi8
- registry.access.redhat.com/ubi9
- registry.access.redhat.com/ubi10
dotnet_version:
- "8.0"
- "9.0"
- "10.0"
container:
image: ${{ matrix.container_image }}
options: --security-opt seccomp=unconfined
steps:
- name: Install build dependencies
timeout-minutes: 5
run: |
set -euo pipefail
if grep fedora /etc/os-release; then
dnf install -y dotnet-sdk-${{ matrix.dotnet_version }} git make
dnf install -y \
dotnet-sdk-dbg-${{ matrix.dotnet_version }} \
dotnet-runtime-dbg-${{ matrix.dotnet_version }} \
aspnetcore-runtime-dbg-${{ matrix.dotnet_version }}
if [[ ${{ matrix.dotnet_version }} != 8.* ]]; then
dnf install -y dotnet-sdk-aot-${{ matrix.dotnet_version }}
fi
elif grep alpine /etc/os-release; then
apk add --no-cache bash dotnet-sdk-${{ matrix.dotnet_version }} git make
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
- quay.io/centos/centos:stream9
- quay.io/centos/centos:stream10
- registry.fedoraproject.org/fedora:42
- registry.fedoraproject.org/fedora:43
- registry.fedoraproject.org/fedora:rawhide
- registry.access.redhat.com/ubi8
- registry.access.redhat.com/ubi9
- registry.access.redhat.com/ubi10
dotnet_version:
- "8.0"
- "9.0"
- "10.0"
container:
image: ${{ matrix.container_image }}
options: --security-opt seccomp=unconfined
steps:
- name: Install build dependencies
timeout-minutes: 5
run: |
set -euo pipefail
if grep fedora /etc/os-release; then
dnf install -y dotnet-sdk-${{ matrix.dotnet_version }} git make
dnf install -y \
dotnet-sdk-dbg-${{ matrix.dotnet_version }} \
dotnet-runtime-dbg-${{ matrix.dotnet_version }} \
aspnetcore-runtime-dbg-${{ matrix.dotnet_version }}
if [[ ${{ matrix.dotnet_version }} != 8.* ]]; then
dnf install -y dotnet-sdk-aot-${{ matrix.dotnet_version }}
fi
elif grep alpine /etc/os-release; then
apk add --no-cache bash dotnet-sdk-${{ matrix.dotnet_version }} git make
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): ' dotnet-regular-tests/README.md | cut -d: -f2-) --skip-broken
elif grep alpine /etc/os-release; then
apk add python3 wget $(grep '^Dependencies(apk): ' dotnet-regular-tests/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
shell: bash
run: |
set -euo pipefail
trait_flags=()
if [[ ${{ matrix.container_image }} == *ubi8 ]] ; then
trait_flags+=( --trait ubi8-repos )
fi
if [[ ${{ matrix.container_image }} == *ubi9 ]] ; then
trait_flags+=( --trait ubi9-repos )
fi
if [[ ${{ matrix.container_image }} == *ubi10 ]] ; then
trait_flags+=( --trait ubi10-repos )
fi
dotnet --info
dotnet turkey/Turkey.dll dotnet-regular-tests -v --timeout 600 --trait github-ci "${trait_flags[@]}"
- name: Show Logs
if: ${{ always() }}
run: |
set -euo pipefail
cat cpuinfo meminfo os-release
cat uname
cat packages
find -iname '*.log' -exec echo {} \; -exec cat {} \;