Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

fix: compiling issue with cli #1

fix: compiling issue with cli

fix: compiling issue with cli #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
# ===========================================================================
# Rust Jobs
# ===========================================================================
rust-fmt:
name: Rust Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
rust-clippy:
name: Rust Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install Linux build deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libudev-dev
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-clippy-
- name: Run Clippy
run: cargo clippy --all-targets --all-features
rust-test:
name: Rust Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Linux build deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libudev-dev
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-test-
- name: Run tests
run: cargo test --all-features --workspace
rust-build:
name: Rust Build (all features)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Linux build deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libudev-dev
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Build with all features
run: cargo build --all-features --workspace
# ===========================================================================
# Python Jobs
# ===========================================================================
python-lint:
name: Python Lint (Ruff)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install ruff
run: pip install ruff
- name: Run lint checks (baseline + ratchet)
env:
RFX_LINT_STAGE: ratchet
run: scripts/python-checks.sh lint
python-typecheck:
name: Python Type Check (mypy subset)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install dependencies
run: |
pip install mypy
- name: Run mypy (baseline + ratchet)
env:
RFX_TYPECHECK_STAGE: ratchet
run: scripts/python-checks.sh typecheck
python-test:
name: Python Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Linux build deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libudev-dev
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-python-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-python-
- name: Install Python dependencies
run: |
pip install pytest pytest-asyncio pytest-cov maturin
- name: Build and install package
run: |
maturin build --release
pip install --force-reinstall target/wheels/*.whl
- name: Run Python tests
run: |
PYTHONPATH="$GITHUB_WORKSPACE:$GITHUB_WORKSPACE/rfx/python:${PYTHONPATH}" \
pytest rfx/tests/ rfxJIT/tests/ -v --cov=rfx --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
flags: python
name: python-coverage
fail_ci_if_error: false
# ===========================================================================
# Integration Tests
# ===========================================================================
integration-test:
name: Integration Tests
runs-on: ubuntu-latest
needs: [rust-build, python-lint]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Linux build deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libudev-dev
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-integration-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-integration-
- name: Install dependencies
run: |
pip install pytest pytest-asyncio maturin
- name: Build package
run: |
maturin build --release
pip install --force-reinstall target/wheels/*.whl
- name: Run integration tests
run: |
PYTHONPATH="$GITHUB_WORKSPACE:$GITHUB_WORKSPACE/rfx/python:${PYTHONPATH}" \
pytest rfx/tests/integration/ -v
# ===========================================================================
# rfxJIT Perf (warning-only gate)
# ===========================================================================
rfxjit-perf:
name: rfxJIT Perf (CPU soft gate)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Run rfxJIT CPU perf check
run: |
bash scripts/perf-check.sh \
--baseline docs/perf/baselines/rfxjit_microkernels_cpu.json \
--output perf-rfxjit-cpu.json \
--backend cpu \
--size 65536 \
--iterations 200 \
--warmup 10 \
--threshold-pct 10
- name: Upload rfxJIT perf artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: rfxjit-perf-cpu-${{ github.run_id }}
path: perf-rfxjit-cpu.json
# ===========================================================================
# Benchmarks (optional, only on main)
# ===========================================================================
benchmarks:
name: Benchmarks
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: [rust-test]
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Linux build deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libudev-dev
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-bench-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-bench-
- name: Run benchmarks
run: cargo bench --all-features || echo "No benchmarks found"
# ===========================================================================
# Documentation
# ===========================================================================
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Linux build deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libudev-dev
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-docs-
- name: Build documentation
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: -D warnings
# ===========================================================================
# Summary Job
# ===========================================================================
ci-success:
name: CI Success
runs-on: ubuntu-latest
needs:
- rust-fmt
- rust-clippy
- rust-test
- rust-build
- python-lint
- python-typecheck
- python-test
- integration-test
- rfxjit-perf
- docs
if: always()
steps:
- name: Check all jobs
run: |
echo "rust-fmt: ${{ needs.rust-fmt.result }}"
echo "rust-clippy: ${{ needs.rust-clippy.result }}"
echo "rust-test: ${{ needs.rust-test.result }}"
echo "rust-build: ${{ needs.rust-build.result }}"
echo "python-lint: ${{ needs.python-lint.result }}"
echo "python-typecheck:${{ needs.python-typecheck.result }}"
echo "python-test: ${{ needs.python-test.result }}"
echo "integration-test:${{ needs.integration-test.result }}"
echo "rfxjit-perf: ${{ needs.rfxjit-perf.result }}"
echo "docs: ${{ needs.docs.result }}"
if [[ "${{ needs.rust-fmt.result }}" != "success" ]] ||
[[ "${{ needs.rust-clippy.result }}" != "success" ]] ||
[[ "${{ needs.rust-test.result }}" != "success" ]] ||
[[ "${{ needs.rust-build.result }}" != "success" ]] ||
[[ "${{ needs.python-lint.result }}" != "success" ]] ||
[[ "${{ needs.python-typecheck.result }}" != "success" ]] ||
[[ "${{ needs.python-test.result }}" != "success" ]] ||
[[ "${{ needs.integration-test.result }}" != "success" ]] ||
[[ "${{ needs.docs.result }}" != "success" ]]; then
echo "One or more jobs failed"
exit 1
fi
if [[ "${{ needs.rfxjit-perf.result }}" != "success" ]]; then
echo "rfxJIT perf soft gate did not pass; continuing."
fi
echo "All CI checks passed!"