Skip to content

chore: expand TrackFinderPerformanceWriter usage boolean throughout python #36396

chore: expand TrackFinderPerformanceWriter usage boolean throughout python

chore: expand TrackFinderPerformanceWriter usage boolean throughout python #36396

Workflow file for this run

name: Analysis
on:
push:
branches:
- main
pull_request:
branches:
- main
- 'release/**'
- 'develop/**'
paths-ignore:
- "docs/**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CTEST_OUTPUT_ON_FAILURE: 1
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 1.25G
CCACHE_KEY_SUFFIX: r2
ACTS_LOG_FAILURE_THRESHOLD: WARNING
# NOTE this only builds core unittests to reduce the output size. if we
# found a way to have Github actions not fail regularly with this job
# all unit tests should be reactivated.
permissions:
contents: read
jobs:
build_debug:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2404:85
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Install dependencies
uses: ./.github/actions/dependencies
with:
compiler: g++
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
env_file: .env
- name: Save PR metadata
if: github.event_name == 'pull_request'
env:
PR_NUMBER: ${{ github.event.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
MERGE_SHA: ${{ github.sha }}
run: |
# Shallow clone: parent commits aren't available via git,
# but GitHub provides the SHAs through the event context.
printf '{"pr_number":"%s","pr_sha":"%s","base_sha":"%s","merge_sha":"%s"}\n' \
"$PR_NUMBER" \
"$PR_SHA" \
"$BASE_SHA" \
"$MERGE_SHA" \
> PR_metadata.json
cat PR_metadata.json
- name: Persist PR metadata
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: PR_metadata
path: PR_metadata.json
- name: Cache build
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ runner.os }}-${{ github.job }}-${{ env.CCACHE_KEY_SUFFIX }}-${{ github.sha }}
restore-keys: |
ccache-${{ runner.os }}-${{ github.job }}-${{ env.CCACHE_KEY_SUFFIX }}-
- name: Configure
run: >
ccache -z &&
CI/dependencies/run.sh .env
cmake -B build -S . --preset=github-ci-coverage
- name: Build
run: cmake --build build
- name: ccache stats
run: ccache -s
- name: Unit tests
run: >
CI/dependencies/run.sh .env
ctest --test-dir build -j$(nproc) --label-exclude "slow"
- name: Remove .o files
run: >
du -sh build
&& find build -name *.o -delete
&& du -sh build
- name: Coverage
run: |
uv run --no-project --no-build CI/test_coverage.py build --filter
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: coverage-build
path: |
build/compile_commands.json
build/coverage/cov.xml
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
id: artifact-upload-step
with:
name: coverage-html
path: build/coverage/html
- name: Coverage display
env:
REPOSITORY: ${{ github.repository }}
ARTIFACT_ID: ${{ steps.artifact-upload-step.outputs.artifact-id }}
run: |
base_link="https://acts-herald.app.cern.ch/view/${REPOSITORY}/${ARTIFACT_ID}"
link="$base_link/index.html"
echo "🛡️ Code coverage available at: $link"
echo "**🛡️ Code coverage available [here]($link)**" >> $GITHUB_STEP_SUMMARY
clang_tidy:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2404_clang22:85
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Mark workspace as safe
run: git config --global --add safe.directory /__w/acts/acts
- name: Fetch base branch
if: github.event_name == 'pull_request'
env:
BASE_REF: ${{ github.base_ref }}
run: git fetch origin "$BASE_REF"
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Install clang-tidy
run: |
apt-get update && apt-get install -y clang-tidy-22
ln -sf /usr/bin/clang-tidy-22 /usr/bin/clang-tidy
ln -sf /usr/bin/clang++-22 /usr/bin/clang++
ln -sf /usr/bin/clang-22 /usr/bin/clang
- name: Install dependencies
uses: ./.github/actions/dependencies
with:
compiler: clang++
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
env_file: .env
- name: Configure
run: >
ccache -z &&
CI/dependencies/run.sh .env
cmake -B build -S .
--preset=gitlab-ci-clangtidy
- name: Run codegen
run: cmake --build build --target ActsCodegen
- name: Analyze (PR - changed files only)
if: github.event_name == 'pull_request'
env:
BASE_REF: ${{ github.base_ref }}
run: >
uv run --no-build CI/clang_tidy/run_clang_tidy_pr.py
analyze build fixes.yml --base-ref "origin/$BASE_REF"
- name: Analyze (push - all files)
if: github.event_name == 'push'
run: >
uv run --no-build CI/clang_tidy/run_clang_tidy_pr.py
analyze build fixes.yml --all
- name: Upload fixes
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: clang-tidy-fixes
path: fixes.yml
- name: Annotate
run: >
uv run --no-build CI/clang_tidy/run_clang_tidy_pr.py
annotate fixes.yml