Skip to content

Integrate ccache in ldmx-sw #696

Integrate ccache in ldmx-sw

Integrate ccache in ldmx-sw #696

name: Build with ASAN and UBSAN
on:
workflow_dispatch:
pull_request:
branches: [trunk]
types: [opened, ready_for_review]
env:
LDMX_DOCKER_TAG: ldmx/dev:latest
jobs:
build-with-asan-ubsan:
runs-on: ubuntu-latest
steps:
- name: Checkout ldmx-sw
uses: actions/checkout@v6
with:
submodules: 'recursive'
fetch-depth: 0
- name: Install just
uses: extractions/setup-just@v3
- name: Cache ccache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-asan-ubsan-${{ github.sha }}
restore-keys: |
ccache-asan-ubsan-
- name: Compile and Install ldmx-sw
run: |
just install-denv init configure-asan-ubsan
just build
shell: bash
- name: Run ecal_pn config
id: run_ecal_pn
continue-on-error: true
run: |
just setenv LDMX_NUM_EVENTS=1000
just setenv LDMX_RUN_NUMBER=7500
just setenv LDMX_LOG_LEVEL=5
just setenv ASAN_OPTIONS=log_path=output.log
just setenv LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/lsan_suppressions.txt
just fire ${GITHUB_WORKSPACE}/.github/validation_samples/ecal_pn/config.py
shell: bash
- name: Save the output of ASAN/UBSAN
uses: actions/upload-artifact@v7
with:
name: ASAN_UBSAN_output
path: output.log*
- name: Fail ASAN/UBSAN if there were errors
if: steps.run_ecal_pn.outcome == 'failure'
run: exit 2