From ab4070ad02a393e03fa42f2022094afc129bc2ca Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Mon, 25 Nov 2024 09:09:28 -0800 Subject: [PATCH] stash-artifacts.ps1: Fail if unstashing failed --- .github/workflows/windows.yml | 2 +- ops/pipeline/stash-artifacts.ps1 | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 415a33ffbd3f..f97daf761abf 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -48,6 +48,6 @@ jobs: submodules: "true" - name: Unstash files run: | - powershell ops/pipeline/stash-artifacts.ps1 unstash build-wind64-gpu ` + powershell ops/pipeline/stash-artifacts.ps1 unstash build-win64-gpu ` build/testxgboost.exe xgboost.exe python-package/dist/*.whl - run: powershell ops/pipeline/test-win64-gpu.ps1 diff --git a/ops/pipeline/stash-artifacts.ps1 b/ops/pipeline/stash-artifacts.ps1 index f2fc5c5c3cb2..9b9989bf376d 100644 --- a/ops/pipeline/stash-artifacts.ps1 +++ b/ops/pipeline/stash-artifacts.ps1 @@ -46,3 +46,4 @@ python ops/pipeline/stash-artifacts.py ` --s3-bucket "${Env:RUNS_ON_S3_BUCKET_CACHE}" ` --prefix "${artifact_stash_prefix}/${remote_prefix}" ` -- $artifacts +if ($LASTEXITCODE -ne 0) { throw "Last command failed" }