File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ jobs:
125125 build-
126126
127127 - name : Build wheel
128+ id : build_wheel
128129 run : |
129130 cat > build.sh <<'EOF'
130131 # We want setuptools >= 49.6.0 otherwise we can't compile the extension if system CUDA version is 11.7 and pytorch cuda version is 11.6
@@ -146,14 +147,21 @@ jobs:
146147 chmod +x build.sh
147148
148149 # Run build.sh with 10-minute walltime
149- timeout 20m ./build.sh || true
150+ timeout 20m ./build.sh || EXIT_CODE=$?
151+
152+ # Store exit code in GitHub env for later steps
153+ echo "build_exit_code=$exit_code" >> $GITHUB_ENV
154+
155+ # Do not fail the job if timeout killed the build
156+ exit 0
150157
151158 - name : Log Built Wheels
152159 run : |
153160 ls dist
154161
155162 - name : Get Release with tag
156163 id : get_current_release
164+ if : steps.build_wheel.outputs.build_exit_code == 0
157165 uses : joutvhu/get-release@v1
158166 with :
159167 tag_name : ${{ inputs.release-version }}
@@ -162,7 +170,7 @@ jobs:
162170
163171 - name : Upload Release Asset
164172 id : upload_release_asset
165- if : inputs.upload-to-release
173+ if : inputs.upload-to-release && steps.build_wheel.outputs.build_exit_code == 0
166174 uses : actions/upload-release-asset@v1
167175 env :
168176 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments