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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 43 additions & 10 deletions .github/assemble-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ fi

rm -rf site_docs
mkdir -p site_docs/docs site_docs/python site_docs/apple site_docs/android \
site_docs/flutter site_docs/rust site_docs/blog site_docs/assets
site_docs/flutter site_docs/rust site_docs/swift site_docs/kotlin \
site_docs/blog site_docs/assets

cp -r assets/* site_docs/assets/

Expand All @@ -31,7 +32,9 @@ cp docs/*.md site_docs/docs/
cp python/README.md site_docs/python/README.md
cp apple/README.md site_docs/apple/README.md
cp android/README.md site_docs/android/README.md
cp flutter/README.md site_docs/flutter/README.md
cp bindings/flutter/README.md site_docs/flutter/README.md
cp bindings/swift/README.md site_docs/swift/README.md
cp bindings/kotlin/README.md site_docs/kotlin/README.md

mkdir -p site_docs/react-native
if curl -sfL "https://raw.githubusercontent.com/cactus-compute/cactus-react-native/main/README.md" -o site_docs/react-native/README.md; then
Expand All @@ -54,9 +57,7 @@ else
echo "Warning: Could not fetch React Native README, using fallback"
fi

if [ -f rust/README.md ]; then
cp rust/README.md site_docs/rust/README.md
fi
cp bindings/rust/README.md site_docs/rust/README.md

if [ -d blog ] && ls blog/*.md >/dev/null 2>&1; then
cp blog/*.md site_docs/blog/
Expand All @@ -79,6 +80,12 @@ sedi 's|(cactus_index\.md)|(docs/cactus_index.md)|g' site_docs/index.md
sedi 's|(finetuning\.md)|(docs/finetuning.md)|g' site_docs/index.md
sedi 's|(compatibility\.md)|(docs/compatibility.md)|g' site_docs/index.md
sedi 's|(/CONTRIBUTING\.md)|(CONTRIBUTING.md)|g' site_docs/index.md
sedi 's|(/bindings/swift/)|(swift/README.md)|g' site_docs/index.md
sedi 's|(/bindings/kotlin/)|(kotlin/README.md)|g' site_docs/index.md
sedi 's|(/bindings/python/)|(python/README.md)|g' site_docs/index.md
sedi 's|(/bindings/react-native/)|(react-native/README.md)|g' site_docs/index.md
sedi 's|(/bindings/flutter/)|(flutter/README.md)|g' site_docs/index.md
sedi 's|(/bindings/rust/)|(rust/README.md)|g' site_docs/index.md
sedi 's|(/python/)|(python/README.md)|g' site_docs/index.md
sedi 's|(/apple/)|(apple/README.md)|g' site_docs/index.md
sedi 's|(/android/)|(android/README.md)|g' site_docs/index.md
Expand All @@ -91,7 +98,7 @@ sedi 's|(/blog/lfm2\.5_350m\.md)|(blog/lfm2.5_350m.md)|g' site_docs/index.md
sedi 's|(/blog/gemma4\.md)|(blog/gemma4.md)|g' site_docs/index.md
sedi 's|(/blog/turboquant-h\.md)|(blog/turboquant-h.md)|g' site_docs/index.md
sedi 's|(quickstart\.md)|(docs/quickstart.md)|g' site_docs/index.md
sedi 's|(choose-sdk\.md)|(docs/choose-sdk.md)|g' site_docs/index.md
sedi 's|(choose-bindings\.md)|(docs/choose-bindings.md)|g' site_docs/index.md

for f in site_docs/docs/*.md; do
sedi 's|(/docs/cactus_engine\.md)|(cactus_engine.md)|g' "$f"
Expand All @@ -100,24 +107,36 @@ for f in site_docs/docs/*.md; do
sedi 's|(/docs/finetuning\.md)|(finetuning.md)|g' "$f"
sedi 's|(/docs/compatibility\.md)|(compatibility.md)|g' "$f"
sedi 's|(/docs/quickstart\.md)|(quickstart.md)|g' "$f"
sedi 's|(/docs/choose-sdk\.md)|(choose-sdk.md)|g' "$f"
sedi 's|(/docs/choose-bindings\.md)|(choose-bindings.md)|g' "$f"
sedi 's|(/docs/index\.md)|(../index.md)|g' "$f"
sedi 's|(/CONTRIBUTING\.md)|(../CONTRIBUTING.md)|g' "$f"
sedi 's|(/bindings/swift/)|(../swift/README.md)|g' "$f"
sedi 's|(/bindings/kotlin/)|(../kotlin/README.md)|g' "$f"
sedi 's|(/bindings/python/)|(../python/README.md)|g' "$f"
sedi 's|(/bindings/react-native/)|(../react-native/README.md)|g' "$f"
sedi 's|(/bindings/flutter/)|(../flutter/README.md)|g' "$f"
sedi 's|(/bindings/rust/)|(../rust/README.md)|g' "$f"
sedi 's|(/python/)|(../python/README.md)|g' "$f"
sedi 's|(/apple/)|(../apple/README.md)|g' "$f"
sedi 's|(/android/)|(../android/README.md)|g' "$f"
sedi 's|(/flutter/)|(../flutter/README.md)|g' "$f"
sedi 's|(/rust/)|(../rust/README.md)|g' "$f"
done

for f in site_docs/python/README.md site_docs/apple/README.md site_docs/android/README.md site_docs/flutter/README.md; do
for f in site_docs/python/README.md site_docs/apple/README.md site_docs/android/README.md site_docs/flutter/README.md site_docs/swift/README.md site_docs/kotlin/README.md; do
sedi 's|(/docs/cactus_engine\.md)|(../docs/cactus_engine.md)|g' "$f"
sedi 's|(/docs/cactus_graph\.md)|(../docs/cactus_graph.md)|g' "$f"
sedi 's|(/docs/cactus_index\.md)|(../docs/cactus_index.md)|g' "$f"
sedi 's|(/docs/finetuning\.md)|(../docs/finetuning.md)|g' "$f"
sedi 's|(/docs/compatibility\.md)|(../docs/compatibility.md)|g' "$f"
sedi 's|(/docs/quickstart\.md)|(../docs/quickstart.md)|g' "$f"
sedi 's|(/docs/choose-sdk\.md)|(../docs/choose-sdk.md)|g' "$f"
sedi 's|(/docs/choose-bindings\.md)|(../docs/choose-bindings.md)|g' "$f"
sedi 's|(/bindings/swift/)|(../swift/README.md)|g' "$f"
sedi 's|(/bindings/kotlin/)|(../kotlin/README.md)|g' "$f"
sedi 's|(/bindings/python/)|(../python/README.md)|g' "$f"
sedi 's|(/bindings/react-native/)|(../react-native/README.md)|g' "$f"
sedi 's|(/bindings/flutter/)|(../flutter/README.md)|g' "$f"
sedi 's|(/bindings/rust/)|(../rust/README.md)|g' "$f"
sedi 's|(/python/)|(../python/README.md)|g' "$f"
sedi 's|(/apple/)|(../apple/README.md)|g' "$f"
sedi 's|(/android/)|(../android/README.md)|g' "$f"
Expand All @@ -134,7 +153,13 @@ if [ -f site_docs/rust/README.md ]; then
's|(/docs/finetuning\.md)|(../docs/finetuning.md)|g' \
's|(/docs/compatibility\.md)|(../docs/compatibility.md)|g' \
's|(/docs/quickstart\.md)|(../docs/quickstart.md)|g' \
's|(/docs/choose-sdk\.md)|(../docs/choose-sdk.md)|g' \
's|(/docs/choose-bindings\.md)|(../docs/choose-bindings.md)|g' \
's|(/bindings/swift/)|(../swift/README.md)|g' \
's|(/bindings/kotlin/)|(../kotlin/README.md)|g' \
's|(/bindings/python/)|(../python/README.md)|g' \
's|(/bindings/react-native/)|(../react-native/README.md)|g' \
's|(/bindings/flutter/)|(../flutter/README.md)|g' \
's|(/bindings/rust/)|(../rust/README.md)|g' \
's|(/python/)|(../python/README.md)|g' \
's|(/apple/)|(../apple/README.md)|g' \
's|(/android/)|(../android/README.md)|g' \
Expand All @@ -152,6 +177,12 @@ if ls site_docs/blog/*.md >/dev/null 2>&1; then
sedi 's|(/docs/cactus_index\.md)|(../docs/cactus_index.md)|g' "$f"
sedi 's|(/docs/finetuning\.md)|(../docs/finetuning.md)|g' "$f"
sedi 's|(/docs/compatibility\.md)|(../docs/compatibility.md)|g' "$f"
sedi 's|(/bindings/swift/)|(../swift/README.md)|g' "$f"
sedi 's|(/bindings/kotlin/)|(../kotlin/README.md)|g' "$f"
sedi 's|(/bindings/python/)|(../python/README.md)|g' "$f"
sedi 's|(/bindings/react-native/)|(../react-native/README.md)|g' "$f"
sedi 's|(/bindings/flutter/)|(../flutter/README.md)|g' "$f"
sedi 's|(/bindings/rust/)|(../rust/README.md)|g' "$f"
sedi 's|(/python/)|(../python/README.md)|g' "$f"
sedi 's|(/apple/)|(../apple/README.md)|g' "$f"
sedi 's|(/android/)|(../android/README.md)|g' "$f"
Expand Down Expand Up @@ -184,6 +215,8 @@ fi

for nav_path in \
"rust/README.md" \
"swift/README.md" \
"kotlin/README.md" \
"react-native/README.md" \
"blog/README.md" \
"blog/hybrid_transcription.md" \
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: C++ CI

on:
pull_request:
paths:
- cactus/**
- tests/**
- cactus-engine/**
- cactus-graph/**
- cactus-kernels/**
- .github/workflows/cpp.yml
push:
branches: [main]
paths:
- cactus/**
- tests/**
- cactus-engine/**
- cactus-graph/**
- cactus-kernels/**
- .github/workflows/cpp.yml
workflow_dispatch:

Expand All @@ -33,14 +39,14 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ matrix.os }}-${{ github.ref_name }}-${{ hashFiles('cactus/CMakeLists.txt', 'tests/CMakeLists.txt', '.github/workflows/cpp.yml') }}
key: ccache-${{ matrix.os }}-${{ github.ref_name }}-${{ hashFiles('cactus/CMakeLists.txt', 'cactus-engine/tests/CMakeLists.txt', '.github/workflows/cpp.yml') }}
restore-keys: |
ccache-${{ matrix.os }}-${{ github.ref_name }}-
ccache-${{ matrix.os }}-
- run: ccache --zero-stats || true
- run: cmake -G Ninja -S cactus -B cactus/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- run: cmake --build cactus/build --target cactus_ffi --parallel 4
- run: cmake -G Ninja -S tests -B tests/build-ci -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- run: cmake --build tests/build-ci --target test_stt --parallel 4
- run: ./tests/build-ci/test_stt
- run: cmake --build cactus/build --target cactus --parallel 4
- run: cmake -G Ninja -S cactus-engine/tests -B cactus-engine/tests/build-ci -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- run: cmake --build cactus-engine/tests/build-ci --target test_stt --parallel 4
- run: ./cactus-engine/tests/build-ci/test_stt
- run: ccache --show-stats || true
2 changes: 1 addition & 1 deletion .github/workflows/dco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: DCO Check
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:
- python/README.md
- apple/README.md
- android/README.md
- flutter/README.md
- rust/README.md
- bindings/flutter/README.md
- bindings/rust/README.md
- README.md
workflow_dispatch:

Expand Down
114 changes: 0 additions & 114 deletions .github/workflows/publish_to_hf.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/rust.yml

This file was deleted.

15 changes: 6 additions & 9 deletions .github/workflows/verify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "python_changed=false" >> $GITHUB_OUTPUT
else
CHANGED=$(gh pr diff ${{ github.event.pull_request.number }} --name-only | grep -cE '^python/(src/|requirements\.txt)' || true)
CHANGED=$(gh pr diff ${{ github.event.pull_request.number }} --name-only | grep -cE '^python/(cactus/|requirements\.txt|pyproject\.toml)' || true)
echo "python_changed=$([[ $CHANGED -gt 0 ]] && echo true || echo false)" >> $GITHUB_OUTPUT
fi

Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:

- name: Build tests
run: |
cd tests
cd cactus-engine/tests
rm -rf build && mkdir -p build && cd build
cmake .. -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_VERBOSE_MAKEFILE=OFF
make -j$(nproc)
Expand All @@ -153,7 +153,7 @@ jobs:
FAILED=0
for test in test_graph test_kernel test_kv_cache test_index test_model_loading; do
echo "=== Running $test ==="
if ! ./tests/build/$test; then
if ! ./cactus-engine/tests/build/$test; then
FAILED=$((FAILED + 1))
fi
done
Expand Down Expand Up @@ -215,11 +215,8 @@ jobs:
CACTUS_NO_CLOUD_TELE: "1"
run: |
export ${{ matrix.env_var }}="${{ github.workspace }}/weights/${{ matrix.model_dir }}"
export CACTUS_TEST_ASSETS="${{ github.workspace }}/tests/assets"
export CACTUS_TEST_GOLDEN_FILE="${{ github.workspace }}/tests/golden/golden.json"
export CACTUS_TEST_ASSETS="${{ github.workspace }}/cactus-engine/tests/assets"
export CACTUS_TEST_GOLDEN_FILE="${{ github.workspace }}/cactus-engine/tests/golden/golden.json"
export CACTUS_TEST_GOLDEN_FAMILY="${{ matrix.family }}"
export CACTUS_TEST_GOLDEN_PRECISION="${{ matrix.precision }}"
if [ "${{ matrix.family }}" = "whisper" ] || [ "${{ matrix.family }}" = "moonshine" ]; then
export CACTUS_TEST_VAD_MODEL="${{ github.workspace }}/weights/silero-vad"
fi
./tests/build/test_exhaustive
./cactus-engine/tests/build/test_exhaustive
Loading
Loading