Skip to content

Commit 4d5e44d

Browse files
use matrix strategy
1 parent 11a75c6 commit 4d5e44d

File tree

1 file changed

+6
-41
lines changed

1 file changed

+6
-41
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ on:
99

1010
jobs:
1111

12-
linux-build:
13-
runs-on: ubuntu-24.04
12+
build-test:
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
16+
runs-on: ${{ matrix.os }}
1417
steps:
1518
- uses: actions/checkout@v4
1619
- name: Setup .NET
@@ -27,46 +30,8 @@ jobs:
2730
env:
2831
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2932

30-
osx-build:
31-
runs-on: macos-13
32-
steps:
33-
- uses: actions/checkout@v4
34-
- name: Setup .NET
35-
uses: actions/setup-dotnet@v4
36-
with:
37-
dotnet-version: |
38-
6.0.x
39-
8.0.x
40-
- name: Set ulimit
41-
run: ulimit -n 1024
42-
- name: Build and test
43-
run: |
44-
dotnet nuget add source --username user --password ${{ github.token }} --store-password-in-clear-text --name github https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
45-
dotnet restore
46-
dotnet test -c Release test/Confluent.Kafka.UnitTests/Confluent.Kafka.UnitTests.csproj
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
50-
windows-build:
51-
runs-on: windows-latest
52-
steps:
53-
- uses: actions/checkout@v4
54-
- name: Setup .NET
55-
uses: actions/setup-dotnet@v4
56-
with:
57-
dotnet-version: |
58-
6.0.x
59-
8.0.x
60-
- name: Build and test
61-
run: |
62-
dotnet nuget add source --username user --password ${{ github.token }} --store-password-in-clear-text --name github https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
63-
dotnet restore
64-
dotnet test -c Release test/Confluent.Kafka.UnitTests/Confluent.Kafka.UnitTests.csproj
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67-
6833
package:
69-
needs: [windows-build, osx-build, linux-build]
34+
needs: [build-test]
7035
runs-on: windows-latest
7136
steps:
7237

0 commit comments

Comments
 (0)