|
| 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 | + !( |
| 30 | + contains(github.event.pull_request.title, '[skip-ci]') || |
| 31 | + contains(github.event.pull_request.title, '[skip ci]') || |
| 32 | + contains(github.event.pull_request.labels.*.name, 'skip ci') |
| 33 | + )) |
| 34 | +
|
| 35 | + permissions: |
| 36 | + contents: read |
| 37 | + |
| 38 | + strategy: |
| 39 | + fail-fast: false |
| 40 | + matrix: |
| 41 | + # Specify image + (optional) build option overrides |
| 42 | + # |
| 43 | + # Available images: https://github.com/root-project/root-ci-images |
| 44 | + # Common configs: {Release,Debug,RelWithDebInfo) |
| 45 | + # Build options: https://root.cern/install/build_from_source/#all-build-options |
| 46 | + include: |
| 47 | + - image: alma9 |
| 48 | + overrides: ["CMAKE_BUILD_TYPE=Debug"] |
| 49 | + |
| 50 | + runs-on: |
| 51 | + - self-hosted |
| 52 | + - linux |
| 53 | + - ${{ matrix.architecture == null && 'x64' || matrix.architecture }} |
| 54 | + - ${{ matrix.extra-runs-on == null && 'cpu' || matrix.extra-runs-on }} |
| 55 | + |
| 56 | + name: Cling Tests |
| 57 | + |
| 58 | + container: |
| 59 | + image: registry.cern.ch/root-ci/${{ matrix.image }}:buildready # KEEP IN SYNC WITH env key below |
| 60 | + options: --security-opt label=disable --rm ${{ matrix.property == 'gpu' && '--device nvidia.com/gpu=all' || '' }} # KEEP IN SYNC WITH env key below |
| 61 | + volumes: |
| 62 | + - ${{ matrix.image }}_ccache_volume:/github/home/.cache/ccache |
| 63 | + env: |
| 64 | + CONTAINER_IMAGE: "registry.cern.ch/root-ci/${{ matrix.image }}:buildready" #KEEP IN SYNC WITH ABOVE |
| 65 | + CONTAINER_OPTIONS: "--security-opt label=disable --rm ${{ matrix.property == 'gpu' && '--device nvidia.com/gpu=all' || '' }}" #KEEP IN SYNC WITH ABOVE |
| 66 | + |
| 67 | + steps: |
| 68 | + - name: Configure large ccache |
| 69 | + if: ${{ matrix.is_special }} |
| 70 | + run: | |
| 71 | + ccache -o max_size=5G |
| 72 | + ccache -p || true |
| 73 | + ccache -s || true |
| 74 | +
|
| 75 | + - name: Configure small ccache |
| 76 | + if: ${{ !matrix.is_special }} |
| 77 | + run: | |
| 78 | + ccache -o max_size=1.5G |
| 79 | + ccache -p || true |
| 80 | + ccache -s || true |
| 81 | +
|
| 82 | + - name: Checkout |
| 83 | + uses: actions/checkout@v4 |
| 84 | + with: |
| 85 | + ref: ${{ inputs.ref_name }} |
| 86 | + |
| 87 | + - name: Pull Request Build |
| 88 | + env: |
| 89 | + INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') }} |
| 90 | + GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }} |
| 91 | + CMAKE_GENERATOR: ${{ matrix.cmake_generator }} |
| 92 | + OVERRIDES: ${{ join( matrix.overrides, ' ') }} |
| 93 | + run: ".github/workflows/root-ci-config/build_root.py |
| 94 | + --buildtype RelWithDebInfo |
| 95 | + --platform ${{ matrix.image }} |
| 96 | + --dockeropts \"$CONTAINER_OPTIONS\" |
| 97 | + --incremental $INCREMENTAL |
| 98 | + --base_ref ${{ github.base_ref }} |
| 99 | + --sha ${{ github.sha }} |
| 100 | + --pull_repository ${{ github.event.pull_request.head.repo.clone_url }} |
| 101 | + --head_ref refs/pull/${{ github.event.pull_request.number }}/head:${{ github.event.pull_request.head.ref }} |
| 102 | + --head_sha ${{ github.event.pull_request.head.sha }} |
| 103 | + --repository ${{ github.server_url }}/${{ github.repository }} |
| 104 | + --overrides ${GLOBAL_OVERRIDES} ${OVERRIDES} |
| 105 | + --clingtests_only true |
| 106 | + " |
| 107 | + |
| 108 | + - name: ccache info (post) |
| 109 | + run: | |
| 110 | + ccache -s || true |
0 commit comments