Skip to content

Commit 403058a

Browse files
committed
Add separate Cling Test CI
1 parent 501ac40 commit 403058a

2 files changed

Lines changed: 115 additions & 1 deletion

File tree

.github/workflows/cling-test.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: 'Cling Test CI'
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'interpreter/cling/**'
7+
- '.github/workflows/cling-test.yml'
8+
9+
env:
10+
PYTHONUNBUFFERED: true
11+
OS_APPLICATION_CREDENTIAL_ID: '7f5b64a265244623a3a933308569bdba'
12+
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
13+
OS_AUTH_TYPE: 'v3applicationcredential'
14+
OS_AUTH_URL: 'https://keystone.cern.ch/v3'
15+
OS_IDENTITY_API_VERSION: 3
16+
OS_INTERFACE: 'public'
17+
OS_REGION_NAME: 'cern'
18+
GLOBAL_OVERRIDES: 'asserts=ON LLVM_ENABLE_ASSERTIONS=ON'
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
check-cling:
26+
# For any event that is not a PR, the CI will always run. In PRs, the CI
27+
# can be skipped if the tag [skip-ci] or [skip ci] is written in the title.
28+
if: |
29+
(github.repository_owner == 'root-project' && github.event_name != 'pull_request') ||
30+
(github.event_name == 'pull_request' && !(
31+
contains(github.event.pull_request.title, '[skip-ci]') ||
32+
contains(github.event.pull_request.title, '[skip ci]') ||
33+
contains(github.event.pull_request.labels.*.name, 'skip ci')
34+
))
35+
36+
permissions:
37+
contents: read
38+
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
# Specify image + (optional) build option overrides
43+
#
44+
# Available images: https://github.com/root-project/root-ci-images
45+
# Common configs: {Release,Debug,RelWithDebInfo)
46+
# Build options: https://root.cern/install/build_from_source/#all-build-options
47+
include:
48+
- image: alma9
49+
platform_config: alma9-minimal
50+
51+
runs-on:
52+
- self-hosted
53+
- linux
54+
- ${{ matrix.architecture == null && 'x64' || matrix.architecture }}
55+
- ${{ matrix.extra-runs-on == null && 'cpu' || matrix.extra-runs-on }}
56+
57+
name: Cling Tests
58+
59+
container:
60+
image: registry.cern.ch/root-ci/${{ matrix.image }}:buildready # KEEP IN SYNC WITH env key below
61+
options: --security-opt label=disable --rm ${{ matrix.property == 'gpu' && '--device nvidia.com/gpu=all' || '' }} # KEEP IN SYNC WITH env key below
62+
volumes:
63+
- ${{ matrix.image }}_ccache_volume:/github/home/.cache/ccache
64+
env:
65+
CONTAINER_IMAGE: "registry.cern.ch/root-ci/${{ matrix.image }}:buildready" #KEEP IN SYNC WITH ABOVE
66+
CONTAINER_OPTIONS: "--security-opt label=disable --rm ${{ matrix.property == 'gpu' && '--device nvidia.com/gpu=all' || '' }}" #KEEP IN SYNC WITH ABOVE
67+
68+
steps:
69+
- name: Configure large ccache
70+
if: ${{ matrix.is_special }}
71+
run: |
72+
ccache -o max_size=5G
73+
ccache -p || true
74+
ccache -s || true
75+
76+
- name: Configure small ccache
77+
if: ${{ !matrix.is_special }}
78+
run: |
79+
ccache -o max_size=1.5G
80+
ccache -p || true
81+
ccache -s || true
82+
83+
- name: Checkout
84+
uses: actions/checkout@v4
85+
with:
86+
ref: ${{ inputs.ref_name }}
87+
88+
- name: Pull Request Build
89+
env:
90+
INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') }}
91+
GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }}
92+
CMAKE_GENERATOR: ${{ matrix.cmake_generator }}
93+
OVERRIDES: ${{ join( matrix.overrides, ' ') }}
94+
run: ".github/workflows/root-ci-config/build_root.py
95+
--buildtype RelWithDebInfo
96+
--platform ${{ matrix.image }}
97+
--dockeropts \"$CONTAINER_OPTIONS\"
98+
--incremental $INCREMENTAL
99+
--base_ref ${{ github.base_ref }}
100+
--sha ${{ github.sha }}
101+
--pull_repository ${{ github.event.pull_request.head.repo.clone_url }}
102+
--head_ref refs/pull/${{ github.event.pull_request.number }}/head:${{ github.event.pull_request.head.ref }}
103+
--head_sha ${{ github.event.pull_request.head.sha }}
104+
--repository ${{ github.server_url }}/${{ github.repository }}
105+
--overrides ${GLOBAL_OVERRIDES} ${OVERRIDES}
106+
--clingtests_only true
107+
"
108+
109+
- name: ccache info (post)
110+
run: |
111+
ccache -s || true

.github/workflows/root-ci-config/build_root.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ def main():
102102
ctest_custom_flags = options_dict['ROOT_CTEST_CUSTOM_FLAGS']
103103
options_dict.pop('ROOT_CTEST_CUSTOM_FLAGS') # we do not want a -D called like that
104104

105+
if args.clingtests_only:
106+
options_dict['clingtest'] = "ON"
107+
105108
options = build_utils.cmake_options_from_dict(options_dict)
106109
print("Full build options")
107110
for key, val in sorted(options_dict.items()):
@@ -191,7 +194,7 @@ def main():
191194
if args.coverage:
192195
create_coverage_xml()
193196

194-
if testing and ctest_returncode != 0:
197+
if testing and not args.clingtests_only and ctest_returncode != 0:
195198
handle_test_failure(ctest_returncode)
196199

197200
print_trace()

0 commit comments

Comments
 (0)