Skip to content

Commit

Permalink
Update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater committed Jul 21, 2020
1 parent cd72aed commit a2f04c3
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 24 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Set up Python 3.8
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Poetry
Expand All @@ -58,17 +58,19 @@ jobs:
curl -L https://github.com/sdispater/python-binaries/releases/download/3.5.9/python-3.5.9.macos.tar.xz -o python-3.5.9.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.6.8/python-3.6.8.macos.tar.xz -o python-3.6.8.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.7.6/python-3.7.6.macos.tar.xz -o python-3.7.6.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.8.2/python-3.8.2.macos.tar.xz -o python-3.8.2.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.8.3/python-3.8.3.macos.tar.xz -o python-3.8.3.tar.xz
curl -L https://github.com/sdispater/python-binaries/releases/download/3.9.0b4/python-3.9.0b4.macos.tar.xz -o python-3.9.0b4.tar.xz
tar -zxf python-2.7.17.tar.xz
tar -zxf python-3.4.10.tar.xz
tar -zxf python-3.5.9.tar.xz
tar -zxf python-3.6.8.tar.xz
tar -zxf python-3.7.6.tar.xz
tar -zxf python-3.8.2.tar.xz
tar -zxf python-3.8.3.tar.xz
tar -zxf python-3.9.0b4.tar.xz
- name: Build specific release
run: |
source $HOME/.poetry/env
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17/bin/python" -P "3.4:python-3.4.10/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.6/bin/python" -P "3.8:python-3.8.2/bin/python"
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17/bin/python" -P "3.4:python-3.4.10/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.6/bin/python" -P "3.8:python-3.8.3/bin/python" -P "3.9:python-3.9.0b4/bin/python"
- name: Upload release file
uses: actions/upload-artifact@v1
with:
Expand All @@ -91,7 +93,7 @@ jobs:
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Set up Python 3.8
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Poetry
Expand All @@ -109,23 +111,26 @@ jobs:
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.5.4/python-3.5.4.windows.tar.xz -O python-3.5.4.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.6.8/python-3.6.8.windows.tar.xz -O python-3.6.8.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.7.6/python-3.7.6.windows.tar.xz -O python-3.7.6.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.8.2/python-3.8.2.windows.tar.xz -O python-3.8.2.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.8.3/python-3.8.3.windows.tar.xz -O python-3.8.3.tar.xz
Invoke-WebRequest https://github.com/sdispater/python-binaries/releases/download/3.9.0b4/python-3.9.0b4.windows.tar.xz -O python-3.9.0b4.tar.xz
7z x python-2.7.17.tar.xz
7z x python-3.4.4.tar.xz
7z x python-3.5.4.tar.xz
7z x python-3.6.8.tar.xz
7z x python-3.7.6.tar.xz
7z x python-3.8.2.tar.xz
7z x python-3.8.3.tar.xz
7z x python-3.9.0b4.tar.xz
7z x python-2.7.17.tar
7z x python-3.4.4.tar
7z x python-3.5.4.tar
7z x python-3.6.8.tar
7z x python-3.7.6.tar
7z x python-3.8.2.tar
7z x python-3.8.3.tar
7z x python-3.9.0b4.tar
- name: Build specific release
run: |
$env:Path += ";$env:Userprofile\.poetry\bin"
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.4:python-3.4.4\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.6\python.exe" -P "3.8:python-3.8.2\python.exe"
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.4:python-3.4.4\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.6\python.exe" -P "3.8:python-3.8.3\python.exe" -P "3.9:python-3.9.0b4\python.exe"
- name: Upload release file
uses: actions/upload-artifact@v1
with:
Expand Down Expand Up @@ -242,6 +247,10 @@ jobs:
asset_path: releases/poetry-${{ steps.tag.outputs.tag }}-win32.sha256sum
asset_name: poetry-${{ steps.tag.outputs.tag }}-win32.sha256sum
asset_content_type: text/plain
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Poetry
run: |
python get-poetry.py --preview -y
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ wheel:

linux_release:
docker pull quay.io/pypa/manylinux2010_x86_64
docker run --rm -i -v `pwd`:/io quay.io/pypa/manylinux2010_x86_64 /io/make-linux-release.sh
docker run --rm -i -v `pwd`:/io \
-e PYTHON=/opt/python/cp38-cp38/bin/python \
-e PYTHON27=/opt/python/cp27-cp27m/bin/python \
-e PYTHON35=/opt/python/cp35-cp35m/bin/python \
-e PYTHON36=/opt/python/cp36-cp36m/bin/python \
-e PYTHON37=/opt/python/cp37-cp37m/bin/python \
-e PYTHON38=/opt/python/cp38-cp38/bin/python \
-e PYTHON39=/opt/python/cp39-cp39/bin/python \
quay.io/pypa/manylinux2010_x86_64 sh -c "cd /io && ./make-linux-release.sh"

# run tests against all supported python versions
tox:
Expand Down
28 changes: 14 additions & 14 deletions make-linux-release.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash
PYTHON_VERSIONS="cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38"
#!/bin/sh

cd /io
/opt/python/cp37-cp37m/bin/pip install pip -U
/opt/python/cp37-cp37m/bin/pip install poetry -U --pre
/opt/python/cp37-cp37m/bin/poetry config virtualenvs.create false
/opt/python/cp37-cp37m/bin/poetry install --no-dev
/opt/python/cp37-cp37m/bin/python sonnet make release --ansi \
-P "2.7:/opt/python/cp27-cp27m/bin/python" \
-P "3.5:/opt/python/cp35-cp35m/bin/python" \
-P "3.6:/opt/python/cp36-cp36m/bin/python" \
-P "3.7:/opt/python/cp37-cp37m/bin/python" \
-P "3.8:/opt/python/cp38-cp38/bin/python"
cd -
set -e

test -n "$PYTHON" || PYTHON="python3"
$PYTHON get-poetry.py -y
$PYTHON $HOME/.poetry/bin/poetry config virtualenvs.create false
$PYTHON $HOME/.poetry/bin/poetry install --no-dev
$PYTHON $HOME/.poetry/bin/poetry run python sonnet make release \
${PYTHON27:+-P "2.7:$PYTHON27"} \
${PYTHON35:+-P "3.5:$PYTHON35"} \
${PYTHON36:+-P "3.6:$PYTHON36"} \
${PYTHON37:+-P "3.7:$PYTHON37"} \
${PYTHON38:+-P "3.8:$PYTHON38"} \
${PYTHON39:+-P "3.9:$PYTHON39"}
1 change: 1 addition & 0 deletions sonnet
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class MakeReleaseCommand(Command):
"3.6": "python3.6",
"3.7": "python3.7",
"3.8": "python3.8",
"3.9": "python3.9",
}

def handle(self):
Expand Down

0 comments on commit a2f04c3

Please sign in to comment.