Skip to content

Commit b0cb83f

Browse files
authored
[CI] Simplify build-flags (kvcache-ai#3485)
* [CI] Simplify build-flags * Remove Rust toolchain installation from CI Removed installation step for Rust toolchain in CI workflow.
1 parent bec376f commit b0cb83f

2 files changed

Lines changed: 26 additions & 130 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,8 @@ jobs:
218218
python-version: ['3.10', '3.12']
219219
env:
220220
CI: "true"
221-
TORCH_CUDA_ARCH_LIST: "8.0;9.0"
222221
SCCACHE_GHA_ENABLED: "true"
223222
PIP_NO_CACHE_DIR: "1"
224-
MAX_JOBS: "2"
225-
EP_TORCH_VERSIONS: "2.11.0;2.12.0;2.12.1;2.13.0"
226223
CMAKE_RELWITHDEBINFO_FLAGS: "-O2 -DNDEBUG"
227224

228225
steps:
@@ -265,9 +262,6 @@ jobs:
265262
df -h
266263
shell: bash
267264

268-
- name: Install Rust toolchain
269-
uses: dtolnay/rust-toolchain@stable
270-
271265
- name: Build transfer engine only
272266
run: |
273267
cd mooncake-transfer-engine
@@ -299,130 +293,6 @@ jobs:
299293
df -h
300294
shell: bash
301295

302-
- name: Configure project with all settings are ON
303-
run: |
304-
mkdir build
305-
cd build
306-
# ENABLE_DEBUG_SYMBOLS=OFF alone still leaves CMake's RelWithDebInfo -g.
307-
cmake -G Ninja .. \
308-
-DUSE_ETCD=ON \
309-
-DUSE_CXL=ON \
310-
-DUSE_REDIS=ON \
311-
-DUSE_HTTP=ON \
312-
-DWITH_STORE=ON \
313-
-DWITH_P2P_STORE=ON \
314-
-DWITH_METRICS=ON \
315-
-DBUILD_UNIT_TESTS=ON \
316-
-DBUILD_EXAMPLES=ON \
317-
-DENABLE_SCCACHE=ON \
318-
-DUSE_CUDA=ON \
319-
-DUSE_MNNVL=OFF \
320-
-DUSE_UB=OFF \
321-
-DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/cuda/lib64/stubs" \
322-
"-DCMAKE_C_FLAGS_RELWITHDEBINFO=${CMAKE_RELWITHDEBINFO_FLAGS}" \
323-
"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_RELWITHDEBINFO_FLAGS}" \
324-
-DENABLE_DEBUG_SYMBOLS=OFF
325-
shell: bash
326-
# TODO: lack USE_NVMEOF,USE_MNNVL
327-
328-
- name: Build project with all settings are ON
329-
run: |
330-
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
331-
export LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LIBRARY_PATH
332-
cd build
333-
cmake --build .
334-
sudo cmake --install .
335-
df -h
336-
shell: bash
337-
338-
- name: Configure project with unit tests and examples
339-
run: |
340-
cd build
341-
cmake -G Ninja .. -DBUILD_UNIT_TESTS=ON -DBUILD_EXAMPLES=ON -DWITH_STORE_RUST=ON -DENABLE_SCCACHE=ON -DENABLE_DEBUG_SYMBOLS=OFF
342-
shell: bash
343-
344-
- name: Build project with unit tests and examples
345-
run: |
346-
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
347-
export LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LIBRARY_PATH
348-
cd build
349-
cmake --build .
350-
sudo cmake --install .
351-
shell: bash
352-
353-
- name: Check Mooncake Store Rust bindings, examples, and tests
354-
run: |
355-
# libcuda.so.1 (SONAME of the CUDA stub) must be findable at runtime.
356-
# The toolkit stubs dir only ships libcuda.so; create the versioned symlink.
357-
if [ -f /usr/local/cuda/lib64/stubs/libcuda.so ] && \
358-
[ ! -e /usr/local/cuda/lib64/stubs/libcuda.so.1 ]; then
359-
sudo ln -s libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
360-
fi
361-
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
362-
cd mooncake-store/rust
363-
export MOONCAKE_BUILD_DIR=$GITHUB_WORKSPACE/build
364-
cargo test --lib
365-
MOONCAKE_STORE_LIB_DIR=$GITHUB_WORKSPACE/build/mooncake-store/src \
366-
MOONCAKE_STORE_INCLUDE_DIR=$GITHUB_WORKSPACE/mooncake-store/include \
367-
cargo test --examples --tests --no-run
368-
cargo clean
369-
shell: bash
370-
371-
- name: Verify Mooncake Store Rust dlopen bindings and packaging
372-
run: |
373-
cd mooncake-store/rust
374-
# 1. Committed dlopen bindings must stay in sync with store_c.h.
375-
cargo run --locked --example generate_dlopen_bindings
376-
git diff --exit-code -- src/generated/ffi_dlopen_bindings.rs
377-
# 2. The published dlopen crate must build with no header/bindgen: package
378-
# it, extract, and check the dlopen feature against the packaged files.
379-
cargo package --no-verify --allow-dirty
380-
crate=$(ls target/package/mooncake_store-*.crate | head -1)
381-
dest=$(mktemp -d)
382-
tar xzf "$crate" -C "$dest"
383-
(cd "$dest"/mooncake_store-* && cargo check --no-default-features --features dlopen)
384-
shell: bash
385-
386-
- name: Configure project
387-
run: |
388-
cd build
389-
rm -r */tests
390-
cmake -G Ninja .. \
391-
-DBUILD_UNIT_TESTS=OFF \
392-
-DBUILD_EXAMPLES=OFF \
393-
-DUSE_HTTP=ON \
394-
-DENABLE_SCCACHE=ON \
395-
-DUSE_CXL=ON \
396-
-DWITH_EP=ON \
397-
"-DEP_TORCH_VERSIONS=${EP_TORCH_VERSIONS}" \
398-
-DENABLE_DEBUG_SYMBOLS=OFF
399-
shell: bash
400-
401-
- name: Build project
402-
run: |
403-
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
404-
export LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LIBRARY_PATH
405-
cd build
406-
cmake --build .
407-
sudo cmake --install .
408-
shell: bash
409-
410-
- name: Build nvlink_allocator.so
411-
run: |
412-
mkdir -p build/mooncake-transfer-engine/nvlink-allocator
413-
cd mooncake-transfer-engine/nvlink-allocator
414-
export PATH=/usr/local/nvidia/bin:/usr/local/nvidia/lib64:$PATH
415-
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
416-
export LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LIBRARY_PATH
417-
bash build.sh ../../build/mooncake-transfer-engine/nvlink-allocator/
418-
shell: bash
419-
420-
- name: Run sccache stat for check
421-
if: ${{ env.SCCACHE_PATH != '' }}
422-
shell: bash
423-
run: ${SCCACHE_PATH} --show-stats
424-
425-
426296
spell-check:
427297
name: Spell Check with Typos
428298
if: &run-ci >-

.github/workflows/nightly.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ jobs:
248248
mkdir build && cd build
249249
cmake -G Ninja .. \
250250
-DUSE_HTTP=ON -DUSE_CXL=ON -DUSE_UB=ON -DUSE_ETCD=ON -DUSE_CUDA=ON \
251+
-DWITH_P2P_STORE=ON \
251252
-DSTORE_USE_ETCD=ON -DCMAKE_BUILD_TYPE=Release \
252253
-DBUILD_UNIT_TESTS=ON -DENABLE_SCCACHE=ON
253254
@@ -304,6 +305,31 @@ jobs:
304305
MOONCAKE_STORE_RUST_LINK_ASAN: "0"
305306
run: ./scripts/ci/run_store_rust_smoke.sh
306307

308+
- name: Check Mooncake Store Rust bindings, examples, and tests
309+
env:
310+
MOONCAKE_BUILD_DIR: ${{ github.workspace }}/build
311+
MOONCAKE_STORE_LIB_DIR: ${{ github.workspace }}/build/mooncake-store/src
312+
MOONCAKE_STORE_INCLUDE_DIR: ${{ github.workspace }}/mooncake-store/include
313+
run: |
314+
export LD_LIBRARY_PATH="$GITHUB_WORKSPACE/build/mooncake-asio:$GITHUB_WORKSPACE/build/mooncake-store/src:$GITHUB_WORKSPACE/build/mooncake-store/src/cachelib_memory_allocator:$GITHUB_WORKSPACE/build/mooncake-transfer-engine/src:$GITHUB_WORKSPACE/build/mooncake-transfer-engine/src/common/base:$GITHUB_WORKSPACE/build/mooncake-common/etcd:/usr/local/lib:${LD_LIBRARY_PATH:-}"
315+
cd mooncake-store/rust
316+
cargo test --lib
317+
cargo test --examples --tests --no-run
318+
cargo clean
319+
320+
- name: Verify Mooncake Store Rust dlopen bindings and packaging
321+
env:
322+
MOONCAKE_STORE_INCLUDE_DIR: ${{ github.workspace }}/mooncake-store/include
323+
run: |
324+
cd mooncake-store/rust
325+
cargo run --locked --example generate_dlopen_bindings
326+
git diff --exit-code -- src/generated/ffi_dlopen_bindings.rs
327+
cargo package --no-verify --allow-dirty
328+
crate=$(ls target/package/mooncake_store-*.crate | head -1)
329+
dest=$(mktemp -d)
330+
tar xzf "$crate" -C "$dest"
331+
(cd "$dest"/mooncake_store-* && cargo check --no-default-features --features dlopen)
332+
307333
- name: Run Go store binding integration tests
308334
env:
309335
MOONCAKE_STORE_CLUSTER_ID: nightly_go_cluster

0 commit comments

Comments
 (0)