diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index deb3b80..793157c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -275,9 +275,63 @@ 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-cross + libstdc++6-ppc64el-cross + 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-cross + libstdc++6-s390x-cross + 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] diff --git a/.github/workflows/dotnet.yml.j2 b/.github/workflows/dotnet.yml.j2 index f84bb6b..eb65bba 100644 --- a/.github/workflows/dotnet.yml.j2 +++ b/.github/workflows/dotnet.yml.j2 @@ -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'] %} @@ -86,9 +95,42 @@ 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'] }}-cross + libstdc++6-{{ arches[arch]['deb_arch'] }}-cross + 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]