Skip to content

Commit d74bed0

Browse files
veprblMikkel Moller Modekjaer
authored andcommitted
feat: add eic-shell CI build (acts-project#4297)
This adds a build of Acts in eic-shell container, which then also builds EICrecon main branch against it. This is to actively detect breaking changes.
1 parent 9f7f974 commit d74bed0

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

.github/workflows/builds.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,3 +411,95 @@ jobs:
411411
run: >
412412
PATH="${{ env.DEPENDENCY_DIR }}/bin:$PATH"
413413
&& ./build-downstream/bin/ShowActsVersion
414+
415+
external_eic-shell:
416+
runs-on: ubuntu-latest
417+
steps:
418+
- uses: actions/checkout@v4
419+
with:
420+
submodules: true
421+
path: acts
422+
423+
- uses: actions/checkout@v4
424+
with:
425+
repository: eic/EICrecon
426+
path: EICrecon
427+
428+
- name: Setup CMVFS
429+
uses: cvmfs-contrib/github-action-cvmfs@v5
430+
431+
- name: Restore ccache
432+
id: ccache-restore
433+
uses: actions/cache/restore@v4
434+
with:
435+
path: ${{ env.CCACHE_DIR }}
436+
key: ccache-${{ runner.os }}-${{ github.job }}-${{ env.CCACHE_KEY_SUFFIX }}-${{ github.sha }}
437+
restore-keys: |
438+
ccache-${{ runner.os }}-${{ github.job }}-${{ env.CCACHE_KEY_SUFFIX }}-
439+
440+
- name: Build
441+
id: build
442+
uses: eic/run-cvmfs-osg-eic-shell@main
443+
continue-on-error: true
444+
with:
445+
platform-release: "eic_xl:nightly"
446+
run: |
447+
pushd acts
448+
ccache -z && \
449+
export CMAKE_INSTALL_PREFIX=$HOME/prefix
450+
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
451+
echo "::group::Acts configure phase"
452+
cmake -B build -S . \
453+
-GNinja \
454+
-DACTS_BUILD_EXAMPLES=ON \
455+
-DACTS_BUILD_FATRAS=ON \
456+
-DACTS_BUILD_PLUGIN_DD4HEP=ON
457+
echo "::endgroup::"
458+
echo "::group::Acts build phase"
459+
cmake --build build
460+
echo "::endgroup::"
461+
echo "::group::Acts install phase"
462+
cmake --install build
463+
echo "::endgroup::"
464+
popd
465+
466+
pushd EICrecon
467+
export LD_LIBRARY_PATH="$CMAKE_INSTALL_PREFIX/lib:$LD_LIBRARY_PATH"
468+
echo "::group::EICrecon configure phase"
469+
ccache -z && \
470+
env CXXFLAGS="-I$CMAKE_INSTALL_PREFIX/include" \
471+
LDFLAGS="-L$CMAKE_INSTALL_PREFIX/lib" \
472+
cmake -B build -S . \
473+
-GNinja \
474+
-DActs_ROOT=$CMAKE_INSTALL_PREFIX
475+
echo "::endgroup::"
476+
echo "::group::EICrecon build phase"
477+
cmake --build build
478+
echo "::endgroup::"
479+
popd
480+
481+
ccache -s
482+
483+
- name: Create comment body
484+
if: ${{ steps.build.outcome == 'failure' && github.event_name == 'pull_request' }}
485+
run: |
486+
cat >comment-50-external-failure.md <<EOF
487+
# ❗️: Downstream build failure
488+
489+
- eic-shell (cc @acts-project/epic-contacts)
490+
EOF
491+
492+
- name: Upload Artifact
493+
if: ${{ steps.build.outcome == 'failure' && github.event_name == 'pull_request' }}
494+
uses: actions/upload-artifact@v4
495+
with:
496+
name: comment-50-external-failure.md
497+
path: comment-50-external-failure.md
498+
retention-days: 5
499+
500+
- name: Save ccache
501+
uses: actions/cache/save@v4
502+
if: always()
503+
with:
504+
path: ${{ github.workspace }}/ccache
505+
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}

.github/workflows/report.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ jobs:
4242
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/physmon.zip`, Buffer.from(download.data));
4343
let = url = `https://acts-herald.app.cern.ch/view/${process.env.GITHUB_REPOSITORY}/${matchArtifact.id}`;
4444
45+
// Check if any other comment artifacts are available
46+
let matchCommentArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
47+
return artifact.name.startsWith('comment-')
48+
});
49+
core.setOutput('comment-artifacts-found', matchCommentArtifacts.length >= 1);
50+
4551
core.exportVariable('ARTIFACT_URL', url)
4652
return true;
4753
@@ -78,6 +84,15 @@ jobs:
7884
with:
7985
python-version: '3.12'
8086

87+
- uses: actions/download-artifact@v4
88+
if: steps.dl-af.outputs.comment-artifacts-found
89+
with:
90+
pattern: comment-*.md
91+
merge-multiple: true
92+
github-token: ${{ github.token }}
93+
repository: ${{ github.event.workflow_run.repository.full_name }}
94+
run-id: ${{ github.event.workflow_run.id }}
95+
8196
- name: Render comment
8297
if: steps.get-pr-number.outcome == 'success'
8398
env:
@@ -91,6 +106,7 @@ jobs:
91106
else
92107
echo "🟥 summary not found!" >> comment.md
93108
fi
109+
cat comment-*.md >> comment.md || true
94110
cat comment.md
95111
96112
- name: Find Comment

0 commit comments

Comments
 (0)