Skip to content

Commit

Permalink
Enable Linux ppc64le.
Browse files Browse the repository at this point in the history
  • Loading branch information
ww898 committed Dec 6, 2024
1 parent c21f02c commit 7e574d5
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,26 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [ s390x ]
arch: [ s390x, ppc64le ]

runs-on: ubuntu-latest

env:
tfm: ${{ matrix.arch == 'ppc64le' && 'net9.0' || 'net8.0' }}
sdk: ${{ matrix.arch == 'ppc64le' && '9.0' || '8.0' }}

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install QEMU static executables formats
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Setup .NET SDK, Restore, Build and Tests under QEMU ${{ matrix.arch }}
run: >
docker run --rm -v "${{ github.workspace }}:/work" --platform linux/${{ matrix.arch }} ${{ matrix.arch }}/fedora:39 /bin/bash -c " \
dnf install -y dotnet-sdk-8.0 && \
docker run --rm -v "${{ github.workspace }}:/work" --platform linux/${{ matrix.arch }} ${{ matrix.arch }}/fedora:41 /bin/bash -c " \
dnf install -y dotnet-sdk-${{ env.sdk }} && \
cd /work/net && \
dotnet restore && \
dotnet test -f net8.0 --configuration Release --no-restore --verbosity normal --logger 'trx;LogFilePrefix=test-results' && \
dotnet restore -p:JB_TargetFramework=${{ env.tfm }} && \
dotnet test -f ${{ env.tfm }} -p:JB_TargetFramework=${{ env.tfm }} --configuration Release --no-restore --verbosity normal --logger 'trx;LogFilePrefix=test-results' && \
true"
- name: Upload test results
uses: actions/upload-artifact@v4
Expand All @@ -124,6 +128,7 @@ jobs:
- os-labels: [linux, amd64, musl]
- os-labels: [linux, arm64, musl]
- os-labels: [linux, s390x, glibc]
- os-labels: [linux, ppc64le, glibc]
- os-labels: [linux, riscv64, glibc]
- os-labels: [freebsd, amd64]
- os-labels: [freebsd, arm64]
Expand All @@ -133,17 +138,17 @@ jobs:
- ${{ matrix.os-labels }}

env:
tf: ${{ contains(matrix.os-labels, 'riscv64') && 'net9.0' || 'net8.0' }}
tfm: ${{ (contains(matrix.os-labels, 'riscv64') || contains(matrix.os-labels, 'ppc64le')) && 'net9.0' || 'net8.0' }}

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore
working-directory: ${{ github.workspace }}/net
run: dotnet restore -p:JB_TargetFramework=${{ env.tf }}
run: dotnet restore -p:JB_TargetFramework=${{ env.tfm }}
- name: Build and Tests
working-directory: ${{ github.workspace }}/net
run: dotnet test -f ${{ env.tf }} -p:JB_TargetFramework=${{ env.tf }} --configuration Release --no-restore --verbosity normal --logger 'trx;LogFilePrefix=test-results'
run: dotnet test -f ${{ env.tfm }} -p:JB_TargetFramework=${{ env.tfm }} --configuration Release --no-restore --verbosity normal --logger 'trx;LogFilePrefix=test-results'
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
Expand Down

0 comments on commit 7e574d5

Please sign in to comment.