Skip to content

Commit 9535024

Browse files
authored
Merge pull request #2 from MechBot-2x/nueva-rama
Nueva rama
2 parents 5a764be + 0b24d48 commit 9535024

File tree

7,871 files changed

+1625917
-3
lines changed

Some content is hidden

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

7,871 files changed

+1625917
-3
lines changed

.github/actions/CI.yml

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# 🚀 Neural Nexus - CI/CD Pipeline
2+
name: Neural Nexus CI/CD
3+
4+
on:
5+
push:
6+
branches: [ main, develop ]
7+
pull_request:
8+
branches: [ main, develop ]
9+
release:
10+
types: [published]
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
RUST_BACKTRACE: 1
15+
16+
jobs:
17+
# 🧪 Testing Jobs
18+
test-rust:
19+
name: 🦀 Rust Tests
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
rust-version: [stable, beta]
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install Rust toolchain
29+
uses: actions-rs/toolchain@v1
30+
with:
31+
toolchain: ${{ matrix.rust-version }}
32+
profile: minimal
33+
override: true
34+
components: rustfmt, clippy
35+
36+
- name: Cache cargo registry
37+
uses: actions/cache@v3
38+
with:
39+
path: ~/.cargo/registry
40+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
41+
42+
- name: Cache cargo index
43+
uses: actions/cache@v3
44+
with:
45+
path: ~/.cargo/git
46+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
47+
48+
- name: Cache cargo build
49+
uses: actions/cache@v3
50+
with:
51+
path: target
52+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
53+
54+
- name: Check formatting
55+
run: cargo fmt --all -- --check
56+
57+
- name: Run clippy
58+
run: cargo clippy --all-targets --all-features -- -D warnings
59+
60+
- name: Run tests
61+
run: cargo test --all-features --workspace
62+
63+
- name: Run benchmarks
64+
run: cargo bench --no-run
65+
66+
test-python:
67+
name: 🐍 Python Tests
68+
runs-on: ubuntu-latest
69+
strategy:
70+
matrix:
71+
python-version: [3.8, 3.9, "3.10", "3.11"]
72+
73+
steps:
74+
- uses: actions/checkout@v4
75+
76+
- name: Set up Python ${{ matrix.python-version }}
77+
uses: actions/setup-python@v4
78+
with:
79+
python-version: ${{ matrix.python-version }}
80+
81+
- name: Cache pip packages
82+
uses: actions/cache@v3
83+
with:
84+
path: ~/.cache/pip
85+
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
86+
restore-keys: |
87+
${{ runner.os }}-pip-
88+
89+
- name: Install dependencies
90+
run: |
91+
python -m pip install --upgrade pip
92+
pip install -e .[dev]
93+
94+
- name: Run black
95+
run: black --check .
96+
97+
- name: Run isort
98+
run: isort --check-only .
99+
100+
- name: Run flake8
101+
run: flake8 .
102+
103+
- name: Run mypy
104+
run: mypy .
105+
106+
- name: Run tests
107+
run: pytest --cov=neural_nexus --cov-report=xml
108+
109+
- name: Upload coverage to Codecov
110+
uses: codecov/codecov-action@v3
111+
with:
112+
file: ./coverage.xml
113+
flags: python
114+
name: codecov-umbrella
115+
116+
# 🏗️ Build Jobs
117+
build-rust:
118+
name: 🦀 Rust Build
119+
runs-on: ${{ matrix.os }}
120+
strategy:
121+
matrix:
122+
os: [ubuntu-latest, windows-latest, macos-latest]
123+
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, x86_64-pc-windows-msvc, x86_64-apple-darwin]
124+
exclude:
125+
- os: ubuntu-latest
126+
target: x86_64-pc-windows-msvc
127+
- os: ubuntu-latest
128+
target: x86_64-apple-darwin
129+
- os: windows-latest
130+
target: x86_64-unknown-linux-gnu
131+
- os: windows-latest
132+
target: aarch64-unknown-linux-gnu
133+
- os: windows-latest
134+
target: x86_64-apple-darwin
135+
- os: macos-latest
136+
target: x86_64-unknown-linux-gnu
137+
- os: macos-latest
138+
target: aarch64-unknown-linux-gnu
139+
- os: macos-latest
140+
target: x86_64-pc-windows-msvc
141+
142+
steps:
143+
- uses: actions/checkout@v4
144+
145+
- name: Install Rust toolchain
146+
uses: actions-rs/toolchain@v1
147+
with:
148+
toolchain: stable
149+
target: ${{ matrix.target }}
150+
override: true
151+
152+
- name: Install cross-compilation

0 commit comments

Comments
 (0)