From 023b42a984fb399efe7fb5770c8db8d386dae279 Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Mon, 24 Feb 2025 20:20:13 +0100 Subject: [PATCH 1/8] Try building wheels again --- .github/workflows/wheels.yml | 17 +++++++---------- PACKAGE.FS | 0 2 files changed, 7 insertions(+), 10 deletions(-) mode change 100755 => 100644 PACKAGE.FS diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 7c76b63..2be37f0 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -3,7 +3,8 @@ name: Build on: push: branches: - - master + - main + - actions pull_request: jobs: @@ -12,26 +13,22 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macOS-11] + os: [ubuntu-22.04, windows-2019, macOS-11] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - # Used to host cibuildwheel - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.x" - name: Install cibuildwheel run: python -m pip install cibuildwheel==2.11.2 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse - # to supply options, put them in 'env', like: - # env: - # CIBW_SOME_OPTION: value - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Wheels path: ./wheelhouse/*.whl diff --git a/PACKAGE.FS b/PACKAGE.FS old mode 100755 new mode 100644 From 1caf1d987ee56ff91ee3aa986e7362cc13198e25 Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Mon, 24 Feb 2025 20:26:12 +0100 Subject: [PATCH 2/8] Try with cibuildwheel==2.22.0 --- .github/workflows/wheels.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2be37f0..1a85cdb 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -13,22 +13,24 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2019, macOS-11] + os: [ubuntu-latest, windows-latest, macos-13, macos-latest] steps: - uses: actions/checkout@v4 + # Used to host cibuildwheel - uses: actions/setup-python@v5 - with: - python-version: "3.x" - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.11.2 + run: python -m pip install cibuildwheel==2.22.0 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse + # to supply options, put them in 'env', like: + # env: + # CIBW_SOME_OPTION: value - uses: actions/upload-artifact@v4 with: - name: Wheels + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl From e9c43ad1a000f6cb0791d6d2dd408bfdec3dbefd Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Mon, 24 Feb 2025 22:53:44 +0100 Subject: [PATCH 3/8] pypi workflow test --- .github/workflows/codeql-analysis.yml | 67 ------------------- .../{python-publish.yml => pypi.yml} | 33 ++++----- 2 files changed, 18 insertions(+), 82 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml rename .github/workflows/{python-publish.yml => pypi.yml} (73%) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index c0b27a3..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,67 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '15 5 * * 2' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - language: [ 'cpp', 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/python-publish.yml b/.github/workflows/pypi.yml similarity index 73% rename from .github/workflows/python-publish.yml rename to .github/workflows/pypi.yml index 737cf18..e0dc2c3 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/pypi.yml @@ -14,14 +14,18 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies + uses: actions/setup-python@v5 + + - name: Build + run: | + python setup.py sdist + + - name: Install twine run: | python -m pip install --upgrade pip pip install setuptools wheel twine - - name: Build and publish + + - name: Publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} @@ -34,18 +38,16 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macOS-11] + os: [ubuntu-latest, windows-latest, macos-13, macos-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Used to host cibuildwheel - - uses: actions/setup-python@v4 - with: - python-version: "3.10" + - uses: actions/setup-python@v5 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.11.2 + run: python -m pip install cibuildwheel==2.22.0 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse @@ -53,16 +55,17 @@ jobs: # env: # CIBW_SOME_OPTION: value - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: Wheels + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl - - name: Install dependencies + - name: Install twine run: | python -m pip install --upgrade pip pip install setuptools wheel twine - - name: Build and publish + + - name: Publish wheels env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} From adebb64129c08f6cf1128d21a243a8b9462ff771 Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Mon, 24 Feb 2025 22:56:49 +0100 Subject: [PATCH 4/8] Try with twine 6.0.1 --- .github/workflows/pypi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index e0dc2c3..8af0a0f 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -23,7 +23,7 @@ jobs: - name: Install twine run: | python -m pip install --upgrade pip - pip install setuptools wheel twine + pip install setuptools wheel twine==6.0.1 - name: Publish env: @@ -63,7 +63,7 @@ jobs: - name: Install twine run: | python -m pip install --upgrade pip - pip install setuptools wheel twine + pip install setuptools wheel twine==6.0.1 - name: Publish wheels env: From 057668d0a2bd60b9cb182c8aecc38672ba691cca Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Mon, 24 Feb 2025 23:28:49 +0100 Subject: [PATCH 5/8] Try to reorder steps --- .github/workflows/pypi.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 8af0a0f..516cc00 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -13,17 +13,17 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set up Python uses: actions/setup-python@v5 - - name: Build + - name: Install twine run: | - python setup.py sdist + python -m pip install setuptools wheel twine==6.0.1 - - name: Install twine + - name: Build run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine==6.0.1 + python setup.py sdist - name: Publish env: @@ -46,6 +46,10 @@ jobs: # Used to host cibuildwheel - uses: actions/setup-python@v5 + - name: Install twine + run: | + python -m pip install setuptools wheel twine==6.0.1 + - name: Install cibuildwheel run: python -m pip install cibuildwheel==2.22.0 @@ -60,11 +64,6 @@ jobs: name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl - - name: Install twine - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine==6.0.1 - - name: Publish wheels env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} From 86082b1ddbe8e09c3f8a5038cb70d17cd5832719 Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Mon, 24 Feb 2025 23:58:18 +0100 Subject: [PATCH 6/8] Try setting up Python again? --- .github/workflows/pypi.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 516cc00..7d35bd9 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -13,18 +13,18 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python uses: actions/setup-python@v5 - - name: Install twine - run: | - python -m pip install setuptools wheel twine==6.0.1 - - name: Build run: | python setup.py sdist + - name: Install twine + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine==6.0.1 + - name: Publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} @@ -46,10 +46,6 @@ jobs: # Used to host cibuildwheel - uses: actions/setup-python@v5 - - name: Install twine - run: | - python -m pip install setuptools wheel twine==6.0.1 - - name: Install cibuildwheel run: python -m pip install cibuildwheel==2.22.0 @@ -64,6 +60,14 @@ jobs: name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl + # Set up Python again? cibuildwheel messes with python path? + - uses: actions/setup-python@v5 + + - name: Install twine + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine==6.0.1 + - name: Publish wheels env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} From 98503d58e389fcdc45eda8fa0103b483e086b73b Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Tue, 25 Feb 2025 00:16:54 +0100 Subject: [PATCH 7/8] Try with pipx to avoid problems with cibuildwheel messing with python --- .github/workflows/pypi.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 7d35bd9..464eb44 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -43,34 +43,22 @@ jobs: steps: - uses: actions/checkout@v4 - # Used to host cibuildwheel - uses: actions/setup-python@v5 - - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.22.0 + - name: Install pipx + run: python3 -m pip install pipx - name: Build wheels - run: python -m cibuildwheel --output-dir wheelhouse - # to supply options, put them in 'env', like: - # env: - # CIBW_SOME_OPTION: value + run: pipx run cibuildwheel==2.22.0 --output-dir wheelhouse - uses: actions/upload-artifact@v4 with: name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl - # Set up Python again? cibuildwheel messes with python path? - - uses: actions/setup-python@v5 - - - name: Install twine - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine==6.0.1 - - name: Publish wheels env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - twine upload wheelhouse/* + pipx run twine upload wheelhouse/* From b33a65850ca5bf1609da153a5d88e5114ad096be Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Tue, 25 Feb 2025 00:20:41 +0100 Subject: [PATCH 8/8] Try with specific Python version --- .github/workflows/pypi.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 464eb44..d396acd 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -44,6 +44,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 + with: + python-version: '3.12' - name: Install pipx run: python3 -m pip install pipx