Skip to content

Commit c23c45d

Browse files
committed
Merge branch 'master' into feature/325-best-inner-solution
2 parents 63a7d37 + 9b0de89 commit c23c45d

103 files changed

Lines changed: 6123 additions & 1894 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/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/

0 commit comments

Comments
 (0)