Skip to content

Commit db11a8b

Browse files
authored
[CI] Fix (#3)
1 parent 1b2c560 commit db11a8b

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

.github/workflows/ascend_npu_test.yml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,43 @@ on:
4848
description: 'The device selected to run on'
4949
image:
5050
required: true
51-
type: choice
52-
options:
53-
- ascendai/cann:7.1-openeuler2203sp2
51+
type: string
5452
default: 'ascendai/cann:7.1-openeuler2203sp2'
5553
description: The docker image which will be loaded
5654

5755
jobs:
56+
prepare:
57+
name: prepare
58+
runs-on: ubuntu-latest
59+
outputs:
60+
runner: ${{ steps.set-param.outputs.runner }}
61+
device: ${{ steps.set-param.outputs.device }}
62+
image: ${{ steps.set-param.outputs.image }}
63+
steps:
64+
- name: Set param
65+
id: set-param
66+
run: |
67+
set -e
68+
echo "runner=${{ github.event.inputs.runner || 'self-hosted' }}" >> $GITHUB_OUTPUT
69+
echo "device=${{ github.event.inputs.device || '/dev/davinci6' }}" >> $GITHUB_OUTPUT
70+
echo "image=${{ github.event.inputs.image || 'ascendai/cann:7.1-openeuler2203sp2' }}" >> $GITHUB_OUTPUT
71+
5872
linux-py3_8-fetch-and-rebase:
5973
name: linux-py3_8-7.0.RC1.alpha005
60-
env:
61-
INPUT_RUNNER: ${{ github.event.inputs.runner || 'self-hosted' }}
74+
needs:
75+
- prepare
6276
uses: ./.github/workflows/_fetch_and_rebase.yml
6377
with:
64-
runner: ${{ env.INPUT_RUNNER }}
78+
runner: ${{ needs.prepare.outputs.runner }}
6579
loop: 10
6680

6781
linux-py3_8-build-and-test:
6882
name: linux-py3_8-7.0.RC1.alpha005
69-
needs: linux-py3_8-fetch-and-rebase
70-
env:
71-
INPUT_RUNNER: ${{ github.event.inputs.runner || 'self-hosted' }}
72-
INPUT_DEVICE: ${{ github.event.inputs.device || '/dev/davinci6' }}
73-
INPUT_IMAGE: ${{ github.event.inputs.image || 'ascendai/cann:7.1-openeuler2203sp2' }}
83+
needs:
84+
- prepare
85+
- linux-py3_8-fetch-and-rebase
7486
uses: ./.github/workflows/_build-and-test.yml
7587
with:
76-
runner: ${{ env.INPUT_RUNNER }}
77-
device: ${{ env.INPUT_DEVICE }}
78-
image: ${{ env.INPUT_IMAGE }}
88+
runner: ${{ needs.prepare.outputs.runner }}
89+
device: ${{ needs.prepare.outputs.device }}
90+
image: ${{ needs.prepare.outputs.image }}

0 commit comments

Comments
 (0)