From 4e5464eca60c3e68f50e15a626fc25b4ff44b227 Mon Sep 17 00:00:00 2001 From: Jim Ekman Date: Thu, 7 May 2026 11:18:01 +0200 Subject: [PATCH 1/8] Migrate to github workflow --- .circleci/config.yml | 135 --------------------------------------- .github/workflows/ci.yml | 56 ++++++++++++++++ 2 files changed, 56 insertions(+), 135 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 3c7d675..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,135 +0,0 @@ -version: 2.1 - -jobs: - test-python: - parameters: - version: - type: string - tox_env: - type: string - docker: - - image: circleci/python:<< parameters.version >> - steps: - - checkout - - run: sudo apt-key adv --fetch-keys https://apt.llvm.org/llvm-snapshot.gpg.key - - run: - command: | - echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-5.0 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list - echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-6.0 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list - echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-7 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list - echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-8 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list - - run: sudo apt update - - run: sudo apt install -y libclang1-5.0 libclang1-6.0 libclang1-7 libclang1-8 - - run: sudo pip install tox - - run: TOXENV=$(tox --listenvs | grep "^<< parameters.tox_env >>") tox -p auto - - store_test_results: - path: test-results - - build: - docker: - - image: circleci/python:3.6 - steps: - - checkout - - run: python setup.py sdist bdist_wheel - - store_artifacts: - path: dist/ - - persist_to_workspace: - root: dist/ - paths: - - pycodegen-*.tar.gz - - pycodegen-*.whl - - test-install: - parameters: - version: - type: string - docker: - - image: circleci/python:<< parameters.version >> - steps: - - attach_workspace: - at: /tmp/packages - - run: sudo pip install /tmp/packages/pycodegen-*.whl - - run: sudo pip install "pycodegen[CPP]" - - run: pycodegen -h - - deploy-to-pypi: - docker: - - image: circleci/python:3.6 - steps: - - attach_workspace: - at: /tmp/packages - - restore_cache: - key: v1-pip-cache - - run: sudo pip install twine - - save_cache: - key: v1-pip-cache - paths: - - ~/.cache/pip - - run: - command: | - echo -e "[pypi]" >> ~/.pypirc - echo -e "username = $PYPI_USERNAME" >> ~/.pypirc - echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc - - deploy: - command: twine upload /tmp/packages/* - -workflows: - version: 2 - build_and_deploy: - jobs: - - test-python: - name: test-python34 - version: "3.4" - tox_env: "py34" - - test-python: - name: test-python35 - version: "3.5" - tox_env: "py35" - - test-python: - name: test-python36 - version: "3.6" - tox_env: "py36" - - test-python: - name: test-python37 - version: "3.7" - tox_env: "py37" - - - build: - requires: - - test-python34 - - test-python35 - - test-python36 - - test-python37 - - - test-install: - name: test-install-python34 - version: "3.4" - requires: - - build - - test-install: - name: test-install-python35 - version: "3.5" - requires: - - build - - test-install: - name: test-install-python36 - version: "3.6" - requires: - - build - - test-install: - name: test-install-python37 - version: "3.7" - requires: - - build - - - deploy-to-pypi: - requires: - - test-install-python34 - - test-install-python35 - - test-install-python36 - - test-install-python37 - filters: - tags: - only: /v[0-9]+(\.[0-9]+)*/ - branches: - ignore: /.*/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..23fd5c3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - container: ubuntu:22.04 + install_deps: apt-get update && apt-get install -y curl libclang-dev + - container: ubuntu:24.04 + install_deps: apt-get update && apt-get install -y curl libclang-dev + - container: fedora:40 + install_deps: dnf install -y clang-libs + - container: fedora:41 + install_deps: dnf install -y clang-libs + container: ${{ matrix.container }} + steps: + - uses: actions/checkout@v4 + - name: Install system dependencies + run: ${{ matrix.install_deps }} + - uses: astral-sh/setup-uv@v6 + - run: uv sync --group dev --all-extras + - run: uv run nox + + build: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v6 + - run: uv build + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + test-install: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + - run: pip install dist/*.whl + - run: pycodegen -h From 7ae7a6de973d159307766c43a442e20abb602ca5 Mon Sep 17 00:00:00 2001 From: Jim Ekman Date: Thu, 7 May 2026 11:26:59 +0200 Subject: [PATCH 2/8] Run workflow --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23fd5c3..aeff587 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,10 @@ name: CI -on: - push: - branches: [main] - pull_request: - branches: [main] +#on: +# push: +# branches: [master] +# pull_request: +# branches: [master] jobs: test: From 957b5c5a7d6df0bf18667789aa1cb1ef2e7d2d57 Mon Sep 17 00:00:00 2001 From: Jim Ekman Date: Thu, 7 May 2026 11:27:30 +0200 Subject: [PATCH 3/8] Run workflow --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aeff587..8a92f63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,10 @@ name: CI -#on: -# push: -# branches: [master] -# pull_request: -# branches: [master] +on: + push: + branches: [master, gh-workflow] + pull_request: + branches: [master] jobs: test: From 20a9579522dec014c843ab0a74b50b31533ee0d0 Mon Sep 17 00:00:00 2001 From: Jim Ekman Date: Thu, 7 May 2026 11:37:05 +0200 Subject: [PATCH 4/8] Don't install libclang --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a92f63..2df11d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,13 +13,10 @@ jobs: matrix: include: - container: ubuntu:22.04 - install_deps: apt-get update && apt-get install -y curl libclang-dev - container: ubuntu:24.04 - install_deps: apt-get update && apt-get install -y curl libclang-dev + - container: ubuntu:26.04 - container: fedora:40 - install_deps: dnf install -y clang-libs - container: fedora:41 - install_deps: dnf install -y clang-libs container: ${{ matrix.container }} steps: - uses: actions/checkout@v4 From e90901a171f8488d62991d33a150911f1293d499 Mon Sep 17 00:00:00 2001 From: Jim Ekman Date: Thu, 7 May 2026 11:46:29 +0200 Subject: [PATCH 5/8] Opt into node24 and add a macos runner --- .github/workflows/ci.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2df11d9..6c1d9bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,8 @@ name: CI +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + on: push: branches: [master, gh-workflow] @@ -12,12 +15,17 @@ jobs: strategy: matrix: include: - - container: ubuntu:22.04 - - container: ubuntu:24.04 - - container: ubuntu:26.04 - - container: fedora:40 - - container: fedora:41 - container: ${{ matrix.container }} + - runs-on: ubuntu-latest + container: ubuntu:24.04 + - runs-on: ubuntu-latest + container: ubuntu:26.04 + - runs-on: ubuntu-latest + container: fedora:40 + - runs-on: ubuntu-latest + container: fedora:41 + - runs-on: macos-latest + runs-on: ${{ matrix.runs-on }} + container: ${{ matrix.container || '' }} steps: - uses: actions/checkout@v4 - name: Install system dependencies From 760d694a5b4ee2d685b138efcb0ee0e01820f4f1 Mon Sep 17 00:00:00 2001 From: Jim Ekman Date: Thu, 7 May 2026 11:47:12 +0200 Subject: [PATCH 6/8] fix --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c1d9bb..ea8ef9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,6 @@ on: jobs: test: - runs-on: ubuntu-latest strategy: matrix: include: From a7720da8e171b11c372c40c96b87d1732556300a Mon Sep 17 00:00:00 2001 From: Jim Ekman Date: Thu, 7 May 2026 11:48:20 +0200 Subject: [PATCH 7/8] Drop python 3.9 --- noxfile.py | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index ab30e9a..0279105 100644 --- a/noxfile.py +++ b/noxfile.py @@ -2,7 +2,7 @@ nox.options.default_venv_backend = "uv" -@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]) +@nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14"]) def tests(session): session.install(".[cpp]", "pytest") session.run("pytest") diff --git a/pyproject.toml b/pyproject.toml index aeec58a..3e34f0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,6 @@ authors = [{ name = "Jim Ekman", email = "jim@nurd.se" }] keywords = ["code generation", "libclang", "codegenerator"] classifiers = [ "Development Status :: 3 - Alpha", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", From d7c76a1693f4d635cb8a34c42b2f2406d961bb05 Mon Sep 17 00:00:00 2001 From: Jim Ekman Date: Thu, 7 May 2026 11:50:05 +0200 Subject: [PATCH 8/8] Update build badge --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 4df3797..53f4469 100644 --- a/README.rst +++ b/README.rst @@ -46,8 +46,8 @@ Example usage pycodegen cpp --dump-json -.. |Build Status| image:: https://img.shields.io/circleci/project/github/blejdfist/pycodegen/master.svg?style=flat - :target: https://circleci.com/gh/blejdfist/pycodegen +.. |Build Status| image:: https://github.com/blejdfist/pycodegen/actions/workflows/ci.yml/badge.svg?branch=master + :target: https://github.com/blejdfist/pycodegen/actions/workflows/ci.yml .. |PyPi Version| image:: https://img.shields.io/pypi/v/pycodegen.svg?style=flat :target: https://pypi.org/project/pycodegen/