-
Notifications
You must be signed in to change notification settings - Fork 30
139 lines (118 loc) · 3.33 KB
/
Copy pathci.yml
File metadata and controls
139 lines (118 loc) · 3.33 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: CI
on:
workflow_dispatch:
pull_request:
merge_group:
push:
branches:
- master
- main
- develop
jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v6
with:
python-version: 3.12
- uses: pre-commit/action@v3.0.0
with:
extra_args: --hook-stage manual --all-files
checks:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
needs: [pre-commit]
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.13", "3.14", "3.14t"]
runs-on: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm]
exclude:
- python-version: "3.9"
runs-on: windows-11-arm
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: python -m pip install . --group test
- name: Test package
if: ${{ !endsWith(matrix.python-version , 't') }}
run: python -m pytest
- name: Test package (parallel)
if: endsWith(matrix.python-version , 't')
run: python -m pytest --parallel-threads=16 --iterations=10
checkroot:
name: Check ROOT bindings
needs: [pre-commit]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v4
with:
python-version: 3.12
miniforge-version: latest
- name: Install ROOT
shell: bash -l {0}
run: |
mamba install root
- name: Install package
shell: bash -l {0}
run: python -m pip install . --group test
- name: Test package
shell: bash -l {0}
run: pytest
test-cvmfs:
name: Test latest corrections on CVMFS
needs: [checks]
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- uses: cvmfs-contrib/github-action-cvmfs@v5
with:
cvmfs_repositories: "cms-griddata.cern.ch"
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install package
run: python -m pip install . --group test
- name: Test package
run: |
mkdir -p .benchmarks
python -m pytest -m cvmfs --benchmark-json=.benchmarks/cvmfs-benchmark.json --benchmark-max-time 0.1
- name: Upload benchmark artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: cvmfs-benchmark-json
path: .benchmarks/cvmfs-benchmark.json
if-no-files-found: ignore
pass:
name: All tests passed
needs: [checks, checkroot, test-cvmfs]
runs-on: ubuntu-latest
steps:
- run: echo "All jobs passed"