Skip to content

Commit 544a3d4

Browse files
authored
[Build] Use CMAKE_ARGS to control optional features (#24)
* Use cmake args and update doc * Format with ruff * Remove optional deps in workflow * Run optinal only in cibuild * Fix tests in cibuild
1 parent 83046d2 commit 544a3d4

26 files changed

+667
-1375
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ jobs:
4343
- name: Build and test with uv
4444
run: |
4545
uv venv --python ${{ matrix.python-version }}
46-
CMAKE_ARGS="-DENABLE_GLCACHE=OFF -DENABLE_LRB=OFF -DENABLE_3L_CACHE=OFF" uv pip install -e .[dev] -vvv
46+
uv pip install -e .[dev] -vvv
4747
uv run python -c "import libcachesim; print('✓ Import successful for Python ${{ matrix.python-version }} on ${{ matrix.os }}')"
4848
4949
- name: Run tests
5050
run: |
5151
if [ -d "tests" ]; then
52-
uv run python -m pytest tests/ -v
52+
uv run python -m pytest tests/ -v -m "not optional"
5353
else
5454
echo "No tests directory found, skipping tests"
5555
fi

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ endif()
1212
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
1313

1414
# Options
15-
option(ENABLE_GLCACHE "Enable group-learned cache" ON)
16-
option(ENABLE_LRB "Enable LRB" ON)
17-
option(ENABLE_3L_CACHE "Enable 3LCache" ON)
15+
option(ENABLE_GLCACHE "Enable group-learned cache" OFF)
16+
option(ENABLE_LRB "Enable LRB" OFF)
17+
option(ENABLE_3L_CACHE "Enable 3LCache" OFF)
1818

1919
# C++ standard
2020
set(CMAKE_CXX_STANDARD 17)

docs/mkdocs.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,24 @@ docs_dir: src
99
nav:
1010
- Home:
1111
- libCacheSim Python: index.md
12-
- Getting Started:
13-
- Quick Start: quickstart.md
12+
- Getting Started:
13+
- getting_started/quickstart.md
14+
- getting_started/installation.md
15+
- Examples:
16+
- examples/simulation.md
17+
- examples/analysis.md
18+
- examples/plugins.md
19+
- User Guide:
20+
- FAQ: faq.md
21+
- Developer Guide:
22+
- General: developer.md
1423
- API Reference:
1524
- API Documentation: api.md
16-
- Examples:
17-
- Usage Examples: examples.md
1825

1926
theme:
2027
name: material
21-
logo: assets/logos/logo-only-light.ico
22-
favicon: assets/logos/logo-only-light.ico
28+
# logo: assets/logos/logo-only-light.ico
29+
# favicon: assets/logos/logo-only-light.ico
2330
language: en
2431
palette:
2532
# Palette toggle for automatic mode
@@ -77,7 +84,9 @@ plugins:
7784
build: true
7885
nav_translations:
7986
Home: 首页
80-
Quick Start: 快速开始
87+
Getting Started: 快速开始
88+
User Guide: 用户指南
89+
Developer Guide: 开发者指南
8190
API Reference: API参考
8291
Examples: 使用示例
8392

docs/src/assets/logos/logo.jpg

135 KB
Loading

0 commit comments

Comments
 (0)