From 707e04349d4691c33d507af3929db62c386c0796 Mon Sep 17 00:00:00 2001 From: Irfan Alibay Date: Fri, 27 Oct 2023 18:47:24 +0100 Subject: [PATCH] Update deploy things for py312 + OpenID Connect publishing (#4325) * update deployment things for py312 * MDA now has a trusted publisher --- .github/workflows/darkerbot.yaml | 2 +- .github/workflows/deploy.yaml | 48 +++++++++++++------------------ .github/workflows/gh-ci-cron.yaml | 12 ++++---- .github/workflows/gh-ci.yaml | 6 ++-- .github/workflows/linters.yaml | 6 ++-- maintainer/ci/cirrus-ci.yml | 6 ++-- maintainer/ci/cirrus-deploy.yml | 8 ++++-- 7 files changed, 41 insertions(+), 47 deletions(-) diff --git a/.github/workflows/darkerbot.yaml b/.github/workflows/darkerbot.yaml index 29a85c8cf1e..41cc813d47e 100644 --- a/.github/workflows/darkerbot.yaml +++ b/.github/workflows/darkerbot.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 34bd14c06b7..1e4a45559fc 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -37,31 +37,32 @@ jobs: fail-fast: false matrix: buildplat: - - [ubuntu-20.04, manylinux_x86_64] - - [macos-11, macosx_*] - - [windows-2019, win_amd64] - python: ["cp39", "cp310", "cp311"] + - [ubuntu-22.04, manylinux_x86_64, x86_64] + - [macos-11, macosx_*, x86_64] + - [windows-2019, win_amd64, AMD64] + python: ["cp39", "cp310", "cp311", "cp312"] defaults: run: working-directory: ./package steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Build wheels - uses: pypa/cibuildwheel@v2.11.2 + uses: pypa/cibuildwheel@v2.16.2 with: package-dir: package env: CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + CIBW_ARCHS: ${{ matrix.buildplat[2] }} CIBW_BUILD_VERBOSITY: 1 - name: upload artifacts if: | (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package')) || (github.event_name == 'release' && github.event.action == 'published') - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: path: wheelhouse/*.whl retention-days: 7 @@ -75,7 +76,7 @@ jobs: run: working-directory: ./package steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -86,7 +87,7 @@ jobs: if: | (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package')) || (github.event_name == 'release' && github.event.action == 'published') - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: path: package/dist/*.tar.gz retention-days: 7 @@ -100,7 +101,7 @@ jobs: run: working-directory: ./testsuite steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -111,7 +112,7 @@ jobs: if: | (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package')) || (github.event_name == 'release' && github.event.action == 'published') - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: path: testsuite/dist/*.tar.gz retention-days: 7 @@ -125,7 +126,7 @@ jobs: runs-on: ubuntu-latest needs: [build_wheels, build_sdist, build_sdist_tests] steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: artifact path: dist @@ -136,18 +137,14 @@ jobs: mv dist/MDAnalysisTests-* testsuite/dist - name: upload_source_and_wheels - uses: pypa/gh-action-pypi-publish@v1.5.0 + uses: pypa/gh-action-pypi-publish@v1.8.10 with: - user: __token__ - password: ${{ secrets.TESTPYPI_API_TOKEN_SRC }} skip_existing: true repository_url: https://test.pypi.org/legacy/ - name: upload_tests - uses: pypa/gh-action-pypi-publish@v1.5.0 + uses: pypa/gh-action-pypi-publish@v1.8.10 with: - user: __token__ - password: ${{ secrets.TESTPYPI_API_TOKEN_TEST }} packages_dir: testsuite/dist skip_existing: true repository_url: https://test.pypi.org/legacy/ @@ -161,7 +158,7 @@ jobs: runs-on: ubuntu-latest needs: [build_wheels, build_sdist, build_sdist_tests] steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: artifact path: dist @@ -172,16 +169,11 @@ jobs: mv dist/MDAnalysisTests-* testsuite/dist - name: upload_source_and_wheels - uses: pypa/gh-action-pypi-publish@v1.5.0 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN_SRC }} + uses: pypa/gh-action-pypi-publish@v1.18.10 - name: upload_tests - uses: pypa/gh-action-pypi-publish@v1.5.0 + uses: pypa/gh-action-pypi-publish@v1.18.10 with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN_TEST }} packages_dir: testsuite/dist check_testpypi: @@ -196,7 +188,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] type: ["FULL", "MIN"] exclude: # Multiple deps don't like windows @@ -206,7 +198,7 @@ jobs: MPLBACKEND: agg steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup_micromamba uses: mamba-org/setup-micromamba@v1 diff --git a/.github/workflows/gh-ci-cron.yaml b/.github/workflows/gh-ci-cron.yaml index 7b3bfbe1934..862095d3211 100644 --- a/.github/workflows/gh-ci-cron.yaml +++ b/.github/workflows/gh-ci-cron.yaml @@ -26,7 +26,7 @@ jobs: timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup_os uses: ./.github/actions/setup-os @@ -85,7 +85,7 @@ jobs: timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup_os uses: ./.github/actions/setup-os @@ -138,7 +138,7 @@ jobs: os: [ubuntu-20.04, macos-11] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup_os uses: ./.github/actions/setup-os @@ -186,7 +186,7 @@ jobs: matrix: python-version: ["3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup_os uses: ./.github/actions/setup-os @@ -225,7 +225,7 @@ jobs: os: [ubuntu, macos] python-version: ["3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup_os uses: ./.github/actions/setup-os @@ -273,7 +273,7 @@ jobs: wheels: ['true', 'false'] steps: # Checkout to have access to local actions (i.e. setup-os) - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # We need this here in order to make sure we assign the correct compiler (i.e. clang for macos) - name: setup_os diff --git a/.github/workflows/gh-ci.yaml b/.github/workflows/gh-ci.yaml index fb6c1d68236..3ed9ec4d313 100644 --- a/.github/workflows/gh-ci.yaml +++ b/.github/workflows/gh-ci.yaml @@ -58,7 +58,7 @@ jobs: MPLBACKEND: agg steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup_os uses: ./.github/actions/setup-os @@ -139,7 +139,7 @@ jobs: MPLBACKEND: agg steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup_micromamba uses: mamba-org/setup-micromamba@v1 @@ -237,7 +237,7 @@ jobs: timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 1cf11feefcd..b4b9b061cb6 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -27,7 +27,7 @@ jobs: shell: bash steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -102,7 +102,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: @@ -124,7 +124,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup_micromamba uses: mamba-org/setup-micromamba@v1 diff --git a/maintainer/ci/cirrus-ci.yml b/maintainer/ci/cirrus-ci.yml index ea4b70e3a9a..53f7daac27c 100644 --- a/maintainer/ci/cirrus-ci.yml +++ b/maintainer/ci/cirrus-ci.yml @@ -20,9 +20,9 @@ macos_arm64_task: ci_script: | brew update - brew install python@3.11 - /opt/homebrew/bin/python3 -m venv ~/py_311 - source ~/py_311/bin/activate + brew install python@3.12 + /opt/homebrew/bin/python3 -m venv ~/py_312 + source ~/py_312/bin/activate cd package python -m pip install . cd ../testsuite diff --git a/maintainer/ci/cirrus-deploy.yml b/maintainer/ci/cirrus-deploy.yml index 32679a8111a..e00b4b6c232 100644 --- a/maintainer/ci/cirrus-deploy.yml +++ b/maintainer/ci/cirrus-deploy.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.12.3 + - python -m pip install cibuildwheel==2.16.2 run_cibuildwheel_script: - cibuildwheel ./package wheels_artifacts: @@ -16,7 +16,8 @@ linux_aarch64_wheel_task: cpu: 4 memory: 4G env: - CIBW_BUILD: cp39-manylinux* cp310-manylinux* cp311-manylinux* + CIBW_BUILD: cp39-manylinux_* cp310-manylinux_* cp311-manylinux_* cp312-manylinux_* + CIBW_ARCHS: ARM64 build_script: | apt install -y python3-venv python-is-python3 @@ -29,7 +30,8 @@ macos_arm64_wheel_task: macos_instance: image: ghcr.io/cirruslabs/macos-monterey-xcode:14 env: - CIBW_BUILD: cp39-* cp310-* cp311-* + CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* + CIBW_ARCHS: ARM64 PATH: /opt/homebrew/opt/python@3.10/bin:$PATH build_script: |