From 0a92768d9d4da3b279235c78fcc68b309cab140d Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Fri, 12 Jan 2024 18:56:58 +0100 Subject: [PATCH 01/41] add deploy actions --- .github/workflows/deploy.yml | 76 ++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..241399932 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,76 @@ +name: "Deploy Python Lib" +on: + release: + types: + - created + +permissions: + contents: read + pull-requests: read + +jobs: + develop-matrix: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python: ['3.9', '3.10', '3.11', '3.12'] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: Install lib + run: | + pip install --upgrade pip + pip install -e . + + - name: Build wheel + run: | + pip install setuptools + pip install wheel + python setup.py bdist_wheel + + - name: Archive build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-artifacts-${{ matrix.os }}-${{ matrix.python }} + path: dist + + deploy: + runs-on: ubuntu-latest + needs: develop-matrix + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install twine + run: | + pip install --upgrade pip + pip install twine + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true + + - name: Inspect dist files + run: | + ls -R dist + + - name: Upload to PyPI using twine + run: | + twine upload --skip-existing dist/* + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} From 645e8ef36f8ead2a9e714b7cb3cec0fb6b0694ca Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Fri, 12 Jan 2024 18:57:24 +0100 Subject: [PATCH 02/41] github actions: refactor actions.yml --- .github/workflows/{actions.yml => test.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{actions.yml => test.yml} (100%) diff --git a/.github/workflows/actions.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/actions.yml rename to .github/workflows/test.yml From 068229df0ff77e2adaefaae23d707176dd25f402 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Fri, 12 Jan 2024 18:57:58 +0100 Subject: [PATCH 03/41] github-actions: clean up test yaml --- .github/workflows/test.yml | 47 -------------------------------------- 1 file changed, 47 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a38d3603..5e6a07491 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,50 +37,3 @@ jobs: pip install matplotlib pip install pytest pytest GPy/testing - - - name: Build wheel - run: | - pip install setuptools - pip install wheel - python setup.py bdist_wheel - - - name: Archive build artifacts - uses: actions/upload-artifact@v4 - with: - name: build-artifacts-${{ matrix.os }}-${{ matrix.python }} - path: dist - - deploy: - runs-on: ubuntu-latest - needs: develop-matrix - # if: github.event_name == 'release' # && github.event.action == 'created' - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Install twine - run: | - pip install --upgrade pip - pip install twine - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - path: dist - merge-multiple: true - - - name: Inspect dist files - run: | - ls -R dist - - - name: Upload to PyPI using twine - run: | - twine upload --skip-existing dist/* - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} From af6f2861d8327a4afd7ea0be2a1820ef6f0a34e3 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Fri, 12 Jan 2024 23:12:06 +0100 Subject: [PATCH 04/41] github-actions: update linux image --- .github/workflows/deploy.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 241399932..2df8b4add 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,7 +12,15 @@ jobs: develop-matrix: strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ + quay.io/pypa/manylinux2014_x86_64 # replacement for ubuntu-latest, which is accepted on pypi + # quay.io/pypa/manylinux2014_i686 + # quay.io/pypa/manylinux2014_aarch64 + # quay.io/pypa/manylinux2014_ppc64le + # quay.io/pypa/manylinux2014_s390x, + windows-latest, + macos-latest + ] python: ['3.9', '3.10', '3.11', '3.12'] runs-on: ${{ matrix.os }} steps: From 2be3adf5c15a35f6c959e896644ef052f8f87937 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Fri, 12 Jan 2024 23:19:32 +0100 Subject: [PATCH 05/41] github-actions: add missing comma --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2df8b4add..9152c8a7a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ - quay.io/pypa/manylinux2014_x86_64 # replacement for ubuntu-latest, which is accepted on pypi + quay.io/pypa/manylinux2014_x86_64, # replacement for ubuntu-latest, which is accepted on pypi # quay.io/pypa/manylinux2014_i686 # quay.io/pypa/manylinux2014_aarch64 # quay.io/pypa/manylinux2014_ppc64le From 9a938ec9a121bfadad4d313868ee5ac3c6ddb23e Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Fri, 12 Jan 2024 23:24:16 +0100 Subject: [PATCH 06/41] github-actions: update to trigger deploy --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9152c8a7a..5dabcd074 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,7 @@ on: release: types: - created + pull_request: permissions: contents: read From b82b63b9829024d2b7bd9615004df97e330d6bec Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 09:59:50 +0100 Subject: [PATCH 07/41] github-actions: update deploy --- .github/workflows/deploy.yml | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5dabcd074..2d4ab8e78 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,44 +10,23 @@ permissions: pull-requests: read jobs: - develop-matrix: - strategy: - matrix: - os: [ - quay.io/pypa/manylinux2014_x86_64, # replacement for ubuntu-latest, which is accepted on pypi - # quay.io/pypa/manylinux2014_i686 - # quay.io/pypa/manylinux2014_aarch64 - # quay.io/pypa/manylinux2014_ppc64le - # quay.io/pypa/manylinux2014_s390x, - windows-latest, - macos-latest - ] - python: ['3.9', '3.10', '3.11', '3.12'] - runs-on: ${{ matrix.os }} + build: + runs-on: quay.io/pypa/manylinux2014_x86_64 steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - - name: Install lib + - name: Build wheel files run: | - pip install --upgrade pip - pip install -e . + python3.9 setup.py bdist_wheel - - name: Build wheel - run: | - pip install setuptools - pip install wheel - python setup.py bdist_wheel + - name: List contents of dist + run: ls dist - name: Archive build artifacts uses: actions/upload-artifact@v4 with: - name: build-artifacts-${{ matrix.os }}-${{ matrix.python }} + name: build-artifacts-none-any path: dist deploy: From 2131d9641dcd14fa90d5e2b60efc4bd6d3382018 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 10:02:19 +0100 Subject: [PATCH 08/41] github-actions: fix deplox job needs --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2d4ab8e78..cbf5ac7a4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,7 +31,7 @@ jobs: deploy: runs-on: ubuntu-latest - needs: develop-matrix + needs: build steps: - name: Checkout uses: actions/checkout@v4 From 3f4ac6b83caae18806a19f5b0baca0777f35362f Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 12:03:36 +0100 Subject: [PATCH 09/41] update deploy job to run on container --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cbf5ac7a4..7b1c937c6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,23 +11,43 @@ permissions: jobs: build: - runs-on: quay.io/pypa/manylinux2014_x86_64 + runs-on: ubuntu-latest + container: + image: quay.io/pypa/manylinux2014_x86_64 + steps: - name: Checkout uses: actions/checkout@v4 + - name: Build c stuff + run: | + /opt/python/cp39-cp39/bin/python3.9 setup.py develop + /opt/python/cp310-cp310/bin/python3.10 setup.py develop + /opt/python/cp311-cp311/bin/python3.11 setup.py develop + - name: Build wheel files run: | - python3.9 setup.py bdist_wheel + /opt/python/cp39-cp39/bin/python3.9 setup.py bdist_wheel + /opt/python/cp310-cp310/bin/python3.10 setup.py bdist_wheel + /opt/python/cp311-cp311/bin/python3.11 setup.py bdist_wheel + + - name: Repair wheel files + run: | + /opt/python/cp39-cp39/bin/auditwheel repair dist/*cp39-cp39-linux_x86_64.whl + /opt/python/cp310-cp310/bin/auditwheel repair dist/*cp310-cp310-linux_x86_64.whl + /opt/python/cp311-cp311/bin/auditwheel repair dist/*cp311-cp311-linux_x86_64.whl - name: List contents of dist - run: ls dist + run: ls -R dist + + - name: List contests of wheelhouse + run: ls -R wheelhouse - name: Archive build artifacts uses: actions/upload-artifact@v4 with: name: build-artifacts-none-any - path: dist + path: wheelhouse deploy: runs-on: ubuntu-latest @@ -49,16 +69,16 @@ jobs: - name: Download build artifacts uses: actions/download-artifact@v4 with: - path: dist + path: wheelhouse merge-multiple: true - - name: Inspect dist files + - name: Inspect wheelhouse files run: | - ls -R dist + ls -R wheelhouse - name: Upload to PyPI using twine run: | - twine upload --skip-existing dist/* + twine upload --skip-existing wheelhouse/* env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} From 52f58e111d7379e21d0761e9911f826c846048ca Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 12:07:47 +0100 Subject: [PATCH 10/41] github-actions: update deploy jobs --- .github/workflows/deploy.yml | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7b1c937c6..d81fc0ee0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,21 +21,24 @@ jobs: - name: Build c stuff run: | - /opt/python/cp39-cp39/bin/python3.9 setup.py develop - /opt/python/cp310-cp310/bin/python3.10 setup.py develop - /opt/python/cp311-cp311/bin/python3.11 setup.py develop + /opt/python/cp39-cp39/bin/python setup.py develop + /opt/python/cp310-cp310/bin/python setup.py develop + /opt/python/cp311-cp311/bin/python setup.py develop + /opt/python/cp312-cp312/bin/python setup.py develop - name: Build wheel files run: | - /opt/python/cp39-cp39/bin/python3.9 setup.py bdist_wheel - /opt/python/cp310-cp310/bin/python3.10 setup.py bdist_wheel - /opt/python/cp311-cp311/bin/python3.11 setup.py bdist_wheel + /opt/python/cp39-cp39/bin/python setup.py bdist_wheel + /opt/python/cp310-cp310/bin/python setup.py bdist_wheel + /opt/python/cp311-cp311/bin/python setup.py bdist_wheel + /opt/python/cp312-cp312/bin/python setup.py bdist_wheel - name: Repair wheel files run: | /opt/python/cp39-cp39/bin/auditwheel repair dist/*cp39-cp39-linux_x86_64.whl /opt/python/cp310-cp310/bin/auditwheel repair dist/*cp310-cp310-linux_x86_64.whl /opt/python/cp311-cp311/bin/auditwheel repair dist/*cp311-cp311-linux_x86_64.whl + /opt/python/cp312-cp312/bin/auditwheel repair dist/*cp312-cp312-linux_x86_64.whl - name: List contents of dist run: ls -R dist @@ -66,16 +69,31 @@ jobs: pip install --upgrade pip pip install twine - - name: Download build artifacts + - name: Download build artifacts for windows and mac wheels + uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true + + - name: Download build artifacts for manylinux wheels uses: actions/download-artifact@v4 with: path: wheelhouse merge-multiple: true + - name: Inspect dist files + run: | + ls -R dist + - name: Inspect wheelhouse files run: | ls -R wheelhouse + - name: Merge wheel files + run: | + cp dist/* wheelhouse/ + ls -R wheelhouse + - name: Upload to PyPI using twine run: | twine upload --skip-existing wheelhouse/* From 18fe856499af44dd0f29ed3040e5c83cd9128b73 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 12:18:52 +0100 Subject: [PATCH 11/41] github-actions: downgrade deploy checkout to v3 for linux container jobs --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d81fc0ee0..0d1a89570 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Build c stuff run: | From cb4e6b79b0fe02a7a466ace90add6ae545ff2044 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 12:53:19 +0100 Subject: [PATCH 12/41] github-actions: deploy: update auditwheel call --- .github/workflows/deploy.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0d1a89570..3353daa6b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Build c stuff + - name: Compile c headers run: | /opt/python/cp39-cp39/bin/python setup.py develop /opt/python/cp310-cp310/bin/python setup.py develop @@ -35,10 +35,10 @@ jobs: - name: Repair wheel files run: | - /opt/python/cp39-cp39/bin/auditwheel repair dist/*cp39-cp39-linux_x86_64.whl - /opt/python/cp310-cp310/bin/auditwheel repair dist/*cp310-cp310-linux_x86_64.whl - /opt/python/cp311-cp311/bin/auditwheel repair dist/*cp311-cp311-linux_x86_64.whl - /opt/python/cp312-cp312/bin/auditwheel repair dist/*cp312-cp312-linux_x86_64.whl + /opt/python/cp39-cp39/bin/python -m auditwheel repair dist/*cp39-cp39-linux_x86_64.whl + /opt/python/cp310-cp310/bin/python -m auditwheel repair dist/*cp310-cp310-linux_x86_64.whl + /opt/python/cp311-cp311/bin/python -m auditwheel repair dist/*cp311-cp311-linux_x86_64.whl + /opt/python/cp312-cp312/bin/python -m auditwheel repair dist/*cp312-cp312-linux_x86_64.whl - name: List contents of dist run: ls -R dist From 9d56b1c84d80519db45b1860d0a3207a30b63b79 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 13:01:29 +0100 Subject: [PATCH 13/41] github-actions: add auditwheel install --- .github/workflows/deploy.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3353daa6b..63b2c26c7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,6 +33,13 @@ jobs: /opt/python/cp311-cp311/bin/python setup.py bdist_wheel /opt/python/cp312-cp312/bin/python setup.py bdist_wheel + - name: Install auditwheel # this should be available?! + run: | + /opt/python/cp39-cp39/bin/python -m pip install auditwheel + /opt/python/cp310-cp310/bin/python -m pip install auditwheel + /opt/python/cp311-cp311/bin/python -m pip install auditwheel + /opt/python/cp312-cp312/bin/python -m pip install auditwheel + - name: Repair wheel files run: | /opt/python/cp39-cp39/bin/python -m auditwheel repair dist/*cp39-cp39-linux_x86_64.whl From 2e9d4225500317cef56127d6a9b028fdab72261c Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 13:10:45 +0100 Subject: [PATCH 14/41] github-actions: bump upload-artifacts to v3 for linux job --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 63b2c26c7..15bdb2299 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -54,7 +54,7 @@ jobs: run: ls -R wheelhouse - name: Archive build artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: build-artifacts-none-any path: wheelhouse From 793a5a269d61ec1761dbdf82d8a9c724288e1d28 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 13:28:03 +0100 Subject: [PATCH 15/41] github-actions: deploy add fix artifacts --- .github/workflows/deploy.yml | 49 ++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 15bdb2299..3bfe136cd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,37 @@ permissions: pull-requests: read jobs: - build: + build-windows-and-mac: + strategy: + matrix: + os: [windows-latest, macos-latest] + python: ['3.9', '3.10', '3.11', '3.12'] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: Build lib + run: | + pip install wheel + python setup.py develop + python setup.py bdist_wheel + + - name: List contents of dist + run: ls -R dist + + - name: Archive build artifacts + uses: actions/upload-artifact@v4 + with: + name: dist-artifacts + path: dist + + build-linux: runs-on: ubuntu-latest container: image: quay.io/pypa/manylinux2014_x86_64 @@ -56,12 +86,12 @@ jobs: - name: Archive build artifacts uses: actions/upload-artifact@v3 with: - name: build-artifacts-none-any + name: wheelhouse-artifacts path: wheelhouse deploy: runs-on: ubuntu-latest - needs: build + needs: [build-linux, build-windows-and-mac] steps: - name: Checkout uses: actions/checkout@v4 @@ -79,22 +109,20 @@ jobs: - name: Download build artifacts for windows and mac wheels uses: actions/download-artifact@v4 with: - path: dist + path: dist-artifacts merge-multiple: true - name: Download build artifacts for manylinux wheels uses: actions/download-artifact@v4 with: - path: wheelhouse + path: wheelhouse-artifacts merge-multiple: true - name: Inspect dist files - run: | - ls -R dist + run: ls -R dist - name: Inspect wheelhouse files - run: | - ls -R wheelhouse + run: ls -R wheelhouse - name: Merge wheel files run: | @@ -102,8 +130,7 @@ jobs: ls -R wheelhouse - name: Upload to PyPI using twine - run: | - twine upload --skip-existing wheelhouse/* + run: twine upload --skip-existing wheelhouse/* env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} From c9897a512fcc2f35440627b19e9832a306c04425 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 13:30:53 +0100 Subject: [PATCH 16/41] github-actions: add setuptools install --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3bfe136cd..5e3e2e9a4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,6 +27,7 @@ jobs: - name: Build lib run: | + pip install setuptools pip install wheel python setup.py develop python setup.py bdist_wheel From e0685cfc19817a6321cb975148eec8f929f00e66 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 13:43:19 +0100 Subject: [PATCH 17/41] github-actions: fix build-windows-and-mac --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5e3e2e9a4..8e9445841 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,7 +38,7 @@ jobs: - name: Archive build artifacts uses: actions/upload-artifact@v4 with: - name: dist-artifacts + name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} path: dist build-linux: @@ -110,13 +110,13 @@ jobs: - name: Download build artifacts for windows and mac wheels uses: actions/download-artifact@v4 with: - path: dist-artifacts + path: dist merge-multiple: true - name: Download build artifacts for manylinux wheels uses: actions/download-artifact@v4 with: - path: wheelhouse-artifacts + path: wheelhouse merge-multiple: true - name: Inspect dist files From d838c98591bbfff467154c6a14597c0b291ffaae Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 13:52:27 +0100 Subject: [PATCH 18/41] github-actions: remove python3.9 from mac build --- .github/workflows/deploy.yml | 37 +++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8e9445841..1d95afdc0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,10 +10,10 @@ permissions: pull-requests: read jobs: - build-windows-and-mac: + build-windows: strategy: matrix: - os: [windows-latest, macos-latest] + os: [windows-latest] python: ['3.9', '3.10', '3.11', '3.12'] runs-on: ${{ matrix.os }} steps: @@ -41,6 +41,37 @@ jobs: name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} path: dist + build-mac: + strategy: + matrix: + os: [macos-latest] + python: ['3.10', '3.11', '3.12'] # 3.9 triggers scipy issues when installing + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: Build lib + run: | + pip install setuptools + pip install wheel + python setup.py develop + python setup.py bdist_wheel + + - name: List contents of dist + run: ls -R dist + + - name: Archive build artifacts + uses: actions/upload-artifact@v4 + with: + name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} + path: dist + build-linux: runs-on: ubuntu-latest container: @@ -92,7 +123,7 @@ jobs: deploy: runs-on: ubuntu-latest - needs: [build-linux, build-windows-and-mac] + needs: [build-linux, build-windows, build-mac] steps: - name: Checkout uses: actions/checkout@v4 From dd44638ea045249a8363a64c2fc4cf6448ac5e07 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 14:26:47 +0100 Subject: [PATCH 19/41] github-actions: try outputs --- .github/workflows/deploy.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1d95afdc0..772b0ddc7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -76,6 +76,9 @@ jobs: runs-on: ubuntu-latest container: image: quay.io/pypa/manylinux2014_x86_64 + + outputs: + wheelhouse: ${{ steps.upload.outputs.wheelhouse }} steps: - name: Checkout @@ -138,29 +141,15 @@ jobs: pip install --upgrade pip pip install twine - - name: Download build artifacts for windows and mac wheels - uses: actions/download-artifact@v4 - with: - path: dist - merge-multiple: true - - - name: Download build artifacts for manylinux wheels + - name: Download build artifacts uses: actions/download-artifact@v4 with: path: wheelhouse merge-multiple: true - - name: Inspect dist files - run: ls -R dist - - name: Inspect wheelhouse files run: ls -R wheelhouse - - name: Merge wheel files - run: | - cp dist/* wheelhouse/ - ls -R wheelhouse - - name: Upload to PyPI using twine run: twine upload --skip-existing wheelhouse/* env: From 96611b7099dfddf756fd4687ccf1e5bd54f3d090 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 14:39:54 +0100 Subject: [PATCH 20/41] github-actions. trying to fix artifacts --- .github/workflows/deploy.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 772b0ddc7..d73437b84 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -141,6 +141,13 @@ jobs: pip install --upgrade pip pip install twine + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + path: wheelhouse + name: wheelhouse-artifacts + merge-multiple: true + - name: Download build artifacts uses: actions/download-artifact@v4 with: @@ -150,8 +157,8 @@ jobs: - name: Inspect wheelhouse files run: ls -R wheelhouse - - name: Upload to PyPI using twine - run: twine upload --skip-existing wheelhouse/* - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + # - name: Upload to PyPI using twine + # run: twine upload --skip-existing wheelhouse/* + # env: + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} From 180b29e2c736d6e6c83da4a99a1353a71c9af145 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 14:56:20 +0100 Subject: [PATCH 21/41] github-actions: explore artifacts --- .github/workflows/deploy.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d73437b84..b3d83d5d7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -76,9 +76,6 @@ jobs: runs-on: ubuntu-latest container: image: quay.io/pypa/manylinux2014_x86_64 - - outputs: - wheelhouse: ${{ steps.upload.outputs.wheelhouse }} steps: - name: Checkout @@ -145,14 +142,7 @@ jobs: uses: actions/download-artifact@v4 with: path: wheelhouse - name: wheelhouse-artifacts - merge-multiple: true - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - path: wheelhouse - merge-multiple: true + # merge-multiple: true - name: Inspect wheelhouse files run: ls -R wheelhouse From 6bb610e5cb7e9690700eec3a4f21395db0028ad7 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 15:19:04 +0100 Subject: [PATCH 22/41] github-actions: update deploy to explore artifacts --- .github/workflows/deploy.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b3d83d5d7..5b29eec64 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -118,7 +118,7 @@ jobs: - name: Archive build artifacts uses: actions/upload-artifact@v3 with: - name: wheelhouse-artifacts + name: wheelhouse-artifacts-linux path: wheelhouse deploy: @@ -138,14 +138,21 @@ jobs: pip install --upgrade pip pip install twine - - name: Download build artifacts + - name: Download linux build artifacts uses: actions/download-artifact@v4 with: - path: wheelhouse - # merge-multiple: true + name: wheelhouse-artifacts-linux + path: wheelhouse-linux + + - name: Download windows and mac build artifacts + uses: actions/download-artifact@v4 + with: + path: dist - name: Inspect wheelhouse files - run: ls -R wheelhouse + run: | + ls -R wheelhouse-linux + ls -R dist # - name: Upload to PyPI using twine # run: twine upload --skip-existing wheelhouse/* From bdd9c505a21970d4aaf919db9d5710204f13d77a Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 16:09:38 +0100 Subject: [PATCH 23/41] github-actions: update artifacts usage --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5b29eec64..509f8f0d7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -141,7 +141,7 @@ jobs: - name: Download linux build artifacts uses: actions/download-artifact@v4 with: - name: wheelhouse-artifacts-linux + # name: wheelhouse-artifacts-linux path: wheelhouse-linux - name: Download windows and mac build artifacts From a1856c416df81c822fc175f1a9e539511ecffdc0 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 18:21:44 +0100 Subject: [PATCH 24/41] github-actions: still experimenting with getting the artifacts from the linux job --- .github/workflows/deploy.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 509f8f0d7..c877b143e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -137,21 +137,15 @@ jobs: run: | pip install --upgrade pip pip install twine - - - name: Download linux build artifacts - uses: actions/download-artifact@v4 - with: - # name: wheelhouse-artifacts-linux - path: wheelhouse-linux - - - name: Download windows and mac build artifacts + + - name: Download all artifacts to a specific directory uses: actions/download-artifact@v4 with: path: dist + merge-multiple: true - - name: Inspect wheelhouse files + - name: Inspect wheel files run: | - ls -R wheelhouse-linux ls -R dist # - name: Upload to PyPI using twine From 9df3490b0116e4574e4fefeb52e9e0bb67384fa2 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 18:29:53 +0100 Subject: [PATCH 25/41] github-actions: add sdist build for windows jobs --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c877b143e..42ea7aabc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,6 +31,7 @@ jobs: pip install wheel python setup.py develop python setup.py bdist_wheel + python setup.py sdist bdist_wheel - name: List contents of dist run: ls -R dist From 61d767a2ea30b012ef9872b81c589cd07b78bdd4 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 18:38:48 +0100 Subject: [PATCH 26/41] github-actions: parallelize manylinux deploy --- .github/workflows/deploy.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 42ea7aabc..8b4eb9a0d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -74,6 +74,9 @@ jobs: path: dist build-linux: + strategy: + matrix: + python: ['cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312'] runs-on: ubuntu-latest container: image: quay.io/pypa/manylinux2014_x86_64 @@ -84,31 +87,19 @@ jobs: - name: Compile c headers run: | - /opt/python/cp39-cp39/bin/python setup.py develop - /opt/python/cp310-cp310/bin/python setup.py develop - /opt/python/cp311-cp311/bin/python setup.py develop - /opt/python/cp312-cp312/bin/python setup.py develop + /opt/python/${{ matrix.python }}/bin/python setup.py develop - name: Build wheel files run: | - /opt/python/cp39-cp39/bin/python setup.py bdist_wheel - /opt/python/cp310-cp310/bin/python setup.py bdist_wheel - /opt/python/cp311-cp311/bin/python setup.py bdist_wheel - /opt/python/cp312-cp312/bin/python setup.py bdist_wheel + /opt/python/${{ matrix.python }}/bin/python setup.py bdist_wheel - name: Install auditwheel # this should be available?! run: | - /opt/python/cp39-cp39/bin/python -m pip install auditwheel - /opt/python/cp310-cp310/bin/python -m pip install auditwheel - /opt/python/cp311-cp311/bin/python -m pip install auditwheel - /opt/python/cp312-cp312/bin/python -m pip install auditwheel + /opt/python/${{ matrix.python }}/bin/python -m pip install auditwheel - name: Repair wheel files run: | - /opt/python/cp39-cp39/bin/python -m auditwheel repair dist/*cp39-cp39-linux_x86_64.whl - /opt/python/cp310-cp310/bin/python -m auditwheel repair dist/*cp310-cp310-linux_x86_64.whl - /opt/python/cp311-cp311/bin/python -m auditwheel repair dist/*cp311-cp311-linux_x86_64.whl - /opt/python/cp312-cp312/bin/python -m auditwheel repair dist/*cp312-cp312-linux_x86_64.whl + /opt/python/${{ matrix.python }}/bin/python -m auditwheel repair dist/*${{ matrix.python }}-linux_x86_64.whl - name: List contents of dist run: ls -R dist @@ -116,11 +107,20 @@ jobs: - name: List contests of wheelhouse run: ls -R wheelhouse + - name: Move wheelhouse wheel files to dist + run: | + rm dist/* + mv wheelhouse/* dist/ + rmdir wheelhouse + + - name: List contents of dist + run: ls -R dist + - name: Archive build artifacts uses: actions/upload-artifact@v3 with: - name: wheelhouse-artifacts-linux - path: wheelhouse + name: dist-artifacts-manylinux-${{ matrix.python }} + path: dist deploy: runs-on: ubuntu-latest From 06217ee6ea14346c19ebfbee7b273c8631364679 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 18:46:48 +0100 Subject: [PATCH 27/41] github-actions: downgrade globally to download/upload-artifact@v3 --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8b4eb9a0d..6146e8a89 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,7 +37,7 @@ jobs: run: ls -R dist - name: Archive build artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} path: dist @@ -68,7 +68,7 @@ jobs: run: ls -R dist - name: Archive build artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} path: dist @@ -140,7 +140,7 @@ jobs: pip install twine - name: Download all artifacts to a specific directory - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: path: dist merge-multiple: true From a02341f74be116592a2852d0b1df233aa0a6ccbc Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 18:53:05 +0100 Subject: [PATCH 28/41] github-actions: add wildcarn-pattern to upload artifact --- .github/workflows/deploy.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6146e8a89..3006c11f4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -71,7 +71,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} - path: dist + path: dist/* build-linux: strategy: @@ -120,7 +120,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: dist-artifacts-manylinux-${{ matrix.python }} - path: dist + path: dist/* deploy: runs-on: ubuntu-latest @@ -143,7 +143,6 @@ jobs: uses: actions/download-artifact@v3 with: path: dist - merge-multiple: true - name: Inspect wheel files run: | From 06b425edb230b259cfc2d57d87a3010732abdd7c Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 18:53:22 +0100 Subject: [PATCH 29/41] github-actions: update test jobs --- .github/workflows/test.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e6a07491..c4a906efa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,13 +27,16 @@ jobs: with: python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + pip install setuptools + pip install matplotlib + pip install pytest + - name: Install lib run: | - pip install --upgrade pip - pip install -e . + python setup.py develop - name: pytest run: | - pip install matplotlib - pip install pytest pytest GPy/testing From 05b4a70785f6fcdf1fecf4a8bbfc80d577fc7754 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 19:01:40 +0100 Subject: [PATCH 30/41] github-actions: update jobs --- .../{deploy.yml => test-and-deploy.yml} | 53 +++++++++++++++---- .github/workflows/test.yml | 42 --------------- 2 files changed, 42 insertions(+), 53 deletions(-) rename .github/workflows/{deploy.yml => test-and-deploy.yml} (77%) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/test-and-deploy.yml similarity index 77% rename from .github/workflows/deploy.yml rename to .github/workflows/test-and-deploy.yml index 3006c11f4..d75d763e7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -1,8 +1,10 @@ -name: "Deploy Python Lib" +name: "Test Python Lib" on: - release: - types: - - created + push: + branches: + - main + - devel + - deploy pull_request: permissions: @@ -10,6 +12,35 @@ permissions: pull-requests: read jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python: ['3.9', '3.10', '3.11', '3.12'] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: Install dependencies + run: | + pip install setuptools + pip install matplotlib + pip install pytest + + - name: Install lib + run: | + python setup.py develop + + - name: pytest + run: | + pytest GPy/testing + build-windows: strategy: matrix: @@ -124,7 +155,7 @@ jobs: deploy: runs-on: ubuntu-latest - needs: [build-linux, build-windows, build-mac] + needs: [test, build-linux, build-windows, build-mac] steps: - name: Checkout uses: actions/checkout@v4 @@ -138,7 +169,7 @@ jobs: run: | pip install --upgrade pip pip install twine - + - name: Download all artifacts to a specific directory uses: actions/download-artifact@v3 with: @@ -148,8 +179,8 @@ jobs: run: | ls -R dist - # - name: Upload to PyPI using twine - # run: twine upload --skip-existing wheelhouse/* - # env: - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + - name: Upload to PyPI using twine + run: twine upload --skip-existing wheelhouse/* + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index c4a906efa..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: "Test Python Lib" -on: - push: - branches: - - main - - devel - - deploy - pull_request: - -permissions: - contents: read - pull-requests: read - -jobs: - develop-matrix: - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python: ['3.9', '3.10', '3.11', '3.12'] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - - name: Install dependencies - run: | - pip install setuptools - pip install matplotlib - pip install pytest - - - name: Install lib - run: | - python setup.py develop - - - name: pytest - run: | - pytest GPy/testing From 0d5fecc6a38178d42ca207cd23b902b0136a145a Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sat, 13 Jan 2024 19:08:31 +0100 Subject: [PATCH 31/41] github-actions: remove macos python3.9 test job --- .github/workflows/test-and-deploy.yml | 65 +++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index d75d763e7..f1ad849a8 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -12,10 +12,39 @@ permissions: pull-requests: read jobs: - test: + test-windows: strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [windows-latest] + python: ['3.9', '3.10', '3.11', '3.12'] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: Install dependencies + run: | + pip install setuptools + pip install matplotlib + pip install pytest + + - name: Install lib + run: | + python setup.py develop + + - name: pytest + run: | + pytest GPy/testing + + test-linux: + strategy: + matrix: + os: [ubuntu-latest] python: ['3.9', '3.10', '3.11', '3.12'] runs-on: ${{ matrix.os }} steps: @@ -40,6 +69,34 @@ jobs: - name: pytest run: | pytest GPy/testing + test-macos: + strategy: + matrix: + os: [macos-latest] + python: ['3.10', '3.11', '3.12'] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: Install dependencies + run: | + pip install setuptools + pip install matplotlib + pip install pytest + + - name: Install lib + run: | + python setup.py develop + + - name: pytest + run: | + pytest GPy/testing build-windows: strategy: @@ -73,7 +130,7 @@ jobs: name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} path: dist - build-mac: + build-macos: strategy: matrix: os: [macos-latest] @@ -155,7 +212,7 @@ jobs: deploy: runs-on: ubuntu-latest - needs: [test, build-linux, build-windows, build-mac] + needs: [test-windows, test-linux, test-macos, build-linux, build-windows, build-macos] steps: - name: Checkout uses: actions/checkout@v4 From d5724d521a4cf95420f7cf0b66e587c6dc8565a2 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 14 Jan 2024 19:06:18 +0100 Subject: [PATCH 32/41] deactivate broken test --- GPy/testing/test_model.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPy/testing/test_model.py b/GPy/testing/test_model.py index 0cab39c9f..57bc7a455 100644 --- a/GPy/testing/test_model.py +++ b/GPy/testing/test_model.py @@ -31,6 +31,9 @@ def test_setXY(self): assert m.checkgrad() m.predict(m.X) + @pytest.skip( + "numpy.linalg.LinAlgError: no not positive definite, even with jitter" + ) # TODO: fix def test_raw_predict_numerical_stability(self): """ Test whether the predicted variance of normal GP goes negative under numerical unstable situation. From 986bc5b84ef134b84c9bf095eaf8a02fb5685c83 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 14 Jan 2024 19:10:42 +0100 Subject: [PATCH 33/41] testing: refactor test-model class due to naming confusion with pytest --- GPy/testing/test_rv_transformation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GPy/testing/test_rv_transformation.py b/GPy/testing/test_rv_transformation.py index 72aab90d0..403d4c171 100644 --- a/GPy/testing/test_rv_transformation.py +++ b/GPy/testing/test_rv_transformation.py @@ -9,13 +9,13 @@ import GPy -class TestModel(GPy.core.Model): +class Model(GPy.core.Model): """ A simple GPy model with one parameter. """ def __init__(self, theta=1.0): - super(TestModel, self).__init__("test_model") + super(Model, self).__init__("test_model") theta = GPy.core.Param("theta", theta) self.link_parameter(theta) @@ -25,7 +25,7 @@ def log_likelihood(self): class TestRVTransformation: def _test_trans(self, trans): - m = TestModel() + m = Model() prior = GPy.priors.LogGaussian(0.5, 0.1) m.theta.set_prior(prior) m.theta.unconstrain() @@ -57,7 +57,7 @@ def _test_trans(self, trans): def _test_grad(self, trans): np.random.seed(1234) - m = TestModel(np.random.uniform(0.5, 1.5, 20)) + m = Model(np.random.uniform(0.5, 1.5, 20)) prior = GPy.priors.LogGaussian(0.5, 0.1) m.theta.set_prior(prior) m.theta.constrain(trans) From b095741688c05ba307cdc788d1587c089b01b6c6 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 14 Jan 2024 19:21:16 +0100 Subject: [PATCH 34/41] fix wrong skip test usage --- GPy/testing/test_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/testing/test_model.py b/GPy/testing/test_model.py index 57bc7a455..954bffe96 100644 --- a/GPy/testing/test_model.py +++ b/GPy/testing/test_model.py @@ -31,7 +31,7 @@ def test_setXY(self): assert m.checkgrad() m.predict(m.X) - @pytest.skip( + @pytest.mark.skip( "numpy.linalg.LinAlgError: no not positive definite, even with jitter" ) # TODO: fix def test_raw_predict_numerical_stability(self): From 1739cd7dbe7f6d1ae6e550efdfeb47191ce13da7 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 14 Jan 2024 19:30:26 +0100 Subject: [PATCH 35/41] fix maximum scipy version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c9b11c9f6..ae4e84299 100644 --- a/setup.py +++ b/setup.py @@ -147,7 +147,7 @@ def ismac(): ] # 'some-pkg @ git+ssh://git@github.com/someorgname/pkg-repo-name@v1.1#egg=some-pkg', matplotlib_version = "matplotlib==3.3.4" -install_requirements += ["scipy>=1.3.0"] +install_requirements += ["scipy>=1.3.0,<1.12.0"] setup( name="GPy", From f889a2c58bebb09008a902885123b8a5ec19ac5a Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 14 Jan 2024 19:54:36 +0100 Subject: [PATCH 36/41] github-actions: fix twine upload directory --- .github/workflows/test-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index f1ad849a8..e163f245b 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -237,7 +237,7 @@ jobs: ls -R dist - name: Upload to PyPI using twine - run: twine upload --skip-existing wheelhouse/* + run: twine upload --skip-existing dist/* env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} From 948a82cf5bc963e968b586dc28eb04f251ce3663 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 14 Jan 2024 20:53:31 +0100 Subject: [PATCH 37/41] github-actions: move directories out of their subfolders --- .github/workflows/test-and-deploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index e163f245b..04ed07071 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -130,6 +130,11 @@ jobs: name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} path: dist + # Output the artifact name for later use + - name: Set output + id: set_output + run: echo "dist-artifacts-${{ matrix.os }}-${{ matrix.python }}" >> $GITHUB_ENV + build-macos: strategy: matrix: @@ -161,6 +166,11 @@ jobs: name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} path: dist/* + # Output the artifact name for later use + - name: Set output + id: set_output + run: echo "dist-artifacts-${{ matrix.os }}-${{ matrix.python }}" >> $GITHUB_ENV + build-linux: strategy: matrix: @@ -210,6 +220,11 @@ jobs: name: dist-artifacts-manylinux-${{ matrix.python }} path: dist/* + # Output the artifact name for later use + - name: Set output + id: set_output + run: echo "dist-artifacts-manylinux-${{ matrix.python }}" >> $GITHUB_ENV + deploy: runs-on: ubuntu-latest needs: [test-windows, test-linux, test-macos, build-linux, build-windows, build-macos] @@ -232,6 +247,15 @@ jobs: with: path: dist + - name: Get artifact names + run: | + # Read the artifact_name output from the build job + ARTIFACT_NAME=$(grep 'artifact_name=' $GITHUB_ENV | cut -d= -f2) + + # Download artifacts without additional subdirectories + mkdir -p dist + mv dist/$ARTIFACT_NAME/* dist/ + - name: Inspect wheel files run: | ls -R dist From 21005146c1946bda6d3b5dbd27fec9875f038201 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 14 Jan 2024 22:56:06 +0100 Subject: [PATCH 38/41] github-actions: use printf instead of echo --- .github/workflows/test-and-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 04ed07071..55b6aaf92 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -169,7 +169,7 @@ jobs: # Output the artifact name for later use - name: Set output id: set_output - run: echo "dist-artifacts-${{ matrix.os }}-${{ matrix.python }}" >> $GITHUB_ENV + run: printf "dist-artifacts-${{ matrix.os }}-${{ matrix.python }}" >> $GITHUB_ENV build-linux: strategy: @@ -223,7 +223,7 @@ jobs: # Output the artifact name for later use - name: Set output id: set_output - run: echo "dist-artifacts-manylinux-${{ matrix.python }}" >> $GITHUB_ENV + run: printf "dist-artifacts-manylinux-${{ matrix.python }}" >> $GITHUB_ENV deploy: runs-on: ubuntu-latest From 3dd2e77ca402106b5f56ee93465d9958a2b8f886 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 14 Jan 2024 23:29:42 +0100 Subject: [PATCH 39/41] github-actions: try moving files directly --- .github/workflows/test-and-deploy.yml | 32 +++++++++------------------ 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 55b6aaf92..66031525b 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -130,11 +130,6 @@ jobs: name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} path: dist - # Output the artifact name for later use - - name: Set output - id: set_output - run: echo "dist-artifacts-${{ matrix.os }}-${{ matrix.python }}" >> $GITHUB_ENV - build-macos: strategy: matrix: @@ -166,11 +161,6 @@ jobs: name: dist-artifacts-${{ matrix.os }}-${{ matrix.python }} path: dist/* - # Output the artifact name for later use - - name: Set output - id: set_output - run: printf "dist-artifacts-${{ matrix.os }}-${{ matrix.python }}" >> $GITHUB_ENV - build-linux: strategy: matrix: @@ -220,11 +210,6 @@ jobs: name: dist-artifacts-manylinux-${{ matrix.python }} path: dist/* - # Output the artifact name for later use - - name: Set output - id: set_output - run: printf "dist-artifacts-manylinux-${{ matrix.python }}" >> $GITHUB_ENV - deploy: runs-on: ubuntu-latest needs: [test-windows, test-linux, test-macos, build-linux, build-windows, build-macos] @@ -247,14 +232,17 @@ jobs: with: path: dist - - name: Get artifact names - run: | - # Read the artifact_name output from the build job - ARTIFACT_NAME=$(grep 'artifact_name=' $GITHUB_ENV | cut -d= -f2) + - name: Create dist directory + run: mkdir -p dist - # Download artifacts without additional subdirectories - mkdir -p dist - mv dist/$ARTIFACT_NAME/* dist/ + - name: Move files from subdirectories + run: | + for subdirectory in dist/*/; do + dir_name=$(basename "$subdirectory") + mv "$subdirectory"* dist/ + rm -r "$subdirectory" + echo "Moved files from '$dir_name' to 'dist/'" + done - name: Inspect wheel files run: | From 15382a44469710bec29bbb84ade4fbf2d2592ca4 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 14 Jan 2024 23:43:00 +0100 Subject: [PATCH 40/41] github-actions: restrict deploy job on release --- .github/workflows/test-and-deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 66031525b..bcce55873 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -213,6 +213,7 @@ jobs: deploy: runs-on: ubuntu-latest needs: [test-windows, test-linux, test-macos, build-linux, build-windows, build-macos] + if: github.event_name == 'release' steps: - name: Checkout uses: actions/checkout@v4 From b39ade516474a55e70c05acef5932881c8e822db Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 14 Jan 2024 23:44:03 +0100 Subject: [PATCH 41/41] github-actions: restrict build jobs to only run if a release is created --- .github/workflows/test-and-deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index bcce55873..2b4f0454c 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -99,6 +99,7 @@ jobs: pytest GPy/testing build-windows: + if: github.event_name == 'release' strategy: matrix: os: [windows-latest] @@ -131,6 +132,7 @@ jobs: path: dist build-macos: + if: github.event_name == 'release' strategy: matrix: os: [macos-latest] @@ -162,6 +164,7 @@ jobs: path: dist/* build-linux: + if: github.event_name == 'release' strategy: matrix: python: ['cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312']