Skip to content

Commit bcbf56b

Browse files
Consolidate into a single job
1 parent 5420a62 commit bcbf56b

File tree

1 file changed

+53
-40
lines changed

1 file changed

+53
-40
lines changed

.github/workflows/platforms.yml

Lines changed: 53 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,67 +5,80 @@ on:
55
branches: [ main ]
66

77
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 }}
1211
env:
1312
TEST_ENGINE: Internal
1413

1514
strategy:
1615
fail-fast: false
1716
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
2130
runtime: linux-x64
2231
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
2539
runtime: linux-arm64
2640
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
2865

2966
steps:
3067
- name: Checkout source
3168
uses: actions/checkout@v4
3269

33-
- name: Setup .NET ${{ matrix.dotnet }}
70+
- name: Setup .NET SDK ${{ matrix.dotnet }}
3471
uses: actions/setup-dotnet@v4
3572
with:
3673
dotnet-version: ${{ matrix.dotnet }}
3774

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'
4178
uses: actions/setup-dotnet@v4
4279
with:
4380
dotnet-version: 9.0
4481

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' }}
7184
run: dotnet test Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj -c Release -f net${{ matrix.dotnet }}.0

0 commit comments

Comments
 (0)