From 64beb76bb6b12785a11cee120fb4fd1d0c3ef2fe Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Fri, 28 Feb 2020 18:58:36 +0100 Subject: [PATCH 1/7] Test macos and windows wheels. --- .github/workflows/release.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 93678cec53..6369223703 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,8 +137,30 @@ jobs: - uses: actions/upload-artifact@v1 if: github.event_name == 'schedule' || github.event_name == 'release' || matrix.python-version == '3.5' with: - name: ${{ runner.os }}-wheels + name: ${{ runner.os }}-${{ matrix.python-version }}-wheel path: artifacts + test-release-wheel: + name: Test release wheels + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ['macos-latest', 'windows-latest'] + python-version: ['3.5', '3.6', '3.7'] + steps: + - uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - uses: actions/download-artifact@v1 + if: github.event_name == 'schedule' || github.event_name == 'release' || matrix.python-version == '3.5' + with: + name: ${{ runner.os }}-${{ matrix.python-version }}-wheel + path: wheel + - name: Test wheel + if: github.event_name == 'schedule' || github.event_name == 'release' || matrix.python-version == '3.5' + run: | + pip install tensorflow~=2.1.0 + pip install wheel/tensorflow_addons-*.whl + python -c "from tensorflow_addons.activations import gelu; print(gelu(0.2))" upload-wheels: name: Publish wheels to PyPi From 388e59ce1c4b9f08cf3017bf58c76cdafc8c286e Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Fri, 28 Feb 2020 19:01:44 +0100 Subject: [PATCH 2/7] Add widnows. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6369223703..4ecfd0f30c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -97,7 +97,7 @@ jobs: - uses: actions/upload-artifact@v1 if: github.event_name == 'schedule' || github.event_name == 'release' || matrix.python-version == '3.5' with: - name: ${{ runner.os }}-wheels + name: ${{ runner.os }}-${{ matrix.python-version }}-wheel path: wheelhouse windows-release-wheel: From 8637224e4ba32d7e403703ec904c094b7a8a04f9 Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Mon, 2 Mar 2020 20:46:08 +0000 Subject: [PATCH 3/7] Test all wheels. --- .github/workflows/release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0055314b28..7bb4b0743a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,9 +59,10 @@ jobs: test-release-wheel: name: Test release wheels runs-on: ${{ matrix.os }} + needs: [release-wheel] strategy: matrix: - os: ['macos-latest', 'windows-latest'] + os: ['macos-latest', 'windows-latest', 'ubuntu-18.04'] python-version: ['3.5', '3.6', '3.7'] steps: - uses: actions/setup-python@v1 @@ -71,13 +72,13 @@ jobs: if: github.event_name == 'schedule' || github.event_name == 'release' || matrix.python-version == '3.5' with: name: ${{ runner.os }}-${{ matrix.python-version }}-wheel - path: wheel + path: ./wheel - name: Test wheel if: github.event_name == 'schedule' || github.event_name == 'release' || matrix.python-version == '3.5' run: | pip install tensorflow~=2.1.0 pip install wheel/tensorflow_addons-*.whl - python -c "from tensorflow_addons.activations import gelu; print(gelu(0.2))" + python -c "import tensorflow_addons as tfa; print(tfa.activations.gelu(0.2))" upload-wheels: name: Publish wheels to PyPi From 533642494a6bb9eeb249e190157981ccb1b96fe2 Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Mon, 2 Mar 2020 20:48:19 +0000 Subject: [PATCH 4/7] Depends on result of tests. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7bb4b0743a..6e22b55a07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,7 +82,7 @@ jobs: upload-wheels: name: Publish wheels to PyPi - needs: [release-wheel, manylinux-cpu-release-test] + needs: [release-wheel, test-release-wheel, manylinux-cpu-release-test] runs-on: ubuntu-18.04 steps: - uses: actions/download-artifact@v1 From f1df2712c512eb87b12416245c3d2d79bc257df0 Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Mon, 2 Mar 2020 23:45:00 +0000 Subject: [PATCH 5/7] Change name. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e22b55a07..fecf0c3db2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,7 +55,7 @@ jobs: if: github.event_name == 'schedule' || github.event_name == 'release' || matrix.python-version == '3.5' with: name: ${{ runner.os }}-${{ matrix.python-version }}-wheel - path: artifacts + path: wheelhouse test-release-wheel: name: Test release wheels runs-on: ${{ matrix.os }} From f7a8ad83aca668c00027e5420e5f48fc7d7afd6c Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Tue, 3 Mar 2020 10:52:00 +0100 Subject: [PATCH 6/7] Use matrix everywhere. --- .github/workflows/release.yml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fecf0c3db2..21f1772d6d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,6 +75,7 @@ jobs: path: ./wheel - name: Test wheel if: github.event_name == 'schedule' || github.event_name == 'release' || matrix.python-version == '3.5' + shell: bash run: | pip install tensorflow~=2.1.0 pip install wheel/tensorflow_addons-*.whl @@ -84,25 +85,19 @@ jobs: name: Publish wheels to PyPi needs: [release-wheel, test-release-wheel, manylinux-cpu-release-test] runs-on: ubuntu-18.04 + strategy: + matrix: + os: ['macOS', 'Windows', 'Linux'] + python-version: ['3.5', '3.6', '3.7'] steps: - uses: actions/download-artifact@v1 + if: github.event_name == 'schedule' || github.event_name == 'release' || matrix.python-version == '3.5' with: - name: Linux-wheels - path: Linux-wheels - - uses: actions/download-artifact@v1 - with: - name: macOS-wheels - path: macOS-wheels - - uses: actions/download-artifact@v1 - with: - name: Windows-wheels - path: Windows-wheels - - run: | + name: ${{ runner.os }}-${{ matrix.python-version }}-wheel + path: ./dist + - if: github.event_name == 'schedule' || github.event_name == 'release' || matrix.python-version == '3.5' + run: | set -e -x - mkdir -p dist - cp Linux-wheels/*.whl dist/ - cp macOS-wheels/*.whl dist/ - cp Windows-wheels/*.whl dist/ ls -la dist/ sha256sum dist/*.whl - uses: pypa/gh-action-pypi-publish@master From f81f05c14972cf1a0d279704e70cc22b23bd4b99 Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Tue, 3 Mar 2020 14:52:58 +0100 Subject: [PATCH 7/7] Replaced gelu by lisht. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 21f1772d6d..02b1189524 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,7 +79,7 @@ jobs: run: | pip install tensorflow~=2.1.0 pip install wheel/tensorflow_addons-*.whl - python -c "import tensorflow_addons as tfa; print(tfa.activations.gelu(0.2))" + python -c "import tensorflow_addons as tfa; print(tfa.activations.lisht(0.2))" upload-wheels: name: Publish wheels to PyPi