Elffuss BraidHub

kikocis/kleidiai public

main · 3.9 KiBRawPermalink
1#
2# SPDX-FileCopyrightText: Copyright 2024-2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6# Summary:
7# Shared public CI entry point. It defines global defaults and includes the
8# project-specific CI files for KleidiAI and experimental/ops.
9# Purpose and scope:
10# - Keep shared stages, variables, defaults and workflow rules in one place.
11# - Include focused job definitions from .gitlab/ci/*.yml.
12# - Preserve release/default-branch behavior through GitLab's expanded config.
13
14include:
15 - local: .gitlab/ci/kleidiai.yml
16 - local: .gitlab/ci/experimental-ops.yml
17
18stages:
19 - build
20 - test
21 - analyze
22 - deploy
23
24variables:
25 # Set of KUBERNETES_* variables applies only to dynamic EKS cluster and do not work
26 # with other runners
27 #
28 # KUBERNETES_NODE_SELECTOR_ARCH selects architecture for job container.
29 # For arm64, it should be: 'kubernetes.io/arch=arm64'. This is default if possible
30 # For amd64 it should be: 'kubernetes.io/arch=amd64'
31 KUBERNETES_NODE_SELECTOR_ARCH: "kubernetes.io/arch=arm64"
32
33 # Define what type of node to use (on-demand or spot). Spot is recommended and is MUCH less expensive than on-demand.
34 # But it can be reclaimed by cloud at any time causing the pod to lose the node.
35 # on-demand is used for a longer runs to avoid retries
36 KUBERNETES_NODE_SELECTOR_TYPE: "karpenter.sh/capacity-type=spot"
37
38 # Define what generation of node to use
39 # For performance nodes - use 'karpenter.k8s.aws/instance-generation=8'
40 # faster execution for jobs relying on CPU like compilation or on-host testing
41 # and results in lower total cost
42 #
43 # For cost-efficient nodes - use 'karpenter.k8s.aws/instance-generation=7'
44 # slower execution, but could be used for jobs waiting for different kind of
45 # remote infrastructure like on-device testing or accessing servers
46 #
47 KUBERNETES_NODE_SELECTOR_INSTANCE_GENERATION: "karpenter.k8s.aws/instance-generation=8"
48
49 # KUBERNETES_CPU_REQUEST reserves the amount CPUs on a node. The amount is guaranteed for a container
50 KUBERNETES_CPU_REQUEST: 4
51 # KUBERNETES_CPU_LIMIT limits maximum limit of CPU the job container can use. This is not reserved or guaranteed
52 KUBERNETES_CPU_LIMIT: 6
53
54 # KUBERNETES_MEMORY_REQUEST reserves the amount memory on a node. The amount is guaranteed for a container
55 KUBERNETES_MEMORY_REQUEST: 4Gi
56 # KUBERNETES_MEMORY_LIMIT limits maximum limit of memory the job container can use. This is not reserved or guaranteed
57 KUBERNETES_MEMORY_LIMIT: 6Gi
58
59 # This variable defines a number of parallel jobs (-j) which should be used.
60 # We could not rely on `nproc` or any other standard detection result as it would return
61 # number of ALL host CPUs, not only reserved.
62 # Parallel build/test level matching reserved CPUs (prevents OOM from over-sharding).
63 PARALLEL_JOBS: ${KUBERNETES_CPU_REQUEST}
64
65 # Android NDK version.
66 MACOS_ANDROID_NDK_VERSION: "27.3.13750724"
67
68 # Enable more verbose script section content printout
69 FF_SCRIPT_SECTIONS: true
70
71 # Default cache policy is to pull only
72 CACHE_POLICY: pull
73
74 # Fixed seed for test reproducibility
75 GLOBAL_TEST_SEED: 42
76
77 # Enable experimental ops in top-level CMake builds.
78 KLEIDIAI_BUILD_EXPERIMENTAL_OPS: "ON"
79
80 # Keep repeated GTest skip details out of CI logs. Skip details remain in XML reports.
81 KLEIDIAI_TEST_CI_QUIET: 1
82
83default:
84 image: registry.gitlab.arm.com/kleidi/kleidiai/image:latest
85 tags:
86 - arm64
87 interruptible: true
88 retry:
89 max: 2
90 when:
91 - job_execution_timeout
92 - stuck_or_timeout_failure
93 - runner_system_failure
94
95workflow:
96 auto_cancel:
97 # Interrupt old pipeline when new one pushed for MR
98 on_new_commit: interruptible
99 rules:
100 # Avoid starting pipelines for draft merge requests.
101 - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_DRAFT == "true"
102 when: never
103 - when: always