Skip to content

Commit 35a74c8

Browse files
authored
ci : add [no release] keyword + fix sanitizer builds (ggml-org#23728)
* ci : skip release workflow on master when commit message contains [no release] Assisted-by: llama.cpp:local pi * ci : restrict sanitizer builds to x86_64 + fix build type the spark is apparently too slow for some reason * tests : fix undefined warning [no ci]
1 parent 5190c2e commit 35a74c8

4 files changed

Lines changed: 16 additions & 5 deletions

File tree

.github/workflows/build-sanitize.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ env:
2828

2929
jobs:
3030
ctest:
31-
runs-on: [self-hosted, CPU, Linux]
31+
runs-on: [self-hosted, X64, CPU, Linux]
3232

3333
continue-on-error: true
3434

@@ -60,6 +60,7 @@ jobs:
6060
if: ${{ matrix.sanitizer == 'UNDEFINED' }}
6161
run: |
6262
cmake -B build \
63+
-DCMAKE_BUILD_TYPE=Debug \
6364
-DLLAMA_FATAL_WARNINGS=ON \
6465
-DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON \
6566
-DGGML_SANITIZE_${{ matrix.sanitizer }}=ON
@@ -71,6 +72,7 @@ jobs:
7172
if: ${{ matrix.sanitizer != 'THREAD' }}
7273
run: |
7374
cmake -B build \
75+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
7476
-DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON \
7577
-DGGML_SANITIZE_${{ matrix.sanitizer }}=ON
7678
@@ -81,6 +83,7 @@ jobs:
8183
if: ${{ matrix.sanitizer == 'THREAD' }}
8284
run: |
8385
cmake -B build \
86+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
8487
-DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON \
8588
-DGGML_SANITIZE_${{ matrix.sanitizer }}=ON \
8689
-DGGML_OPENMP=OFF

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Release
22

3+
# Skip this workflow on push to master if the commit message contains [no release]
4+
if: |
5+
github.event_name != 'push' ||
6+
github.ref != 'refs/heads/master' ||
7+
!contains(github.event.head_commit.message, '[no release]')
8+
39
on:
410
workflow_dispatch: # allows manual triggering
511
inputs:

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ After submitting your PR:
6363
- Optionally pick a `<module>` from here: https://github.com/ggml-org/llama.cpp/wiki/Modules
6464
- Let other maintainers merge their own PRs
6565
- When merging a PR, make sure you have a good understanding of the changes
66+
- If a PR does not warrant a new release, add `[no release]` in the squashed commit to spare CI resources
6667
- Be mindful of maintenance: most of the work going into a feature happens after the PR is merged. If the PR author is not committed to contribute long-term, someone else needs to take responsibility (you)
6768

6869
Maintainers reserve the right to decline review or close pull requests for any reason, without any questions, particularly under any of the following conditions:

tests/gguf-model-data.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -705,10 +705,11 @@ gguf_context_ptr gguf_fetch_gguf_ctx(
705705
}
706706

707707
for (int i = 2; i <= model.n_split; i++) {
708-
char num_buf[6], total_buf[6];
709-
snprintf(num_buf, sizeof(num_buf), "%05d", i);
710-
snprintf(total_buf, sizeof(total_buf), "%05d", (int)model.n_split);
711-
std::string shard_name = split_prefix + "-" + num_buf + "-of-" + total_buf + ".gguf";
708+
char buf_num[32];
709+
char buf_tot[32];
710+
snprintf(buf_num, sizeof(buf_num), "%05d", i);
711+
snprintf(buf_tot, sizeof(buf_tot), "%05d", (int)model.n_split);
712+
std::string shard_name = split_prefix + "-" + buf_num + "-of-" + buf_tot + ".gguf";
712713

713714
auto shard = fetch_or_cached(repo, shard_name, cdir, repo_part, verbose);
714715
if (!shard.has_value()) {

0 commit comments

Comments
 (0)