Skip to content

Commit 0e4d7fa

Browse files
Merge branch 'AliceO2Group:master' into master
2 parents 6b56677 + 754dcbf commit 0e4d7fa

File tree

581 files changed

+58350
-28204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

581 files changed

+58350
-28204
lines changed

.git-blame-ignore-revs

Whitespace-only changes.

.github/workflows/mega-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
id: ml
3939
# You can override MegaLinter flavor used to have faster performances
4040
# More info at https://megalinter.io/flavors/
41-
uses: oxsecurity/megalinter@v8.5.0
41+
uses: oxsecurity/megalinter@v8.7.0
4242
env:
4343
# All available variables are described in documentation:
4444
# https://megalinter.io/configuration/

.github/workflows/o2-linter.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# Find issues in O2 code
33
name: O2 linter
44

5-
'on': [pull_request, push]
5+
"on": [pull_request_target, push]
66
permissions: {}
77
env:
8-
MAIN_BRANCH: master
8+
BRANCH_MAIN: master
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
@@ -15,20 +15,47 @@ jobs:
1515
o2-linter:
1616
name: O2 linter
1717
runs-on: ubuntu-24.04
18+
permissions:
19+
pull-requests: write
1820
steps:
21+
- name: Set branches
22+
run: |
23+
if [[ "${{ github.event_name }}" == "push" ]]; then
24+
branch_head="${{ github.ref }}"
25+
branch_base="${{ env.BRANCH_MAIN }}"
26+
else
27+
branch_head="refs/pull/${{ github.event.pull_request.number }}/merge"
28+
branch_base="${{ github.event.pull_request.base.ref }}"
29+
fi
30+
echo BRANCH_HEAD="$branch_head" >> "$GITHUB_ENV"
31+
echo BRANCH_BASE="$branch_base" >> "$GITHUB_ENV"
1932
- name: Checkout Code
2033
uses: actions/checkout@v4
2134
with:
35+
ref: ${{ env.BRANCH_HEAD }}
2236
fetch-depth: 0 # needed to get the full history
2337
- name: Run tests
38+
id: linter
2439
run: |
25-
# Diff against the common ancestor of the source branch and the main branch.
26-
readarray -t files < <(git diff --diff-filter d --name-only origin/${{ env.MAIN_BRANCH }}...)
40+
# Diff against the common ancestor of the source (head) branch and the target (base) branch.
41+
echo "Diffing ${{ env.BRANCH_HEAD }} against ${{ env.BRANCH_BASE }}."
42+
readarray -t files < <(git diff --diff-filter d --name-only origin/${{ env.BRANCH_BASE }}...)
2743
if [ ${#files[@]} -eq 0 ]; then
2844
echo "::notice::No files to lint."
45+
echo "linter_ran=0" >> "$GITHUB_OUTPUT"
2946
exit 0
3047
fi
31-
[ ${{ github.event_name }} == 'pull_request' ] && options="-g"
48+
echo "linter_ran=1" >> "$GITHUB_OUTPUT"
49+
[[ "${{ github.event_name }}" == "pull_request_target" ]] && options="-g"
3250
# shellcheck disable=SC2086 # Ignore unquoted options.
3351
python3 Scripts/o2_linter.py $options "${files[@]}"
3452
echo "Tip: If you allow actions in your fork repository, O2 linter will run when you push commits."
53+
- name: Comment PR
54+
if: (success() || failure()) && (github.event_name == 'pull_request_target' && steps.linter.outputs.linter_ran == 1)
55+
uses: thollander/actions-comment-pull-request@v3
56+
with:
57+
comment-tag: o2-linter
58+
message: "**O2 linter results:**
59+
❌ ${{ steps.linter.outputs.n_issues }} errors,
60+
⚠️ ${{ steps.linter.outputs.n_tolerated }} warnings,
61+
🔕 ${{ steps.linter.outputs.n_disabled }} disabled"

.mega-linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ PYTHON_PYRIGHT_CONFIG_FILE: pyproject.toml
3939
PYTHON_RUFF_CONFIG_FILE: pyproject.toml
4040
CPP_CPPLINT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
4141
CPP_CLANG_FORMAT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
42+
CPP_CPPCHECK_ARGUMENTS: --language=c++ --std=c++20 --check-level=exhaustive --suppressions-list=cppcheck_config
4243
REPOSITORY_GITLEAKS_PR_COMMITS_SCAN: true

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ repos:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- repo: https://github.com/pre-commit/mirrors-clang-format
10-
rev: v18.1.3 # clang-format version
10+
rev: v20.1.5 # clang-format version
1111
hooks:
1212
- id: clang-format
1313
- repo: https://github.com/cpplint/cpplint
14-
rev: 2.0.0
14+
rev: 2.0.2
1515
hooks:
1616
- id: cpplint

ALICE3/Core/CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,25 @@
1212
o2physics_add_library(ALICE3Core
1313
SOURCES TOFResoALICE3.cxx
1414
DelphesO2TrackSmearer.cxx
15-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore)
15+
PUBLIC_LINK_LIBRARIES O2::Framework
16+
O2Physics::AnalysisCore)
1617

1718
o2physics_target_root_dictionary(ALICE3Core
1819
HEADERS TOFResoALICE3.h
20+
TrackUtilities.h
1921
DelphesO2TrackSmearer.h
2022
LINKDEF ALICE3CoreLinkDef.h)
2123

2224
o2physics_add_library(FastTracker
2325
SOURCES FastTracker.cxx
24-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore)
26+
DetLayer.cxx
27+
DelphesO2LutWriter.cxx
28+
PUBLIC_LINK_LIBRARIES O2::Framework
29+
O2Physics::AnalysisCore
30+
O2Physics::ALICE3Core)
2531

2632
o2physics_target_root_dictionary(FastTracker
2733
HEADERS FastTracker.h
34+
DetLayer.h
35+
DelphesO2LutWriter.h
2836
LINKDEF FastTrackerLinkDef.h)

0 commit comments

Comments
 (0)