|
16 | 16 | # Event flags evaluated by github actions before the step runs: |
17 | 17 | IS_MAIN_PUSH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} |
18 | 18 | IS_SCHEDULE: ${{ github.event_name == 'schedule' }} |
19 | | - IS_PR: ${{ github.event_name == 'pull_request' }} |
20 | 19 | IS_8GPU_TAG: ${{ startsWith(github.ref, 'refs/tags/ciflow/8gpu/') }} |
21 | 20 | TRIGGERED_8GPU_LABEL: ${{ github.event_name == 'pull_request' && github.event.action == 'labeled' }} |
22 | 21 |
|
@@ -46,28 +45,24 @@ jobs: |
46 | 45 | # Use default value as 'false' for unset environment variables |
47 | 46 | IS_MAIN_PUSH="${IS_MAIN_PUSH:-false}" |
48 | 47 | IS_SCHEDULE="${IS_SCHEDULE:-false}" |
49 | | - IS_PR="${IS_PR:-false}" |
50 | 48 | IS_8GPU_TAG="${IS_8GPU_TAG:-false}" |
51 | 49 | TRIGGERED_8GPU_LABEL="${TRIGGERED_8GPU_LABEL:-false}" |
52 | 50 |
|
53 | 51 | # Decide which matrix entries to include based on event type |
54 | 52 | # Runs ROCm only for push tag OR when PR label gets triggered |
55 | 53 | if [[ "$IS_8GPU_TAG" == "true" || "$TRIGGERED_8GPU_LABEL" == "true" ]]; then |
56 | | - echo "Runs ROCm only for push tag OR when PR label gets triggered" |
57 | 54 | cat > matrix.json <<JSON |
58 | 55 | {"include": [$ROCM_MATRIX]} |
59 | 56 | JSON |
60 | 57 |
|
61 | 58 | # Runs CUDA and ROCm for normal PR (if PR label is present) OR for push to main, cron schedule |
62 | 59 | elif [[ ("$IS_MAIN_PUSH" == "true" || "$IS_SCHEDULE" == "true") ]]; then |
63 | | - echo "Runs CUDA and ROCm for normal PR (if PR label is present) OR for push to main, cron schedule" |
64 | 60 | cat > matrix.json <<JSON |
65 | 61 | {"include": [$CUDA_MATRIX,$ROCM_MATRIX]} |
66 | 62 | JSON |
67 | 63 |
|
68 | 64 | # Runs CUDA only as default (includes normal PR, if PR label is NOT present) |
69 | 65 | else |
70 | | - echo "Runs CUDA only as default (includes normal PR, if PR label is NOT present)" |
71 | 66 | cat > matrix.json <<JSON |
72 | 67 | {"include": [$CUDA_MATRIX]} |
73 | 68 | JSON |
|
0 commit comments