Skip to content

Commit

Permalink
test 73
Browse files Browse the repository at this point in the history
  • Loading branch information
cheqianh committed Apr 27, 2022
1 parent 7759225 commit 3f81aae
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 35 deletions.
58 changes: 24 additions & 34 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Ion-python release

on:
push: # TODO change it to push and enable tags
push:
branches: [ master wheels ]
tags:
- "v*.*.*"
Expand All @@ -23,32 +23,9 @@ jobs:
- name: Create a virtual environment
run: git submodule init && git submodule update && python3 -m venv ./venv && . venv/bin/activate

# - run: pip install -r requirements.txt
# - run: pip install -e .
# - run: py.test
# pip install -i https://test.pypi.org/simple/ amazon.ion==
- name: fetch wheels
run: |
for (( i=0; i<3; i++ ))
do
v=""
pip install amazon.ion==${GITHUB_REF##*/v} || true
v=$( pip show amazon.ion | grep Version )
if [[ $v == "Version: ${GITHUB_REF##*/v}" ]]
then
echo "Found desired version: $v"
break
fi
sleep 5s
done
if [[ $v != "Version: ${GITHUB_REF##*/v}" ]]
then
echo "Exiting because unable to install the new version from PYPI"
exit 1
fi
- run: pip install -r requirements.txt
- run: pip install -e .
- run: py.test

build-source:
if: startsWith(github.ref, 'refs/tags/')
Expand Down Expand Up @@ -97,7 +74,7 @@ jobs:
fail-fast: false # TODO change it back to True
matrix:
python-version: [ '3.10']
os: [ubuntu-latest, windows-latest, macos-latest]
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -156,19 +133,32 @@ jobs:
role-external-id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
role-duration-seconds: 900

- name: Upload wheels to s3
# pip install amazon.ion==${GITHUB_REF##*/v} || true
- name: Upload wheels to s3 and check release status
run: |
zip ion-python-wheels ./*.whl
aws s3 mv ion-python-wheels.zip ${{ secrets.AWS_WHEELS_BUCKET_URL }} --acl bucket-owner-full-control
sleep 300s
for (( i=0; i<3; i++ ))
do
id=$(1)
if [[ $id = 1 ]]
v=""
pip install -i https://test.pypi.org/simple/ amazon.ion==${GITHUB_REF##*/v} || true
v=$( pip show amazon.ion | grep Version )
if [[ $v == "Version: ${GITHUB_REF##*/v}" ]]
then
echo "aaaaaaaaaaa"
exit 1
echo "Found desired version: $v"
break
fi
sleep 5s
sleep 300s
done
if [[ $v != "Version: ${GITHUB_REF##*/v}" ]]
then
echo "Exiting because unable to install the new version from PYPI"
exit 1
fi
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def run_setup():

setup(
name='amazon.ion',
version='0.9.72',
version='0.9.73',
description='A Python implementation of Amazon Ion.',
url='http://github.com/amzn/ion-python',
author='Amazon Ion Team',
Expand Down

0 comments on commit 3f81aae

Please sign in to comment.