|
5 | 5 | branches: [ main ] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - |
9 | | - linux: |
10 | | - name: 🐧 / .NET ${{ matrix.dotnet }} / ${{ matrix.arch.name }} |
11 | | - runs-on: ${{ matrix.arch.runs-on }} |
| 8 | + build-test: |
| 9 | + name: ${{ matrix.os.name }} / .NET ${{ matrix.dotnet }} / ${{ matrix.arch }} |
| 10 | + runs-on: ${{ matrix.os.runs-on }} |
12 | 11 | env: |
13 | 12 | TEST_ENGINE: Internal |
14 | 13 |
|
15 | 14 | strategy: |
16 | 15 | fail-fast: false |
17 | 16 | matrix: |
18 | | - dotnet: [8.0, 9.0] |
19 | | - arch: |
20 | | - - name: x64 |
| 17 | + include: |
| 18 | + # Linux x64 |
| 19 | + - os: |
| 20 | + name: 🐧 |
| 21 | + runs-on: ubuntu-latest |
| 22 | + arch: x64 |
| 23 | + runtime: linux-x64 |
| 24 | + platform: linux/amd64 |
| 25 | + dotnet: 8.0 |
| 26 | + - os: |
| 27 | + name: 🐧 |
| 28 | + runs-on: ubuntu-latest |
| 29 | + arch: x64 |
21 | 30 | runtime: linux-x64 |
22 | 31 | platform: linux/amd64 |
23 | | - runs-on: ubuntu-latest |
24 | | - - name: arm64 |
| 32 | + dotnet: 9.0 |
| 33 | + |
| 34 | + # Linux arm64 |
| 35 | + - os: |
| 36 | + name: 🐧 |
| 37 | + runs-on: ubuntu-22.04-arm |
| 38 | + arch: arm64 |
25 | 39 | runtime: linux-arm64 |
26 | 40 | platform: linux/arm64/v8 |
27 | | - runs-on: ubuntu-22.04-arm |
| 41 | + dotnet: 8.0 |
| 42 | + - os: |
| 43 | + name: 🐧 |
| 44 | + runs-on: ubuntu-22.04-arm |
| 45 | + arch: arm64 |
| 46 | + runtime: linux-arm64 |
| 47 | + platform: linux/arm64/v8 |
| 48 | + dotnet: 9.0 |
| 49 | + |
| 50 | + # Windows x64 |
| 51 | + - os: |
| 52 | + name: 🪟 |
| 53 | + runs-on: windows-latest |
| 54 | + arch: x64 |
| 55 | + runtime: win-x64 |
| 56 | + platform: windows/amd64 |
| 57 | + dotnet: 8.0 |
| 58 | + - os: |
| 59 | + name: 🪟 |
| 60 | + runs-on: windows-latest |
| 61 | + arch: x64 |
| 62 | + runtime: win-x64 |
| 63 | + platform: windows/amd64 |
| 64 | + dotnet: 9.0 |
28 | 65 |
|
29 | 66 | steps: |
30 | 67 | - name: Checkout source |
31 | 68 | uses: actions/checkout@v4 |
32 | 69 |
|
33 | | - - name: Setup .NET ${{ matrix.dotnet }} |
| 70 | + - name: Setup .NET SDK ${{ matrix.dotnet }} |
34 | 71 | uses: actions/setup-dotnet@v4 |
35 | 72 | with: |
36 | 73 | dotnet-version: ${{ matrix.dotnet }} |
37 | 74 |
|
38 | | - # ARM64 on .NET 8 does not support multiple target frameworks |
39 | | - - name: Setup .NET 9 |
40 | | - if: matrix.arch.name == 'arm64' && matrix.dotnet == '8.0' |
| 75 | + # Workaround: ARM64 on .NET 8 doesn’t support multiple TFMs |
| 76 | + - name: Setup .NET 9 (for ARM64 on .NET 8) |
| 77 | + if: matrix.runtime == 'linux-arm64' && matrix.arch == 'arm64' && matrix.dotnet == '8.0' |
41 | 78 | uses: actions/setup-dotnet@v4 |
42 | 79 | with: |
43 | 80 | dotnet-version: 9.0 |
44 | 81 |
|
45 | | - - name: Build and Test (${{ matrix.arch.runtime }}) |
46 | | - shell: bash |
47 | | - run: dotnet test Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj -c Release -f net${{ matrix.dotnet }}.0 |
48 | | - |
49 | | - windows: |
50 | | - name: 🪟 / .NET ${{ matrix.dotnet }} / x64 |
51 | | - runs-on: windows-latest |
52 | | - env: |
53 | | - TEST_ENGINE: Internal |
54 | | - |
55 | | - strategy: |
56 | | - fail-fast: false |
57 | | - matrix: |
58 | | - dotnet: [8.0, 9.0] |
59 | | - |
60 | | - steps: |
61 | | - - name: Checkout source |
62 | | - uses: actions/checkout@v4 |
63 | | - |
64 | | - - name: Setup .NET SDK ${{ matrix.dotnet }} |
65 | | - uses: actions/setup-dotnet@v4 |
66 | | - with: |
67 | | - dotnet-version: ${{ matrix.dotnet }} |
68 | | - |
69 | | - - name: Build and Test (win-x64) |
70 | | - shell: pwsh |
| 82 | + - name: Build & Test (${{ matrix.runtime }}) |
| 83 | + shell: ${{ startsWith(matrix.os.runs-on, 'windows') && 'pwsh' || 'bash' }} |
71 | 84 | run: dotnet test Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj -c Release -f net${{ matrix.dotnet }}.0 |
0 commit comments