From 6ca4eb5e699aa73d3721638fc1a3a43bf658a48b Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Tue, 31 Oct 2023 08:53:05 -0700 Subject: [PATCH] [CI] Fix S3 upload (#532) --- ops/build-cpack.sh | 4 ++-- ops/build-macos.sh | 2 +- ops/test-linux-python-wheel.sh | 2 +- ops/test-sdist.sh | 2 +- ops/test-win-python-wheel.bat | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ops/build-cpack.sh b/ops/build-cpack.sh index 5a92f9a3..99902713 100755 --- a/ops/build-cpack.sh +++ b/ops/build-cpack.sh @@ -13,7 +13,7 @@ do done echo "##[section]Uploading CPack for amd64..." -python -m awscli s3 cp build/*.tar.gz s3://treelite-cpack/ --acl public-read || true +python -m awscli s3 cp build/*.tar.gz s3://treelite-cpack/ --acl public-read --region us-west-2 || true rm -rf build/ @@ -30,4 +30,4 @@ do done echo "##[section]Uploading CPack for aarch64..." -python -m awscli s3 cp build/*.tar.gz s3://treelite-cpack/ --acl public-read || true +python -m awscli s3 cp build/*.tar.gz s3://treelite-cpack/ --acl public-read --region us-west-2 || true diff --git a/ops/build-macos.sh b/ops/build-macos.sh index 5221260c..65f6eea9 100755 --- a/ops/build-macos.sh +++ b/ops/build-macos.sh @@ -6,4 +6,4 @@ echo "##[section]Building MacOS Python wheels..." tests/ci_build/build_macos_python_wheels.sh ${CIBW_PLATFORM_ID} ${COMMIT_ID} echo "##[section]Uploading MacOS Python wheels to S3..." -python -m awscli s3 cp wheelhouse/treelite-*.whl s3://treelite-wheels/ --acl public-read || true +python -m awscli s3 cp wheelhouse/treelite-*.whl s3://treelite-wheels/ --acl public-read --region us-west-2 || true diff --git a/ops/test-linux-python-wheel.sh b/ops/test-linux-python-wheel.sh index b2091bd0..e152e051 100755 --- a/ops/test-linux-python-wheel.sh +++ b/ops/test-linux-python-wheel.sh @@ -9,4 +9,4 @@ echo "##[section]Running Python tests..." python -m pytest -v -rxXs --fulltrace --durations=0 tests/python/test_sklearn_integration.py echo "##[section]Uploading Python wheels..." -python -m awscli s3 cp python/dist/*.whl s3://treelite-wheels/ --acl public-read || true +python -m awscli s3 cp python/dist/*.whl s3://treelite-wheels/ --acl public-read --region us-west-2 || true diff --git a/ops/test-sdist.sh b/ops/test-sdist.sh index 46a6d63a..b3ccc156 100755 --- a/ops/test-sdist.sh +++ b/ops/test-sdist.sh @@ -14,4 +14,4 @@ for file in ./treelite-*.tar.gz do mv "${file}" "${file%.tar.gz}+${COMMIT_ID}.tar.gz" done -python -m awscli s3 cp treelite-*.tar.gz s3://treelite-wheels/ --acl public-read || true +python -m awscli s3 cp treelite-*.tar.gz s3://treelite-wheels/ --acl public-read --region us-west-2 || true diff --git a/ops/test-win-python-wheel.bat b/ops/test-win-python-wheel.bat index 033aa89c..e48b7d91 100644 --- a/ops/test-win-python-wheel.bat +++ b/ops/test-win-python-wheel.bat @@ -17,5 +17,5 @@ if %errorlevel% neq 0 exit /b %errorlevel% echo ##[section]Uploading Python wheels... for /R %%i in (python\\dist\\*.whl) DO ( - python -m awscli s3 cp "%%i" s3://treelite-wheels/ --acl public-read || cd . + python -m awscli s3 cp "%%i" s3://treelite-wheels/ --acl public-read --region us-west-2 || cd . )