Skip to content

Commit cfe2b75

Browse files
committed
test
1 parent fed5bfa commit cfe2b75

File tree

3 files changed

+121
-23
lines changed

3 files changed

+121
-23
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build on Linux
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
filter-cuda:
7+
description: "Filter CUDA version"
8+
default: ""
9+
type: string
10+
filter-python:
11+
description: "Filter Python version"
12+
default: ""
13+
type: string
14+
build-matrix:
15+
description: "Build matrix to utilize"
16+
default: ""
17+
type: string
18+
19+
jobs:
20+
build:
21+
strategy:
22+
fail-fast: false
23+
matrix: ${{ fromJSON(inputs.build-matrix) }}
24+
name: build-${{ matrix.cuda-version }}
25+
outputs:
26+
result: ${{ steps.build-step.outputs.result }}
27+
steps:
28+
- name: Build with CUDA ${{ matrix.cuda-version }}
29+
id: build-step
30+
run: |
31+
set -euo pipefail
32+
echo "Building with CUDA ${{ matrix.cuda-version }}"
33+
if [ "${{ matrix.cuda-version }}" == "12.8" ]; then
34+
echo "Building with CUDA 12.8 is not supported"
35+
echo "result=failure" >> $GITHUB_OUTPUT
36+
exit -1
37+
fi
38+
echo "Building with CUDA ${{ matrix.cuda-version }} successfully completed"
39+
echo "result=success" >> $GITHUB_OUTPUT
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test on Linux
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
filter-cuda:
7+
description: "Filter CUDA version"
8+
default: ""
9+
type: string
10+
filter-python:
11+
description: "Filter Python version"
12+
default: ""
13+
type: string
14+
build-matrix:
15+
description: "Build matrix to utilize"
16+
default: ""
17+
type: string
18+
19+
jobs:
20+
test:
21+
strategy:
22+
fail-fast: false
23+
matrix: ${{ fromJSON(inputs.build-matrix) }}
24+
name: test-${{ matrix.cuda-version }}
25+
outputs:
26+
result: ${{ steps.test-step.outputs.result }}
27+
steps:
28+
- name: Test with CUDA ${{ matrix.cuda-version }}
29+
id: test-step
30+
run: |
31+
set -euo pipefail
32+
echo "Testing with CUDA ${{ matrix.cuda-version }}"
33+
if [ "${{ matrix.cuda-version }}" == "12.8" ]; then
34+
echo "Testing with CUDA 12.8 is not supported"
35+
echo "result=failure" >> $GITHUB_OUTPUT
36+
exit -1
37+
fi
38+
echo "Testing with CUDA ${{ matrix.cuda-version }} successfully completed"
39+
echo "result=success" >> $GITHUB_OUTPUT

.github/workflows/test-variant-dependency-workflow.yml

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,51 @@ jobs:
2121
name: Build
2222
runs-on: ubuntu-latest
2323
needs: [generate-matrix]
24-
outputs:
25-
result: ${{ steps.build-step.outputs.result }}
2624
strategy:
27-
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
28-
steps:
29-
- name: Build with CUDA ${{ matrix.cuda-version }}
30-
id: build-step
31-
run: |
32-
echo "Building with CUDA ${{ matrix.cuda-version }}"
33-
if [ "${{ matrix.cuda-version }}" == "12.8" ]; then
34-
echo "result=success" >> $GITHUB_OUTPUT
35-
else
36-
echo "result=failure" >> $GITHUB_OUTPUT
37-
fi
38-
39-
test:
40-
name: Test
25+
fail-fast: false
26+
uses: ./.github/workflows/test-variant-dependency-build.yml
27+
with:
28+
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
29+
30+
31+
L0-test:
32+
name: L0-test
4133
needs: [generate-matrix, build]
42-
if: always() && needs.build.outputs.result == 'success'
34+
if: always() && needs.build.result == 'success'
4335
runs-on: ubuntu-latest
4436
strategy:
45-
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
46-
steps:
47-
- name: Test with CUDA ${{ matrix.cuda-version }}
48-
run: |
49-
echo "needs.build.outputs.result=${{ needs.build.outputs.result }}"
50-
echo "Testing with CUDA ${{ matrix.cuda-version }}"
37+
fail-fast: false
38+
uses: ./.github/workflows/test-variant-dependency-test.yml
39+
with:
40+
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
41+
script: |
42+
set -euo pipefail
43+
echo "needs.build.outputs.result=${{ needs.build.outputs.result }}"
44+
echo "Running L0 test with CUDA ${{ matrix.cuda-version }}"
45+
if [ "${{ matrix.cuda-version }}" == "12.8" ]; then
46+
echo "Running L0 test for cu128 is not supported"
47+
exit -1
48+
fi
49+
echo "Running L0 test for ${{ matrix.cuda-version }} successfully completed"
50+
51+
L1-test:
52+
name: L1-test
53+
needs: [generate-matrix, build, L0-test]
54+
if: always() && needs.build.result == 'success' && needs.L0-test.result == 'success'
55+
runs-on: ubuntu-latest
56+
strategy:
57+
fail-fast: false
58+
uses: ./.github/workflows/test-variant-dependency-test.yml
59+
with:
60+
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
61+
script: |
62+
set -euo pipefail
63+
echo "needs.build.outputs.result=${{ needs.build.outputs.result }}"
64+
echo "Running L1 test with CUDA ${{ matrix.cuda-version }}"
65+
if [ "${{ matrix.cuda-version }}" == "12.8" ]; then
66+
echo "Running L1 test for cu128 is not supported"
67+
exit -1
68+
fi
69+
echo "Running L1 test for ${{ matrix.cuda-version }} successfully completed"
70+
5171

0 commit comments

Comments
 (0)