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
7 changes: 3 additions & 4 deletions .github/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ Vulkan loader exclusions remain backend-specific. Their existing auditwheel
policies remain: CUDA/ROCm manylinux_2_35, Vulkan manylinux_2_39; GPU execution is
not tested by these jobs.

Rust source archives are tested on the same platform matrix. Cargo repackages
the extracted crate before upload: the publisher verifies that all files,
including the normalized manifest and native sources, match the tested archive.
Rust checkout tests run on the same platform matrix, independently of packaging.
Cargo repackages the extracted crate before upload: the publisher verifies that
all files, including the normalized manifest and native sources, match the built archive.
Only Cargo-generated `Cargo.toml.orig` and VCS metadata are excluded; Rust
guarantees source equivalence, not a byte-identical compressed archive.

Expand Down Expand Up @@ -83,7 +83,6 @@ only exercised when a release is published and registry authorization is ready.

```sh
python -m unittest discover -s .github/scripts -v
python -m unittest discover -s rust/tests -p test_package.py -v
cargo package --allow-dirty -j 3
cmake --preset libraries -DGGML_METAL=OFF
cmake --build build/libraries --config Release --target clap --parallel 4
Expand Down
63 changes: 0 additions & 63 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,66 +172,3 @@ jobs:
run: cargo test --all-targets
- name: Compile-fail thread-safety contract
run: cargo test --doc
- name: Check package inventory and pinned sources
run: python -m unittest discover -s rust/tests -p test_package.py -v
- name: Verify standalone package build
run: cargo package --allow-dirty
- name: Test standalone package inference and safety
shell: bash
run: |
version=$(python -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["package"]["version"])')
manifest="target/package/clap-cpp-${version}/Cargo.toml"
cargo test --manifest-path "$manifest" --all-targets --locked
cargo test --manifest-path "$manifest" --doc --locked
python -m unittest discover -s "$(dirname "$manifest")/rust/tests" -p test_package.py -v
- name: Recheck checkout after package verification
run: cargo test --all-targets --locked

rust-gpu:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
feature: vulkan
- os: macos-latest
feature: metal
runs-on: ${{ matrix.os }}
env:
CARGO_BUILD_JOBS: 3
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions-rust-lang/setup-rust-toolchain@v2
with:
toolchain: stable
cache-workspaces: . -> target
build-warnings: ""
- name: Install Vulkan SDK and software driver
if: matrix.feature == 'vulkan'
run: |
sudo apt-get update
sudo apt-get install -y libvulkan-dev glslc spirv-headers mesa-vulkan-drivers
icd=$(find /usr/share/vulkan/icd.d -name 'lvp_icd*.json' -print -quit)
test -n "$icd"
echo "VK_DRIVER_FILES=$icd" >> "$GITHUB_ENV"
echo "VK_ICD_FILENAMES=$icd" >> "$GITHUB_ENV"
echo "GGML_VK_VISIBLE_DEVICES=0" >> "$GITHUB_ENV"
- name: Verify GPU source package builds and links
run: cargo package --allow-dirty --features ${{ matrix.feature }}
- name: Test standalone GPU package inference and safety
shell: bash
run: |
version=$(python -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["package"]["version"])')
manifest="target/package/clap-cpp-${version}/Cargo.toml"
cargo test --manifest-path "$manifest" --features ${{ matrix.feature }} --all-targets --locked
cargo test --manifest-path "$manifest" --features ${{ matrix.feature }} --doc --locked
- name: GPU-enabled text and audio inference
run: cargo test --features ${{ matrix.feature }} --all-targets
- name: GPU-enabled documentation tests
run: cargo test --features ${{ matrix.feature }} --doc
17 changes: 5 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,6 @@ jobs:
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: python .github/scripts/release-version.py "$RELEASE_TAG"
- name: Check package inventory and pinned sources
run: python -m unittest discover -s rust/tests -p test_package.py -v
- name: Build and verify Rust source distribution
run: cargo package --allow-dirty
- uses: actions/upload-artifact@v4
Expand All @@ -693,7 +691,6 @@ jobs:
if-no-files-found: error

test-rust:
needs: build-rust
runs-on: ${{ matrix.os }}
permissions:
contents: read
Expand All @@ -707,10 +704,9 @@ jobs:
run:
shell: bash
steps:
- uses: actions/download-artifact@v4
- uses: actions/checkout@v4
with:
name: rust-crate
path: dist
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: '3.11'
Expand All @@ -719,13 +715,10 @@ jobs:
toolchain: stable
cache: false
build-warnings: ""
- name: Extract and test source distribution
- name: Test Rust checkout
run: |
mkdir package
tar -xzf dist/*.crate --strip-components=1 -C package
cargo test --manifest-path package/Cargo.toml --all-targets --locked
cargo test --manifest-path package/Cargo.toml --doc --locked
python -m unittest discover -s package/rust/tests -p test_package.py -v
cargo test --all-targets --locked
cargo test --doc --locked

publish-crates-io:
env:
Expand Down
Loading
Loading