Deploy Windows wheels to Amazon S3 (#8237)

* Deploy to Amazon S3

* Install specifically requested Python version

Co-authored-by: Mehrdad <noreply@github.com>
This commit is contained in:
mehrdadn
2020-05-01 14:08:57 -07:00
committed by GitHub
parent 42991d723f
commit bf074073e7
3 changed files with 28 additions and 0 deletions
+8
View File
@@ -39,6 +39,13 @@ jobs:
with:
# we need full history to diff against the original for linting etc.
fetch-depth: 0
- name: Configure AWS Credentials
continue-on-error: true
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.GHA_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.GHA_AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Run CI script
shell: bash -e -o pipefail -l {0}
env:
@@ -53,6 +60,7 @@ jobs:
. ./ci/travis/ci.sh init
. ./ci/travis/ci.sh lint
. ./ci/travis/ci.sh build
. ./ci/travis/ci.sh upload_wheels || true
. ./ci/travis/ci.sh test_python
. ./ci/travis/ci.sh test_wheels
- name: Run Clang Include-What-You-Use
+17
View File
@@ -78,6 +78,23 @@ need_wheels() {
return "${error_code}"
}
upload_wheels() {
local branch="" commit
commit="$(git rev-parse --verify HEAD)"
if [ -z "${branch}" ]; then branch="${TRAVIS_BRANCH-}"; fi
if [ -z "${branch}" ]; then branch="${GITHUB_BASE_REF-}"; fi
if [ -z "${branch}" ]; then branch="${GITHUB_REF#refs/heads/}"; fi
if [ -z "${branch}" ]; then echo "Unable to detect branch name" 1>&2; return 1; fi
local local_dir="python/dist"
local remote_dir="${branch}/${commit}"
if [ -d "${local_dir}" ]; then
if command -V aws; then
aws s3 sync --acl public-read --no-progress "${local_dir}" "s3://ray-wheels/${remote_dir}"
fi
fi
}
test_python() {
if [ "${OSTYPE}" = msys ]; then
# Windows -- most tests won't work yet; just do the ones we know work
+3
View File
@@ -60,6 +60,9 @@ install_miniconda() {
;;
esac
reload_env
if [ -n "${PYTHON-}" ]; then
conda install -q -y python="${PYTHON}"
fi
python -m pip install --upgrade --quiet pip
}