-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up the way matrix.os is setup and matched. (#1078)
- Loading branch information
1 parent
3871196
commit 350c346
Showing
1 changed file
with
3 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ jobs: | |
) | ||
) && os+=("macos-latest") | ||
[ "${{ steps.is-fork.outputs.fork }}" == "false" ] && os+=("cuda-${{ github.run_id }}-${{ github.run_attempt }}") | ||
[ "${{ steps.is-fork.outputs.fork }}" == "false" ] && os+=("cuda") | ||
echo "os=$(jq -cn '$ARGS.positional' --args ${os[@]})" >> $GITHUB_OUTPUT | ||
outputs: | ||
|
@@ -155,30 +155,26 @@ jobs: | |
library: [ILGPU, ILGPU.Algorithms] | ||
framework: [net6.0, net7.0] | ||
fail-fast: false | ||
runs-on: ${{ contains(matrix.os, 'cuda') && format('{0}-{1}-{2}', matrix.os, matrix.library, matrix.framework) || matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup the latest .NET 6 SDK | ||
if: matrix.framework == 'net6.0' | ||
uses: actions/[email protected] | ||
env: | ||
DOTNET_INSTALL_DIR: ${{ matrix.framework == 'cuda' && '~/.' }} | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Setup the latest .NET 7 SDK | ||
uses: actions/[email protected] | ||
env: | ||
DOTNET_INSTALL_DIR: ${{ matrix.framework == 'cuda' && '~/.' }} | ||
with: | ||
dotnet-version: 7.0.x | ||
|
||
- name: Set test flavor | ||
id: test-flavor | ||
shell: bash | ||
run: echo "flavor=$([[ "${{ matrix.os }}" == cuda-* ]] && echo "Cuda" || echo "CPU")" >> $GITHUB_OUTPUT | ||
run: echo "flavor=$([[ "${{ matrix.os }}" == cuda ]] && echo "Cuda" || echo "CPU")" >> $GITHUB_OUTPUT | ||
|
||
- name: Build and test | ||
run: dotnet test Src/${{ matrix.library }}.Tests.${{ steps.test-flavor.outputs.flavor }} --configuration=Release --framework=${{ matrix.framework }} -p:TreatWarningsAsErrors=true | ||
|