Skip to content

Commit 47d3103

Browse files
committed
Run a smoke test in GitHub Actions
Signed-off-by: Ilya Leoshkevich <[email protected]>
1 parent 91712c9 commit 47d3103

File tree

2 files changed

+99
-3
lines changed

2 files changed

+99
-3
lines changed

.github/workflows/dotnet.yml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,63 @@ jobs:
275275
# See https://github.com/actions/upload-artifact/issues/174 for details.
276276
dotnet-versions
277277
output/
278-
release:
278+
test:
279279
needs: installer
280280
runs-on: ubuntu-latest
281+
strategy:
282+
matrix:
283+
# TODO: aspnetcore build fails on x64 with:
284+
# EXEC : error : Failed to load assembly 'System.Private.CoreLib'
285+
arch: [ppc64le, s390x]
286+
isV6:
287+
- ${{ startsWith(github.ref, 'refs/tags/v6.') }}
288+
exclude:
289+
- arch: ppc64le
290+
isV6: true
291+
steps:
292+
- name: Install cross-ppc64le packages
293+
run: (echo "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs) main universe" &&
294+
echo "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-security main universe" &&
295+
echo "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-updates main universe" &&
296+
echo "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-backports main universe") |
297+
sudo tee /etc/apt/sources.list.d/ports.list >/dev/null &&
298+
sudo apt-get update &&
299+
sudo apt-get install -y
300+
libc6-ppc64el-cross
301+
libstdc++6-ppc64el-cross
302+
zlib1g:ppc64el
303+
if: ${{ matrix.arch == 'ppc64le' }}
304+
- name: Install cross-s390x packages
305+
run: (echo "deb [arch=s390x] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs) main universe" &&
306+
echo "deb [arch=s390x] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-security main universe" &&
307+
echo "deb [arch=s390x] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-updates main universe" &&
308+
echo "deb [arch=s390x] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-backports main universe") |
309+
sudo tee /etc/apt/sources.list.d/ports.list >/dev/null &&
310+
sudo apt-get update &&
311+
sudo apt-get install -y
312+
libc6-s390x-cross
313+
libstdc++6-s390x-cross
314+
zlib1g:s390x
315+
if: ${{ matrix.arch == 's390x' }}
316+
- name: Checkout
317+
uses: actions/checkout@v4
318+
- name: Download the ${{ matrix.arch }} installer artifacts
319+
uses: actions/download-artifact@v3 # Has to match upload-artifact
320+
with:
321+
name: installer-${{ matrix.arch }}
322+
- name: Configure emulation
323+
run: docker run --rm --privileged multiarch/qemu-user-static:7.2.0-1 --reset --persistent=yes
324+
- name: Run a ppc64le smoke test
325+
run: QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu
326+
./dotnet-test-sdk output/dotnet-sdk-*-linux-ppc64le.tar.gz
327+
if: ${{ matrix.arch == 'ppc64le' }}
328+
- name: Run a s390x smoke test
329+
run: QEMU_LD_PREFIX=/usr/s390x-linux-gnu
330+
./dotnet-test-sdk output/dotnet-sdk-*-linux-s390x.tar.gz
331+
if: ${{ matrix.arch == 's390x' }}
332+
release:
333+
needs: test
334+
runs-on: ubuntu-latest
281335
strategy:
282336
matrix:
283337
arch: [x64]

.github/workflows/dotnet.yml.j2

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,16 @@ on:
1212
- 'v*'
1313
pull_request:
1414

15-
{%- set arches = ['ppc64le', 's390x'] -%}
15+
{%- set arches = {
16+
'ppc64le': {
17+
'deb_arch': 'ppc64el',
18+
'gnu_arch': 'powerpc64le',
19+
},
20+
's390x': {
21+
'deb_arch': 's390x',
22+
'gnu_arch': 's390x',
23+
},
24+
} -%}
1625

1726
{%- set projects = ['runtime', 'msbuild', 'roslyn', 'sdk', 'aspnetcore', 'installer'] %}
1827

@@ -86,9 +95,42 @@ jobs:
8695
{%- endif %}
8796
output/
8897
{%- endfor %}
89-
release:
98+
test:
9099
needs: installer
91100
runs-on: ubuntu-latest
101+
{{ matrix }}
102+
steps:
103+
{%- for arch in arches %}
104+
- name: Install cross-{{ arch }} packages
105+
run: (echo "deb [arch={{ arches[arch]['deb_arch'] }}] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs) main universe" &&
106+
echo "deb [arch={{ arches[arch]['deb_arch'] }}] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-security main universe" &&
107+
echo "deb [arch={{ arches[arch]['deb_arch'] }}] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-updates main universe" &&
108+
echo "deb [arch={{ arches[arch]['deb_arch'] }}] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-backports main universe") |
109+
sudo tee /etc/apt/sources.list.d/ports.list >/dev/null &&
110+
sudo apt-get update &&
111+
sudo apt-get install -y
112+
libc6-{{ arches[arch]['deb_arch'] }}-cross
113+
libstdc++6-{{ arches[arch]['deb_arch'] }}-cross
114+
zlib1g:{{ arches[arch]['deb_arch'] }}
115+
if: {% raw %}${{{% endraw %} matrix.arch == '{{ arch }}' }}
116+
{%- endfor %}
117+
- name: Checkout
118+
uses: actions/checkout@v4
119+
- name: Download the {% raw %}${{ matrix.arch }}{% endraw %} installer artifacts
120+
uses: actions/download-artifact@v3 # Has to match upload-artifact
121+
with:
122+
name: installer-{% raw %}${{ matrix.arch }}{% endraw %}
123+
- name: Configure emulation
124+
run: docker run --rm --privileged multiarch/qemu-user-static:7.2.0-1 --reset --persistent=yes
125+
{%- for arch in arches %}
126+
- name: Run a {{ arch }} smoke test
127+
run: QEMU_LD_PREFIX=/usr/{{ arches[arch]['gnu_arch'] }}-linux-gnu
128+
./dotnet-test-sdk output/dotnet-sdk-*-linux-{{ arch }}.tar.gz
129+
if: {% raw %}${{{% endraw %} matrix.arch == '{{ arch }}' }}
130+
{%- endfor %}
131+
release:
132+
needs: test
133+
runs-on: ubuntu-latest
92134
strategy:
93135
matrix:
94136
arch: [x64]

0 commit comments

Comments
 (0)