From 5d4253a431db925d45138c6af861fd249662f357 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 12:19:03 -0700 Subject: [PATCH 01/21] Add Github Action to build package for PyPI --- .github/workflows/pythonpublish.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/pythonpublish.yaml diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml new file mode 100644 index 0000000..b36c568 --- /dev/null +++ b/.github/workflows/pythonpublish.yaml @@ -0,0 +1,28 @@ +name: Upload Python Package + +on: + push: + branches: "*" + # release: + # types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools setuptools-scm wheel twine + - name: Build and publish + # env: + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + # twine upload dist/* \ No newline at end of file From 6638d5884ac15ca5541cd4aa1fbfc1f17d2a27ab Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 12:24:44 -0700 Subject: [PATCH 02/21] Add cibuildwheel --- .github/workflows/pythonpublish.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index b36c568..1cc007f 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -18,11 +18,15 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools setuptools-scm wheel twine + pip install setuptools setuptools-scm cibuildwheel wheel twine - name: Build and publish - # env: + env: + CIBW_BEFORE_BUILD: "pip install -U numpy" + CIBW_SKIP: "cp27-* cp34-*" # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - python setup.py sdist bdist_wheel + python setup.py sdist -d wheelhouse + cibuildwheel --output-dir wheelhouse + # python setup.py sdist bdist_wheel # twine upload dist/* \ No newline at end of file From fc2ca538656f92557d83f8745ce2b13cbf587c49 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 12:25:48 -0700 Subject: [PATCH 03/21] Add NumPy to dependencies --- .github/workflows/pythonpublish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 1cc007f..2e85e04 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -18,7 +18,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools setuptools-scm cibuildwheel wheel twine + pip install setuptools setuptools-scm numpy cibuildwheel wheel twine - name: Build and publish env: CIBW_BEFORE_BUILD: "pip install -U numpy" From 38527acc3a4573426419450f7bad70b2dd1c78a2 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 12:27:45 -0700 Subject: [PATCH 04/21] Specify platform --- .github/workflows/pythonpublish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 2e85e04..b4de0a8 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -27,6 +27,6 @@ jobs: # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | python setup.py sdist -d wheelhouse - cibuildwheel --output-dir wheelhouse + cibuildwheel --platform linux --output-dir wheelhouse # python setup.py sdist bdist_wheel # twine upload dist/* \ No newline at end of file From e503b0ec79816800027dab0730f0e00f072f7d4b Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 12:32:53 -0700 Subject: [PATCH 05/21] List wheels --- .github/workflows/pythonpublish.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index b4de0a8..8be01d7 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -28,5 +28,8 @@ jobs: run: | python setup.py sdist -d wheelhouse cibuildwheel --platform linux --output-dir wheelhouse + - name: List wheels + run: | + ls -ltrh wheelhouse # python setup.py sdist bdist_wheel # twine upload dist/* \ No newline at end of file From 18ae482713ab3a434565d461e49b65073fcfa520 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 13:08:38 -0700 Subject: [PATCH 06/21] Use os matrix --- .github/workflows/pythonpublish.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 8be01d7..2c2827b 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -8,7 +8,10 @@ on: jobs: deploy: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v1 - name: Set up Python From c8f4c5c1e0cb1278c614e7cac31bc037c98d868a Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 13:18:54 -0700 Subject: [PATCH 07/21] Print runner context --- .github/workflows/pythonpublish.yaml | 48 +++++++++++++++------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 2c2827b..4324df7 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -13,26 +13,28 @@ jobs: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools setuptools-scm numpy cibuildwheel wheel twine - - name: Build and publish - env: - CIBW_BEFORE_BUILD: "pip install -U numpy" - CIBW_SKIP: "cp27-* cp34-*" - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist -d wheelhouse - cibuildwheel --platform linux --output-dir wheelhouse - - name: List wheels - run: | - ls -ltrh wheelhouse - # python setup.py sdist bdist_wheel - # twine upload dist/* \ No newline at end of file + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools setuptools-scm numpy cibuildwheel wheel twine + - name: Build and publish + env: + CIBW_BEFORE_BUILD: "pip install -U numpy" + CIBW_SKIP: "cp27-* cp34-*" + RUNNER_CONTEXT: ${{ toJson(runner) }} + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + echo "$RUNNER_CONTEXT" + python setup.py sdist -d wheelhouse + cibuildwheel --platform linux --output-dir wheelhouse + - name: List wheels + run: | + ls -ltrh wheelhouse + # python setup.py sdist bdist_wheel + # twine upload dist/* \ No newline at end of file From 058e4662f497c696ad584720e48921fb7f872970 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 13:27:02 -0700 Subject: [PATCH 08/21] Specify platform --- .github/workflows/pythonpublish.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 4324df7..fb6f254 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -26,13 +26,14 @@ jobs: env: CIBW_BEFORE_BUILD: "pip install -U numpy" CIBW_SKIP: "cp27-* cp34-*" - RUNNER_CONTEXT: ${{ toJson(runner) }} + RUNNER_OS: ${{ runner.os }} # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - echo "$RUNNER_CONTEXT" + echo "$RUNNER_OS" + echo "$RUNNER_OS" | awk '{ print tolower($1) }' python setup.py sdist -d wheelhouse - cibuildwheel --platform linux --output-dir wheelhouse + cibuildwheel --platform echo "$RUNNER_OS" | awk '{ print tolower($1) }' --output-dir wheelhouse - name: List wheels run: | ls -ltrh wheelhouse From 32e821ee3fa5f41e7d363033fc6a4a2c58859b30 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 13:29:10 -0700 Subject: [PATCH 09/21] Fix typo --- .github/workflows/pythonpublish.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index fb6f254..3395719 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -31,9 +31,10 @@ jobs: # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | echo "$RUNNER_OS" - echo "$RUNNER_OS" | awk '{ print tolower($1) }' + PLAT = `echo "$RUNNER_OS" | awk '{ print tolower($1) }'` + echo $PLAT python setup.py sdist -d wheelhouse - cibuildwheel --platform echo "$RUNNER_OS" | awk '{ print tolower($1) }' --output-dir wheelhouse + cibuildwheel --platform $PLAT --output-dir wheelhouse - name: List wheels run: | ls -ltrh wheelhouse From 24b4c015f51ff290b619c6fa8d84b3c9916af3a4 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 13:29:25 -0700 Subject: [PATCH 10/21] Remove spaces --- .github/workflows/pythonpublish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 3395719..c8b7bd4 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -31,7 +31,7 @@ jobs: # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | echo "$RUNNER_OS" - PLAT = `echo "$RUNNER_OS" | awk '{ print tolower($1) }'` + PLAT=`echo "$RUNNER_OS" | awk '{ print tolower($1) }'` echo $PLAT python setup.py sdist -d wheelhouse cibuildwheel --platform $PLAT --output-dir wheelhouse From 53d096402692c24fdf8c6914f01598ac095f62f3 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 14:28:52 -0700 Subject: [PATCH 11/21] Add windows --- .github/workflows/pythonpublish.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index c8b7bd4..a73380a 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -10,7 +10,7 @@ jobs: deploy: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v1 @@ -30,7 +30,6 @@ jobs: # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - echo "$RUNNER_OS" PLAT=`echo "$RUNNER_OS" | awk '{ print tolower($1) }'` echo $PLAT python setup.py sdist -d wheelhouse From d784046e8e91bb4d44387ca3669f51c9c6d796ba Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 14:33:20 -0700 Subject: [PATCH 12/21] Remove windows for the time being --- .github/workflows/pythonpublish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index a73380a..99826ae 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -10,7 +10,7 @@ jobs: deploy: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v1 From 4ef89b99204a72fc4abf0dce093888f7a20b40f3 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 14:48:36 -0700 Subject: [PATCH 13/21] Separate macos and linux --- .github/workflows/pythonpublish.yaml | 45 +++++++++++++++++++++------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 99826ae..04a9093 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -7,11 +7,8 @@ on: # types: [created] jobs: - deploy: - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} + deploy-linux: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Python @@ -21,19 +18,47 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools setuptools-scm numpy cibuildwheel wheel twine + python -m pip install setuptools setuptools-scm numpy cibuildwheel wheel twine - name: Build and publish env: CIBW_BEFORE_BUILD: "pip install -U numpy" CIBW_SKIP: "cp27-* cp34-*" - RUNNER_OS: ${{ runner.os }} # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - PLAT=`echo "$RUNNER_OS" | awk '{ print tolower($1) }'` - echo $PLAT + # PLAT=`echo "$RUNNER_OS" | awk '{ print tolower($1) }'` + # echo $PLAT python setup.py sdist -d wheelhouse - cibuildwheel --platform $PLAT --output-dir wheelhouse + python -m cibuildwheel --platform linux --output-dir wheelhouse + - name: List wheels + run: | + ls -ltrh wheelhouse + # python setup.py sdist bdist_wheel + # twine upload dist/* + + + deploy-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install setuptools setuptools-scm numpy cibuildwheel wheel twine + - name: Build and publish + env: + CIBW_BEFORE_BUILD: "sudo port install gcc6 +gfortran && pip install -U numpy" + CIBW_SKIP: "cp27-* cp34-*" + + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist -d wheelhouse + python -m cibuildwheel --platform macos --output-dir wheelhouse - name: List wheels run: | ls -ltrh wheelhouse From 8b44f189e262a87f54de4097eabe866e9b66f10e Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 14:57:16 -0700 Subject: [PATCH 14/21] install gcc --- .github/workflows/pythonpublish.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 04a9093..ff42d6d 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -47,11 +47,12 @@ jobs: python-version: '3.x' - name: Install dependencies run: | + brew install gcc python -m pip install --upgrade pip python -m pip install setuptools setuptools-scm numpy cibuildwheel wheel twine - name: Build and publish env: - CIBW_BEFORE_BUILD: "sudo port install gcc6 +gfortran && pip install -U numpy" + CIBW_BEFORE_BUILD: "pip install -U numpy" CIBW_SKIP: "cp27-* cp34-*" # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} From 40c8168d239bd9dddd5b188f368e52501d204559 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 15:02:34 -0700 Subject: [PATCH 15/21] Add windows build --- .github/workflows/pythonpublish.yaml | 33 ++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index ff42d6d..c2c4b15 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -22,7 +22,7 @@ jobs: - name: Build and publish env: CIBW_BEFORE_BUILD: "pip install -U numpy" - CIBW_SKIP: "cp27-* cp34-*" + CIBW_SKIP: "cp27-* cp34-* cp35-*" # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | @@ -53,13 +53,42 @@ jobs: - name: Build and publish env: CIBW_BEFORE_BUILD: "pip install -U numpy" - CIBW_SKIP: "cp27-* cp34-*" + CIBW_SKIP: "cp27-* cp34-* cp35-*" # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | python setup.py sdist -d wheelhouse python -m cibuildwheel --platform macos --output-dir wheelhouse + - name: List wheels + run: | + ls -ltrh wheelhouse + # python setup.py sdist bdist_wheel + # twine upload dist/* + + + deploy-windows: + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install setuptools setuptools-scm numpy cibuildwheel wheel twine + - name: Build and publish + env: + CIBW_BEFORE_BUILD: "pip install -U numpy" + CIBW_SKIP: "cp27-* cp34-* cp35-*" + + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist -d wheelhouse + python -m cibuildwheel --platform windows --output-dir wheelhouse - name: List wheels run: | ls -ltrh wheelhouse From f74f8ef1e0677c0549c8cef677af9998e65acff7 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 17 Dec 2019 15:06:41 -0700 Subject: [PATCH 16/21] Disable windows for the time being --- .github/workflows/pythonpublish.yaml | 52 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index c2c4b15..39b007f 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -67,30 +67,30 @@ jobs: # twine upload dist/* - deploy-windows: - runs-on: macos-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install setuptools setuptools-scm numpy cibuildwheel wheel twine - - name: Build and publish - env: - CIBW_BEFORE_BUILD: "pip install -U numpy" - CIBW_SKIP: "cp27-* cp34-* cp35-*" + # deploy-windows: + # runs-on: macos-latest + # steps: + # - uses: actions/checkout@v1 + # - name: Set up Python + # uses: actions/setup-python@v1 + # with: + # python-version: '3.x' + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # python -m pip install setuptools setuptools-scm numpy cibuildwheel wheel twine + # - name: Build and publish + # env: + # CIBW_BEFORE_BUILD: "pip install -U numpy" + # CIBW_SKIP: "cp27-* cp34-* cp35-*" - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist -d wheelhouse - python -m cibuildwheel --platform windows --output-dir wheelhouse - - name: List wheels - run: | - ls -ltrh wheelhouse - # python setup.py sdist bdist_wheel - # twine upload dist/* \ No newline at end of file + # # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + # run: | + # python setup.py sdist -d wheelhouse + # python -m cibuildwheel --platform windows --output-dir wheelhouse + # - name: List wheels + # run: | + # ls -ltrh wheelhouse + # # python setup.py sdist bdist_wheel + # # twine upload dist/* \ No newline at end of file From dab8e2f9974c67c2fdd27588941b3de50e233c33 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Fri, 20 Dec 2019 11:57:33 -0700 Subject: [PATCH 17/21] Add publishing job --- .github/workflows/pythonpublish.yaml | 52 ++++++++++++++++------------ 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 39b007f..4ef79c2 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -23,20 +23,13 @@ jobs: env: CIBW_BEFORE_BUILD: "pip install -U numpy" CIBW_SKIP: "cp27-* cp34-* cp35-*" - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | # PLAT=`echo "$RUNNER_OS" | awk '{ print tolower($1) }'` # echo $PLAT - python setup.py sdist -d wheelhouse - python -m cibuildwheel --platform linux --output-dir wheelhouse - - name: List wheels - run: | - ls -ltrh wheelhouse - # python setup.py sdist bdist_wheel - # twine upload dist/* - - + python setup.py sdist -d $GITHUB_WORKSPACE/wheelhouseLinux + python -m cibuildwheel --platform linux --output-dir $GITHUB_WORKSPACE/wheelhouseLinux + + deploy-macos: runs-on: macos-latest steps: @@ -54,19 +47,10 @@ jobs: env: CIBW_BEFORE_BUILD: "pip install -U numpy" CIBW_SKIP: "cp27-* cp34-* cp35-*" - - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist -d wheelhouse - python -m cibuildwheel --platform macos --output-dir wheelhouse - - name: List wheels run: | - ls -ltrh wheelhouse - # python setup.py sdist bdist_wheel - # twine upload dist/* + python -m cibuildwheel --platform macos --output-dir $GITHUB_WORKSPACE/wheelhouseMacOS + - # deploy-windows: # runs-on: macos-latest # steps: @@ -93,4 +77,26 @@ jobs: # run: | # ls -ltrh wheelhouse # # python setup.py sdist bdist_wheel - # # twine upload dist/* \ No newline at end of file + # # twine upload dist/* + + deploy: + needs: [deploy-linux, deploy-macos] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip twine + + - name: Publish + # env: + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + cd $GITHUB_WORKSPACE + ls -ltrh wheelhouseMacOS/ wheelhouseLinux/ + # twine upload dist/* \ No newline at end of file From 9e42a04f035b6633f15d9af11ff86bd45c1ea74c Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Fri, 20 Dec 2019 12:10:51 -0700 Subject: [PATCH 18/21] persist wheels --- .github/workflows/pythonpublish.yaml | 56 ++++++++++++---------------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 4ef79c2..059a086 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -19,7 +19,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install setuptools setuptools-scm numpy cibuildwheel wheel twine - - name: Build and publish + - name: Build env: CIBW_BEFORE_BUILD: "pip install -U numpy" CIBW_SKIP: "cp27-* cp34-* cp35-*" @@ -28,6 +28,12 @@ jobs: # echo $PLAT python setup.py sdist -d $GITHUB_WORKSPACE/wheelhouseLinux python -m cibuildwheel --platform linux --output-dir $GITHUB_WORKSPACE/wheelhouseLinux + + - name: Archive wheels + uses: actions/upload-artifact@v1 + with: + name: wheelhouseLinux + path: $GITHUB_WORKSPACE/wheelhouseLinux deploy-macos: @@ -43,42 +49,18 @@ jobs: brew install gcc python -m pip install --upgrade pip python -m pip install setuptools setuptools-scm numpy cibuildwheel wheel twine - - name: Build and publish + - name: Build env: CIBW_BEFORE_BUILD: "pip install -U numpy" CIBW_SKIP: "cp27-* cp34-* cp35-*" run: | python -m cibuildwheel --platform macos --output-dir $GITHUB_WORKSPACE/wheelhouseMacOS - - # deploy-windows: - # runs-on: macos-latest - # steps: - # - uses: actions/checkout@v1 - # - name: Set up Python - # uses: actions/setup-python@v1 - # with: - # python-version: '3.x' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install setuptools setuptools-scm numpy cibuildwheel wheel twine - # - name: Build and publish - # env: - # CIBW_BEFORE_BUILD: "pip install -U numpy" - # CIBW_SKIP: "cp27-* cp34-* cp35-*" - - # # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - # run: | - # python setup.py sdist -d wheelhouse - # python -m cibuildwheel --platform windows --output-dir wheelhouse - # - name: List wheels - # run: | - # ls -ltrh wheelhouse - # # python setup.py sdist bdist_wheel - # # twine upload dist/* - + - name: Archive wheels + uses: actions/upload-artifact@v1 + with: + name: wheelhouseMacOS + path: $GITHUB_WORKSPACE/wheelhouseMacOS deploy: needs: [deploy-linux, deploy-macos] runs-on: ubuntu-latest @@ -90,7 +72,17 @@ jobs: python-version: '3.x' - name: Install dependencies run: | - python -m pip install --upgrade pip twine + python -m pip install --upgrade pip twine + + - name: Download archived MacOS wheels + uses: actions/download-artifact@v1 + with: + name: wheelhouseMacOS + + - name: Download archived Linux wheels + uses: actions/download-artifact@v1 + with: + name: wheelhouseLinux - name: Publish # env: From 08f503218610cf1f95894abbbf67173297c3fafb Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Fri, 20 Dec 2019 12:16:04 -0700 Subject: [PATCH 19/21] Fix Path --- .github/workflows/pythonpublish.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 059a086..fee622d 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -26,14 +26,14 @@ jobs: run: | # PLAT=`echo "$RUNNER_OS" | awk '{ print tolower($1) }'` # echo $PLAT - python setup.py sdist -d $GITHUB_WORKSPACE/wheelhouseLinux - python -m cibuildwheel --platform linux --output-dir $GITHUB_WORKSPACE/wheelhouseLinux + python setup.py sdist -d wheelhouseLinux + python -m cibuildwheel --platform linux --output-dir wheelhouseLinux - name: Archive wheels uses: actions/upload-artifact@v1 with: name: wheelhouseLinux - path: $GITHUB_WORKSPACE/wheelhouseLinux + path: wheelhouseLinux deploy-macos: @@ -54,13 +54,13 @@ jobs: CIBW_BEFORE_BUILD: "pip install -U numpy" CIBW_SKIP: "cp27-* cp34-* cp35-*" run: | - python -m cibuildwheel --platform macos --output-dir $GITHUB_WORKSPACE/wheelhouseMacOS + python -m cibuildwheel --platform macos --output-dir wheelhouseMacOS - name: Archive wheels uses: actions/upload-artifact@v1 with: name: wheelhouseMacOS - path: $GITHUB_WORKSPACE/wheelhouseMacOS + path: wheelhouseMacOS deploy: needs: [deploy-linux, deploy-macos] runs-on: ubuntu-latest @@ -89,6 +89,5 @@ jobs: # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - cd $GITHUB_WORKSPACE ls -ltrh wheelhouseMacOS/ wheelhouseLinux/ # twine upload dist/* \ No newline at end of file From d0bdab5dd00c58d81f4c0867202766c9b6f4218d Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Fri, 20 Dec 2019 12:23:44 -0700 Subject: [PATCH 20/21] Final touch --- .github/workflows/pythonpublish.yaml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index fee622d..5f7a4ba 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -1,10 +1,8 @@ name: Upload Python Package on: - push: - branches: "*" - # release: - # types: [created] + release: + types: [created] jobs: deploy-linux: @@ -85,9 +83,9 @@ jobs: name: wheelhouseLinux - name: Publish - # env: - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | ls -ltrh wheelhouseMacOS/ wheelhouseLinux/ - # twine upload dist/* \ No newline at end of file + twine upload --skip-existing wheelhouseLinux/* wheelhouseMacOS/* \ No newline at end of file From 742ab08cf3825c88229de271abfe48d93789c2f0 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Fri, 20 Dec 2019 12:26:24 -0700 Subject: [PATCH 21/21] cleanup --- .github/workflows/pythonpublish.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 5f7a4ba..164fd92 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -22,8 +22,6 @@ jobs: CIBW_BEFORE_BUILD: "pip install -U numpy" CIBW_SKIP: "cp27-* cp34-* cp35-*" run: | - # PLAT=`echo "$RUNNER_OS" | awk '{ print tolower($1) }'` - # echo $PLAT python setup.py sdist -d wheelhouseLinux python -m cibuildwheel --platform linux --output-dir wheelhouseLinux @@ -88,4 +86,4 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | ls -ltrh wheelhouseMacOS/ wheelhouseLinux/ - twine upload --skip-existing wheelhouseLinux/* wheelhouseMacOS/* \ No newline at end of file + twine upload --skip-existing wheelhouseLinux/* wheelhouseMacOS/*