Repository navigation
77 lines (77 loc) · 3.74 KB
/
Copy pathci.yml
File metadata and controls
77 lines (77 loc) · 3.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Copyright 2026 bong-water-water-bong
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: ci
on:
push:
branches: [main]
pull_request:
# labeled/unlabeled: the "pin rollback" label turns the pin check off
types: [opened, synchronize, reopened, labeled, unlabeled]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-24.04
# Ubuntu 26.04's own GCC 16 (16-20260322 and later) ships <simd> (C++26 std::simd); the
# toolchain PPA's GCC 16 for 24.04 is an older snapshot without it.
container:
image: ubuntu:26.04
# A real init as PID 1 reaps orphans, as systemd does on a host: smoke_serve SIGKILLs
# serve and checks that its backend is gone, and without a reaper the exited backend
# stays a zombie that kill -0 still finds.
options: --init
steps:
- name: Tools for checkout and the build
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates git \
python3 python3-venv curl jq file procps make gcc-16 g++-16 cmake ninja-build libcurl4-openssl-dev libzstd-dev \
libssl-dev libdrm-dev libpcre2-dev
git config --global --add safe.directory "$GITHUB_WORKSPACE"
python3 -m venv /opt/ci-venv && echo /opt/ci-venv/bin >> "$GITHUB_PATH"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Copyright notice on every file
run: python3 tools/copyright.py --check
- name: Submodule pins only move forward
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'pin rollback')
env:
GITHUB_TOKEN: ${{ github.token }}
BASE: ${{ github.event.pull_request.base.sha }}
run: |
git fetch -q --depth=1 origin "$BASE"
python3 tools/check_pins.py "$BASE"
- name: GGUF -> Q4NX repack, ternary -> Q4_0, MTP draft vocabulary
run: |
python3 -m pip install numpy gguf
python3 tests/gguf_to_q4nx_test.py
python3 tests/ternary_to_q4_0_test.py
python3 tests/mtp_draft_vocab_test.py
python3 tests/check_pins_test.py
python3 tests/hrx_long_prompt_test.py
- name: Configure
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-16 -DCMAKE_CXX_COMPILER=g++-16
- name: Build
# Every target a ctest test invokes must be listed here: `ctest` runs whatever
# binaries exist, so a test whose target is missing reports "Not Run" and never
# executes. Keep this list in step with add_test() in CMakeLists.txt.
run: |
cmake --build build --target onebit \
npu_full_elf_test npu_pack_test npu_q4nx_test npu_private_route_test \
tokenizer_test think_split_test gguf_meta_test mem_admit_test pm_routes_test \
laya_encoder_test http_guard_test moe_gguf_index_test laya_bounds_test \
npu_model_bounds_test npu_forward_loader_test tokenizer_linear_test hrx_placement_test hrx_cwsr_test -j
- name: Test
# One hung test must not hold the job for hours: each test gets 10 minutes.
run: ctest --test-dir build --output-on-failure --timeout 600