Skip to content

Commit 5721211

Browse files
committed
merge dev; fix conflicts
2 parents deb923a + 7368ebc commit 5721211

153 files changed

Lines changed: 9542 additions & 2825 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Main Changes
22

3-
- Describe main changes
3+
Give a summary of the key changes
44

55

66
## Associated Issues
@@ -9,10 +9,23 @@
99
- Addresses #2
1010

1111

12-
## TODOs
12+
## Merge Dependencies
1313

14-
- [ ] Documentation
15-
- [ ] All tests must pass
14+
Either:
15+
- This PR has no merge dependencies, or
16+
- Depends on: ..., or
17+
- Should be merged before: ...
18+
19+
## Target versions
20+
21+
- OpEn version ...
22+
- opengen version ...
23+
24+
25+
## Checklist
26+
27+
- [ ] API documentation updated
28+
- [ ] Appropriate testing
1629
- [ ] Update `CHANGELOG`(s)
17-
- [ ] Update webpage documentation
18-
- [ ] Bump versions (in `CHANGELOG`, `Cargo.toml` and `VERSION`)
30+
- [ ] Update webpage documentation, if necessary
31+
- [ ] Bump versions (in `CHANGELOG`, `Cargo.toml` and `VERSION`), if necessary

.github/workflows/ci.yml

Lines changed: 103 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,135 @@
1+
name: Continuous integration
2+
13
on:
24
push:
3-
branches: [ master ]
5+
branches: [master]
46
pull_request:
57

6-
name: Continuous integration
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
714

815
jobs:
9-
ci:
16+
rust_tests:
17+
name: Rust tests (${{ matrix.name }})
1018
runs-on: ${{ matrix.os }}
19+
timeout-minutes: 45
1120
strategy:
21+
fail-fast: false
1222
matrix:
13-
os: [ubuntu-latest]
23+
include:
24+
- name: Linux
25+
os: ubuntu-latest
26+
- name: macOS
27+
os: macos-latest
28+
steps:
29+
- uses: actions/checkout@v5
30+
31+
- uses: actions-rust-lang/setup-rust-toolchain@v1
32+
with:
33+
toolchain: stable
34+
rustflags: ""
35+
36+
- name: Cargo tests
37+
run: cargo test
38+
39+
- name: Cargo tests (RP and JEM)
40+
run: |
41+
cargo test --features rp
42+
cargo test --features jem
43+
44+
python_tests:
45+
name: Python tests (${{ matrix.name }})
46+
needs: rust_tests
47+
runs-on: ${{ matrix.os }}
48+
timeout-minutes: 45
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
include:
53+
- name: Linux
54+
os: ubuntu-latest
55+
skip_rpi_test: 0
56+
- name: macOS
57+
os: macos-latest
58+
skip_rpi_test: 1
1459
env:
1560
DO_DOCKER: 0
61+
SKIP_RPI_TEST: ${{ matrix.skip_rpi_test }}
1662
steps:
17-
- uses: actions/checkout@v2
18-
- uses: egor-tensin/setup-clang@v1
19-
- uses: actions-rs/toolchain@v1
63+
- uses: actions/checkout@v5
64+
65+
- uses: actions-rust-lang/setup-rust-toolchain@v1
2066
with:
21-
profile: minimal
2267
toolchain: stable
23-
override: true
24-
- uses: actions-rs/cargo@v1
25-
with:
26-
command: test
27-
- uses: actions/setup-python@v5
68+
components: clippy
69+
rustflags: ""
70+
71+
- uses: actions/setup-python@v6
2872
with:
29-
python-version: '3.12'
30-
architecture: 'x64'
73+
python-version: "3.12"
74+
cache: "pip"
75+
cache-dependency-path: open-codegen/setup.py
76+
77+
- uses: egor-tensin/setup-clang@v1
78+
if: runner.os == 'Linux'
79+
80+
- name: Install Linux ARM target
81+
if: runner.os == 'Linux'
82+
run: rustup target add arm-unknown-linux-gnueabihf
83+
3184
- name: Install ARM cross-compiler and C libraries
85+
if: runner.os == 'Linux'
3286
run: |
3387
sudo apt-get update
3488
sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
35-
# If icasadi_rosenbrock or other deps need C++:
36-
# sudo apt-get install -y g++-arm-linux-gnueabihf
37-
- name: Cargo tests (RP and JEM)
38-
run: |
39-
cargo test --features rp
40-
cargo test --features jem
41-
- name: Run tests (script.sh)
42-
# Set environment variables for the cc crate
89+
90+
- name: Install LLVM
91+
if: runner.os == 'macOS'
92+
run: brew install llvm
93+
94+
- name: Run Python tests and generated Clippy checks
95+
if: runner.os == 'Linux'
4396
env:
4497
CC_arm_unknown_linux_gnueabihf: arm-linux-gnueabihf-gcc
4598
AR_arm_unknown_linux_gnueabihf: arm-linux-gnueabihf-ar
46-
# If C++ is involved and you installed g++-arm-linux-gnueabihf:
47-
# CXX_arm_unknown_linux_gnueabihf: arm-linux-gnueabihf-g++
48-
run: |
49-
bash ./ci/script.sh
99+
run: bash ./ci/script.sh python-tests
50100

51-
ci_macos:
101+
- name: Run Python tests and generated Clippy checks
102+
if: runner.os == 'macOS'
103+
run: bash ./ci/script.sh python-tests
104+
105+
ocp_tests:
106+
name: OCP tests (${{ matrix.name }})
107+
needs: python_tests
52108
runs-on: ${{ matrix.os }}
109+
timeout-minutes: 45
53110
strategy:
111+
fail-fast: false
54112
matrix:
55-
os: [macos-latest]
113+
include:
114+
- name: Linux
115+
os: ubuntu-latest
116+
- name: macOS
117+
os: macos-latest
56118
env:
57119
DO_DOCKER: 0
58120
steps:
59-
- uses: actions/checkout@v2
60-
- run: brew install llvm
61-
- uses: actions-rs/toolchain@v1
121+
- uses: actions/checkout@v5
122+
123+
- uses: actions-rust-lang/setup-rust-toolchain@v1
62124
with:
63-
profile: minimal
64125
toolchain: stable
65-
override: true
66-
- uses: actions-rs/cargo@v1
67-
with:
68-
command: test
69-
- uses: actions/setup-python@v5
126+
rustflags: ""
127+
128+
- uses: actions/setup-python@v6
70129
with:
71-
python-version: '3.12'
72-
- run: cargo test --features rp
73-
- run: cargo test --features jem
74-
- name: Install ARM cross-compiler toolchain (via Homebrew)
75-
run: |
76-
# Tap the repository that provides the cross-compiler
77-
brew tap messense/macos-cross-toolchains
78-
# Update brew to ensure the tap is recognized (can sometimes be needed)
79-
brew update
80-
# Install the full toolchain (includes gcc, binutils, sysroot)
81-
# This specific formula provides the entire toolchain.
82-
brew install arm-unknown-linux-gnueabihf
83-
84-
# The above `brew install` might have linking conflicts if other partial
85-
# toolchains were somehow pre-installed or installed by other steps.
86-
# If it fails with link errors, you might need:
87-
# brew link --overwrite arm-unknown-linux-gnueabihf
88-
89-
# Verify the compiler is found
90-
which arm-linux-gnueabihf-gcc || (echo "arm-linux-gnueabihf-gcc not found in PATH" && exit 1)
91-
- name: Run tests (script.sh)
92-
# Set environment variables for the cc crate and PyO3 (if needed)
93-
env:
94-
CC_arm_unknown_linux_gnueabihf: arm-linux-gnueabihf-gcc
95-
AR_arm_unknown_linux_gnueabihf: arm-linux-gnueabihf-ar
96-
# If you are building PyO3 bindings and need to specify Python libs from the sysroot:
97-
# PYO3_CROSS_LIB_DIR: "/opt/homebrew/opt/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/usr/lib" # Adjust path and Python version
98-
# PYO3_CROSS_INCLUDE_DIR: "/opt/homebrew/opt/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/usr/include/python3.x" # Adjust path and Python version
99-
run: |
100-
bash ./ci/script.sh
130+
python-version: "3.12"
131+
cache: "pip"
132+
cache-dependency-path: open-codegen/setup.py
133+
134+
- name: Run OCP Python tests
135+
run: bash ./ci/script.sh ocp-tests

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ open-clib/Cargo.lock
4343
/website/node_modules/
4444
/website/yarn.lock
4545
/website/build/
46+
/website/.docusaurus/
4647
!/website/pages/
4748
!/website/static/
4849
!/website/*.js
@@ -73,3 +74,4 @@ open-clib/Cargo.lock
7374
*private*
7475
.DS_Store
7576
/img/
77+
private/

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
Note: This is the main Changelog file for the Rust solver. The Changelog file for the Python interface (`opengen`) can be found in [/open-codegen/CHANGELOG.md](open-codegen/CHANGELOG.md)
99

10+
11+
<!-- ---------------------
12+
v0.12.0
13+
--------------------- -->
14+
## [v0.12.0] - Unreleased
15+
16+
17+
### Changed
18+
19+
- Rust solver supports generic float types
20+
- Expanded Rust constraint test coverage with constructor validation, boundary/idempotence checks, and additional `BallP` / epigraph projection cases
21+
22+
23+
<!-- ---------------------
24+
v0.11.1
25+
--------------------- -->
26+
## [v0.11.1] - 2026-03-23
27+
28+
29+
### Fixed
30+
31+
- Return best PANOC half-step on early exit (issue #325)
32+
33+
1034
<!-- ---------------------
1135
v0.11.0
1236
--------------------- -->
@@ -330,6 +354,7 @@ This is a breaking API change.
330354
--------------------- -->
331355

332356
<!-- Releases -->
357+
[v0.11.1]: https://github.com/alphaville/optimization-engine/compare/v0.11.0...v0.11.1
333358
[v0.11.0]: https://github.com/alphaville/optimization-engine/compare/v0.10.0...v0.11.0
334359
[v0.10.0]: https://github.com/alphaville/optimization-engine/compare/v0.9.1...v0.10.0
335360
[v0.9.1]: https://github.com/alphaville/optimization-engine/compare/v0.9.0...v0.9.1

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ homepage = "https://alphaville.github.io/optimization-engine/"
4242
repository = "https://github.com/alphaville/optimization-engine"
4343

4444
# Version of this crate (SemVer)
45-
version = "0.11.0"
45+
version = "0.12.0-alpha.1"
4646

4747
edition = "2018"
4848

0 commit comments

Comments
 (0)