From a9eca97f6b69593847e2ccc42aad5cfa9cef43f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odhr=C3=A1n=20Creelman?= Date: Wed, 17 Jul 2024 14:46:57 +0100 Subject: [PATCH 01/11] Add ARM MacOS support for Python Bindings --- open-codegen/CHANGELOG.md | 6 ++++++ open-codegen/VERSION | 2 +- open-codegen/opengen/templates/python/cargo_config | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/open-codegen/CHANGELOG.md b/open-codegen/CHANGELOG.md index 81a2df78..f4ca9af9 100644 --- a/open-codegen/CHANGELOG.md +++ b/open-codegen/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/). Note: This is the Changelog file of `opengen` - the Python interface of OpEn +## [0.8.1] - 2024-07-17 + +### Added + +* Python direct interface support for ARM-based Macs + ## [0.8.0] - 2024-03-20 ### Added diff --git a/open-codegen/VERSION b/open-codegen/VERSION index 8adc70fd..c18d72be 100644 --- a/open-codegen/VERSION +++ b/open-codegen/VERSION @@ -1 +1 @@ -0.8.0 \ No newline at end of file +0.8.1 \ No newline at end of file diff --git a/open-codegen/opengen/templates/python/cargo_config b/open-codegen/opengen/templates/python/cargo_config index 15d5d329..49314f34 100644 --- a/open-codegen/opengen/templates/python/cargo_config +++ b/open-codegen/opengen/templates/python/cargo_config @@ -3,3 +3,8 @@ rustflags = [ "-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup", ] +[target.aarch64-apple-darwin] +rustflags = [ + "-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup", +] \ No newline at end of file From 457011cb1b8e35a6372123ca754e07299534e7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odhr=C3=A1n=20Creelman?= Date: Fri, 19 Jul 2024 14:17:19 +0100 Subject: [PATCH 02/11] Update GitHub Actions for MacOS --- .github/workflows/ci.yml | 2 +- open-codegen/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0e0fe08..e8de9e65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-11] + os: [macos-latest] env: DO_DOCKER: 0 steps: diff --git a/open-codegen/CHANGELOG.md b/open-codegen/CHANGELOG.md index f4ca9af9..f8c15f90 100644 --- a/open-codegen/CHANGELOG.md +++ b/open-codegen/CHANGELOG.md @@ -12,6 +12,7 @@ Note: This is the Changelog file of `opengen` - the Python interface of OpEn ### Added * Python direct interface support for ARM-based Macs +* Updated GitHub Actions to use the macos-12 runner ## [0.8.0] - 2024-03-20 From 7f2447315a1f2b73b22316221fd7e07ea01f59eb Mon Sep 17 00:00:00 2001 From: Creelman <33496035+Creelman@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:53:41 +0100 Subject: [PATCH 03/11] Update Python install version to support Darwin Runners (macos-14) --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8de9e65..95234e68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,7 @@ on: push: branches: [ master ] pull_request: + workflow_run: name: Continuous integration @@ -52,8 +53,7 @@ jobs: command: test - uses: actions/setup-python@v2 with: - python-version: '3.8' - architecture: 'x64' + python-version: '3.12' - run: cargo test --features rp - run: cargo test --features jem - run: bash ./ci/script.sh From a80b5d004cd3e6a68faa10a7757b9d8195f514a4 Mon Sep 17 00:00:00 2001 From: Creelman <33496035+Creelman@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:57:35 +0100 Subject: [PATCH 04/11] Remove invalid trigger --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95234e68..1ed22dd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,6 @@ on: push: branches: [ master ] pull_request: - workflow_run: name: Continuous integration From 1bd5e020677ea3def0148c75315bd88393c7d553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odhr=C3=A1n=20Creelman?= Date: Mon, 22 Jul 2024 16:03:15 +0100 Subject: [PATCH 05/11] Update Python version for CI --- .github/workflows/ci.yml | 2 +- ci/script.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ed22dd9..364cea14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: command: test - uses: actions/setup-python@v2 with: - python-version: '3.8' + python-version: '3.12' architecture: 'x64' - run: cargo test --features rp - run: cargo test --features jem diff --git a/ci/script.sh b/ci/script.sh index 04cb472a..91a72407 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -33,7 +33,7 @@ regular_test() { pip install virtualenv # --- create virtualenv - virtualenv -p python3.8 venv + virtualenv -p python3.12 venv # --- activate venv source venv/bin/activate From e7817747d0268e4bc14fe6e74cd9496508099146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odhr=C3=A1n=20Creelman?= Date: Mon, 22 Jul 2024 16:09:16 +0100 Subject: [PATCH 06/11] Update actions/setup-python version from v2 to v5 (latest) --- .github/workflows/ci.yml | 4 ++-- .github/workflows/dox.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 364cea14..c284a26e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 with: python-version: '3.12' architecture: 'x64' @@ -50,7 +50,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 with: python-version: '3.12' - run: cargo test --features rp diff --git a/.github/workflows/dox.yml b/.github/workflows/dox.yml index 974068d1..2ebe1d25 100644 --- a/.github/workflows/dox.yml +++ b/.github/workflows/dox.yml @@ -14,9 +14,9 @@ jobs: - uses: actions/checkout@v2 # Install sphinx - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.12' - name: Build and deploy docs run: bash ci/sphinx-documentation.sh From 5ddba3ba0411d9d99f0d14bdc8635e16304e13a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odhr=C3=A1n=20Creelman?= Date: Mon, 22 Jul 2024 16:16:45 +0100 Subject: [PATCH 07/11] Install and update setuptools in CI script.sh --- ci/script.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/script.sh b/ci/script.sh index 91a72407..5ba79e6c 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -41,6 +41,9 @@ regular_test() { # --- upgrade pip within venv pip install --upgrade pip + # --- install setuptools + pip install --upgrade setuptools + # --- install opengen pip install . From 3a571bf5e47edb6c9aeefb142d02876960c5b118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odhr=C3=A1n=20Creelman?= Date: Mon, 22 Jul 2024 16:30:00 +0100 Subject: [PATCH 08/11] Move setuptools install to setup.py --- ci/script.sh | 3 --- open-codegen/setup.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ci/script.sh b/ci/script.sh index 5ba79e6c..91a72407 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -41,9 +41,6 @@ regular_test() { # --- upgrade pip within venv pip install --upgrade pip - # --- install setuptools - pip install --upgrade setuptools - # --- install opengen pip install . diff --git a/open-codegen/setup.py b/open-codegen/setup.py index 3a19e60f..886b379b 100755 --- a/open-codegen/setup.py +++ b/open-codegen/setup.py @@ -35,7 +35,7 @@ exclude=["icasadi", "templates"]), include_package_data=True, install_requires=[ - 'jinja2', 'casadi', 'pyyaml', 'retry', 'numpy' + 'jinja2', 'casadi', 'pyyaml', 'retry', 'numpy', 'setuptools' ], classifiers=[ 'Development Status :: 4 - Beta', From c2f06f1d9726ff57f6dfc91848ee7643fd4f7ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odhr=C3=A1n=20Creelman?= Date: Mon, 22 Jul 2024 16:48:01 +0100 Subject: [PATCH 09/11] Update GH pages checkout to fix pathspec issue --- ci/sphinx-documentation.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/sphinx-documentation.sh b/ci/sphinx-documentation.sh index 452f057e..53894038 100644 --- a/ci/sphinx-documentation.sh +++ b/ci/sphinx-documentation.sh @@ -38,7 +38,7 @@ git config --global user.email "actions@github.com" # Checkout gh-pages and delete the folder api-dox (don't push yet) # At the end, return to the current branch git fetch origin gh-pages:gh-pages || : -git checkout gh-pages +git checkout --orphan gh-pages if [ -d "api-dox/" ]; then git rm -r api-dox/ git commit -m "remove old api-dox files" From c4ae23f2a4667c556bc4b3a9a7f4eb306afca9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odhr=C3=A1n=20Creelman?= Date: Mon, 22 Jul 2024 16:56:27 +0100 Subject: [PATCH 10/11] Undo unnecessary documentation change --- ci/sphinx-documentation.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/sphinx-documentation.sh b/ci/sphinx-documentation.sh index 53894038..452f057e 100644 --- a/ci/sphinx-documentation.sh +++ b/ci/sphinx-documentation.sh @@ -38,7 +38,7 @@ git config --global user.email "actions@github.com" # Checkout gh-pages and delete the folder api-dox (don't push yet) # At the end, return to the current branch git fetch origin gh-pages:gh-pages || : -git checkout --orphan gh-pages +git checkout gh-pages if [ -d "api-dox/" ]; then git rm -r api-dox/ git commit -m "remove old api-dox files" From 7c2adb0465fc34bb5767f0e50a50f0ed7fd29a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odhr=C3=A1n=20Creelman?= Date: Mon, 22 Jul 2024 17:05:39 +0100 Subject: [PATCH 11/11] Update changelog to note Python3.12 upgrade --- open-codegen/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/open-codegen/CHANGELOG.md b/open-codegen/CHANGELOG.md index f8c15f90..2e5bcb07 100644 --- a/open-codegen/CHANGELOG.md +++ b/open-codegen/CHANGELOG.md @@ -12,7 +12,8 @@ Note: This is the Changelog file of `opengen` - the Python interface of OpEn ### Added * Python direct interface support for ARM-based Macs -* Updated GitHub Actions to use the macos-12 runner +* Updated GitHub Actions to use the macos-latest runner +* Updated GitHub Actions to use Python3.12 (required for above) ## [0.8.0] - 2024-03-20