Skip to content

Run a smoke test in GitHub Actions #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,65 @@ jobs:
# See https://github.com/actions/upload-artifact/issues/174 for details.
dotnet-versions
output/
release:
test:
needs: installer
runs-on: ubuntu-latest
strategy:
matrix:
# TODO: aspnetcore build fails on x64 with:
# EXEC : error : Failed to load assembly 'System.Private.CoreLib'
arch: [ppc64le, s390x]
isV6:
- ${{ startsWith(github.ref, 'refs/tags/v6.') }}
exclude:
- arch: ppc64le
isV6: true
steps:
- name: Install cross-ppc64le packages
run: (echo "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs) main universe" &&
echo "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-security main universe" &&
echo "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-updates main universe" &&
echo "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-backports main universe") |
sudo tee /etc/apt/sources.list.d/ports.list >/dev/null &&
sudo apt-get update &&
sudo apt-get install -y
libc6:ppc64el
libgcc-s1:ppc64el
libstdc++6:ppc64el
zlib1g:ppc64el
if: ${{ matrix.arch == 'ppc64le' }}
- name: Install cross-s390x packages
run: (echo "deb [arch=s390x] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs) main universe" &&
echo "deb [arch=s390x] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-security main universe" &&
echo "deb [arch=s390x] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-updates main universe" &&
echo "deb [arch=s390x] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-backports main universe") |
sudo tee /etc/apt/sources.list.d/ports.list >/dev/null &&
sudo apt-get update &&
sudo apt-get install -y
libc6:s390x
libgcc-s1:s390x
libstdc++6:s390x
zlib1g:s390x
if: ${{ matrix.arch == 's390x' }}
- name: Checkout
uses: actions/checkout@v4
- name: Download the ${{ matrix.arch }} installer artifacts
uses: actions/download-artifact@v3 # Has to match upload-artifact
with:
name: installer-${{ matrix.arch }}
- name: Configure emulation
run: docker run --rm --privileged multiarch/qemu-user-static:7.2.0-1 --reset --persistent=yes
- name: Run a ppc64le smoke test
run: QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu
./dotnet-test-sdk output/dotnet-sdk-*-linux-ppc64le.tar.gz
if: ${{ matrix.arch == 'ppc64le' }}
- name: Run a s390x smoke test
run: QEMU_LD_PREFIX=/usr/s390x-linux-gnu
./dotnet-test-sdk output/dotnet-sdk-*-linux-s390x.tar.gz
if: ${{ matrix.arch == 's390x' }}
release:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64]
Expand Down
47 changes: 45 additions & 2 deletions .github/workflows/dotnet.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ on:
- 'v*'
pull_request:

{%- set arches = ['ppc64le', 's390x'] -%}
{%- set arches = {
'ppc64le': {
'deb_arch': 'ppc64el',
'gnu_arch': 'powerpc64le',
},
's390x': {
'deb_arch': 's390x',
'gnu_arch': 's390x',
},
} -%}

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

Expand Down Expand Up @@ -86,9 +95,43 @@ jobs:
{%- endif %}
output/
{%- endfor %}
release:
test:
needs: installer
runs-on: ubuntu-latest
{{ matrix }}
steps:
{%- for arch in arches %}
- name: Install cross-{{ arch }} packages
run: (echo "deb [arch={{ arches[arch]['deb_arch'] }}] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs) main universe" &&
echo "deb [arch={{ arches[arch]['deb_arch'] }}] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-security main universe" &&
echo "deb [arch={{ arches[arch]['deb_arch'] }}] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-updates main universe" &&
echo "deb [arch={{ arches[arch]['deb_arch'] }}] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -cs)-backports main universe") |
sudo tee /etc/apt/sources.list.d/ports.list >/dev/null &&
sudo apt-get update &&
sudo apt-get install -y
libc6:{{ arches[arch]['deb_arch'] }}
libgcc-s1:{{ arches[arch]['deb_arch'] }}
libstdc++6:{{ arches[arch]['deb_arch'] }}
zlib1g:{{ arches[arch]['deb_arch'] }}
if: {% raw %}${{{% endraw %} matrix.arch == '{{ arch }}' }}
{%- endfor %}
- name: Checkout
uses: actions/checkout@v4
- name: Download the {% raw %}${{ matrix.arch }}{% endraw %} installer artifacts
uses: actions/download-artifact@v3 # Has to match upload-artifact
with:
name: installer-{% raw %}${{ matrix.arch }}{% endraw %}
- name: Configure emulation
run: docker run --rm --privileged multiarch/qemu-user-static:7.2.0-1 --reset --persistent=yes
{%- for arch in arches %}
- name: Run a {{ arch }} smoke test
run: QEMU_LD_PREFIX=/usr/{{ arches[arch]['gnu_arch'] }}-linux-gnu
./dotnet-test-sdk output/dotnet-sdk-*-linux-{{ arch }}.tar.gz
if: {% raw %}${{{% endraw %} matrix.arch == '{{ arch }}' }}
{%- endfor %}
release:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64]
Expand Down
Loading