Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
directory: "/rust"
schedule:
interval: "weekly"
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ jobs:
rustflags: ""

- name: Cargo tests
working-directory: rust
run: cargo test

- name: Cargo tests (RP and JEM)
if: runner.os != 'Windows'
working-directory: rust
run: |
cargo test --features rp
cargo test --features jem
Expand Down Expand Up @@ -79,7 +81,7 @@ jobs:
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: open-codegen/pyproject.toml
cache-dependency-path: python/pyproject.toml

- uses: egor-tensin/setup-clang@v1
if: runner.os == 'Linux'
Expand Down Expand Up @@ -111,17 +113,17 @@ jobs:

- name: Install Python package
if: runner.os == 'Windows'
working-directory: open-codegen
run: |
Set-Location python
python -m pip install --upgrade pip
python -m pip install .

- name: Run Python test.py
if: runner.os == 'Windows'
working-directory: open-codegen
env:
PYTHONPATH: .
run: python -W ignore test/test.py -v
run: |
Set-Location python
$env:PYTHONPATH = "."
python -W ignore test/test.py -v

ros2_tests:
name: ROS2 tests
Expand Down Expand Up @@ -201,22 +203,22 @@ jobs:
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: open-codegen/pyproject.toml
cache-dependency-path: python/pyproject.toml

- name: Run OCP Python tests
if: runner.os != 'Windows'
run: bash ./ci/script.sh ocp-tests

- name: Install Python package
if: runner.os == 'Windows'
working-directory: open-codegen
run: |
Set-Location python
python -m pip install --upgrade pip
python -m pip install .

- name: Run OCP Python tests
if: runner.os == 'Windows'
working-directory: open-codegen
env:
PYTHONPATH: .
run: python -W ignore test/test_ocp.py -v
run: |
Set-Location python
$env:PYTHONPATH = "."
python -W ignore test/test_ocp.py -v
13 changes: 5 additions & 8 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v5
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --examples
- name: Cargo clippy
working-directory: rust
run: cargo clippy --all-targets --all-features --examples
13 changes: 5 additions & 8 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v5
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Cargo fmt
working-directory: rust
run: cargo fmt --all -- --check
89 changes: 30 additions & 59 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,77 +1,48 @@
# Generated by Cargo
# will have compiled files and executables
.eggs
.idea
TODOS/
# Rust
.cargo
/target
target/
.cargo
*.odp#
*.egg-info
*.pyc
open-codegen/opengen/icasadi/extern/Makefile
virt
data
my_optimizers
.python_test_build
dist/

# Python tests create this folder:
open-codegen/opengen/.python_test_build/

# Haphazard files:
__main.rs
design/open-card.odp
design/open-interfaces.jpeg
design/open-interfaces.odp
design/open-interfaces.png
main.rs
open-codegen/run/
open-codegen/venv*


# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
/Cargo.lock
/rust/Cargo.lock
open-clib/Cargo.lock

# These are backup files generated by rustfmt
*.rs.bk

# Docusaurus website (autogenerated files)
/website/i18n/
/website/node_modules/
/website/yarn.lock
/website/build/
/website/.docusaurus/
!/website/pages/
!/website/static/
!/website/*.js
!/website/blog/
!/website/core/Footer.js
!/website/README.md
!/website/publish.sh
# Python
virt

# icasadi external files
/icasadi/extern/
# Docs / website
/docs/website/i18n/
/docs/website/node_modules/
/docs/website/yarn.lock
/docs/website/build/
/docs/website/.docusaurus/

# Visual studio code files
# Editors / local state
.idea
/.vscode/
.DS_Store

# Main file
/src/main.rs

# Autogenerated files (builds)
# Project-local scratch files
TODOS/
data
*.odp#
__main.rs
main.rs
/rust/src/main.rs
/autogenerated_*
/build/
!/build/README.md

# Other files
# Design assets that should stay local
design/open-card.odp
design/open-interfaces.jpeg
design/open-interfaces.odp
design/open-interfaces.png
/design/panoc-only.png

# Misc temporary files
*.autosave
*~
.#*
*private*
.DS_Store
/img/

# Private work area
private/
Loading