Skip to content

Commit

Permalink
fix matrix generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kMutagene committed Mar 8, 2024
1 parent 13c64fa commit a6e0761
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-and-test-solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ jobs:
steps:
- id: set-matrix
run: |
if [[ ${{ inputs.windows }} == true ]] then win = 'windows-latest,' else win = '' fi
if [[ ${{ inputs.ubuntu }} == true ]] then ubu ='ubuntu-latest,' else ubu = '' fi
if [[ ${{ inputs.macos }} == true ]] then mac = 'macos-latest' else mac = ''
echo "matrix={\"os\":[$win$ubu$mac]}" >> $GITHUB_OUTPUT
if [[ ${{ inputs.ubuntu }} == true ]]; then win="windows-latest"; fi
if [[ ${{ inputs.ubuntu }} == true ]]; then ubu="ubuntu-latest"; fi
if [[ ${{ inputs.macos }} == true ]]; then mac="macos-latest"; fi
strategy="[${win:+\"$win\"}${ubu:+,\"$ubu\"}${mac:+,\"$mac\"}]"
echo "matrix={\"os\":$strategy}" >> $GITHUB_OUTPUT
build-and-test:
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit a6e0761

Please sign in to comment.