Skip to content

Commit

Permalink
try dynamic matrix strategy in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kMutagene committed Mar 8, 2024
1 parent 53b6b5a commit 164a524
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 34 deletions.
41 changes: 11 additions & 30 deletions .github/workflows/build-and-test-solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,39 +27,20 @@ on:
default: true

jobs:
windows:
if: ${{ inputs.windows == true }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x
- name: Build
run: dotnet build ${{ inputs.solution }} --configuration ${{ inputs.configuration }}
- name: Test
run: dotnet test ${{ inputs.solution }} --configuration ${{ inputs.configuration }} --no-build

ubuntu:
if: ${{ inputs.ubuntu == true }}
determine-strategy:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x
- name: Build
run: dotnet build ${{ inputs.solution }} --configuration ${{ inputs.configuration }}
- name: Test
run: dotnet test ${{ inputs.solution }} --configuration ${{ inputs.configuration }} --no-build
- id: set-matrix
run: |
win = if ${{ inputs.windows }} == true then 'windows-latest,' else ''
ubu = if ${{ inputs.ubuntu }} == true then 'ubuntu-latest,' else ''
mac = if ${{ inputs.macos }} == true then 'macos-latest' else ''
echo "matrix: [${win}${ubu}${mac}]" >> $GITHUB_OUTPUT
macos:
if: ${{ inputs.macos == true }}
runs-on: macos-latest
build-and-test:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,4 @@ jobs:
configuration: Release
windows: true
ubuntu: false
macos: false


macos: false
2 changes: 1 addition & 1 deletion src/AVPRClient/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AVPR Client

.NET client library for https://avpr.nfdi4plants.org.

Generated with NSwag based on the OpenAPI specification.

## Usage
Expand Down

0 comments on commit 164a524

Please sign in to comment.