From 8a15fb97f7c3428662e64dadbace5eec62812f46 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 27 Aug 2020 15:59:45 -0300 Subject: [PATCH 1/3] make linux build an official manylinux --- .github/workflows/actions/entrypoint.sh | 13 +++++++ .../actions/manylinux1_x86_64/action.yml | 7 ++++ .github/workflows/build_linux.yml | 35 +++++++------------ 3 files changed, 33 insertions(+), 22 deletions(-) create mode 100755 .github/workflows/actions/entrypoint.sh create mode 100644 .github/workflows/actions/manylinux1_x86_64/action.yml diff --git a/.github/workflows/actions/entrypoint.sh b/.github/workflows/actions/entrypoint.sh new file mode 100755 index 0000000..142c33b --- /dev/null +++ b/.github/workflows/actions/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +PYTHONS=("cp36-cp36m" "cp37-cp37m" "cp38-cp38") + +for PYTHON in ${PYTHONS[@]}; do + /opt/python/${PYTHON}/bin/pip install --upgrade pip wheel setuptools setuptools_scm pep517 twine auditwheel + /opt/python/${PYTHON}/bin/pip install numpy==1.18 + /opt/python/${PYTHON}/bin/python -m pep517.build --source --binary . --out-dir /github/workspace/wheelhouse/ +done + +for whl in /github/workspace/wheelhouse/gsw*.whl; do + auditwheel repair $whl +done diff --git a/.github/workflows/actions/manylinux1_x86_64/action.yml b/.github/workflows/actions/manylinux1_x86_64/action.yml new file mode 100644 index 0000000..8335315 --- /dev/null +++ b/.github/workflows/actions/manylinux1_x86_64/action.yml @@ -0,0 +1,7 @@ +name: 'build wheels with manylinux1_x86_64' +description: 'build wheels with manylinux1_x86_64' +runs: + using: 'docker' + image: docker://quay.io/pypa/manylinux1_x86_64 + args: + - .github/workflows/actions/entrypoint.sh diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 9e8e5dd..87ef1bb 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -1,19 +1,18 @@ name: linux-wheels +# on: +# release: +# types: +# - published + on: - release: - types: - - published + pull_request: + push: + branches: [master] jobs: packages: - name: Build wheel on ${{ matrix.os }} and ${{ matrix.python-version }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - python-version: [3.6, 3.7, 3.8] - + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -21,19 +20,11 @@ jobs: run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* shell: bash - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install build tools + - uses: ./.github/workflows/actions/manylinux1_x86_64 + - name: copy manylinux wheels run: | - python -m pip install --upgrade pip wheel setuptools setuptools_scm pep517 twine - python -m pip install numpy==1.18 - shell: bash - - - name: Build binary wheel - run: python -m pep517.build --binary . --out-dir dist + mkdir dist + cp wheelhouse/gsw*-manylinux1_x86_64.whl dist/ - name: CheckFiles run: | From dc06c5ccb0bc71ffaf0ae6dce6873cb00d8e154d Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 27 Aug 2020 19:34:43 -0300 Subject: [PATCH 2/3] try manylinux2010_x86_64 instead --- .github/workflows/actions/manylinux1_x86_64/action.yml | 7 ------- .github/workflows/actions/manylinux2010_x86_64/action.yml | 7 +++++++ .github/workflows/build_linux.yml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 .github/workflows/actions/manylinux1_x86_64/action.yml create mode 100644 .github/workflows/actions/manylinux2010_x86_64/action.yml diff --git a/.github/workflows/actions/manylinux1_x86_64/action.yml b/.github/workflows/actions/manylinux1_x86_64/action.yml deleted file mode 100644 index 8335315..0000000 --- a/.github/workflows/actions/manylinux1_x86_64/action.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: 'build wheels with manylinux1_x86_64' -description: 'build wheels with manylinux1_x86_64' -runs: - using: 'docker' - image: docker://quay.io/pypa/manylinux1_x86_64 - args: - - .github/workflows/actions/entrypoint.sh diff --git a/.github/workflows/actions/manylinux2010_x86_64/action.yml b/.github/workflows/actions/manylinux2010_x86_64/action.yml new file mode 100644 index 0000000..4ddbd10 --- /dev/null +++ b/.github/workflows/actions/manylinux2010_x86_64/action.yml @@ -0,0 +1,7 @@ +name: 'build wheels with manylinux2010_x86_64' +description: 'build wheels with manylinux2010_x86_64' +runs: + using: 'docker' + image: docker://quay.io/pypa/manylinux2010_x86_64 + args: + - .github/workflows/actions/entrypoint.sh diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 87ef1bb..222939d 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -20,11 +20,11 @@ jobs: run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* shell: bash - - uses: ./.github/workflows/actions/manylinux1_x86_64 + - uses: ./.github/workflows/actions/manylinux2010_x86_64 - name: copy manylinux wheels run: | mkdir dist - cp wheelhouse/gsw*-manylinux1_x86_64.whl dist/ + cp wheelhouse/gsw*-manylinux2010_x86_64.whl dist/ - name: CheckFiles run: | From 602925596f1adbaf9473e2b43a74634ce880e51a Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 27 Aug 2020 19:40:49 -0300 Subject: [PATCH 3/3] remove PR test and get back to release publishing mode --- .github/workflows/build_linux.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 222939d..48e1a29 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -1,14 +1,9 @@ name: linux-wheels -# on: -# release: -# types: -# - published - on: - pull_request: - push: - branches: [master] + release: + types: + - published jobs: packages: