Skip to content

Commit

Permalink
fix: switch from env to inputs as platform/release variables
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc authored Jan 4, 2024
1 parent f6f81ca commit 0ba6b55
Showing 1 changed file with 25 additions and 27 deletions.
52 changes: 25 additions & 27 deletions .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ concurrency:
cancel-in-progress: true

env:
platform: ${{ inputs.platform || 'jug_xl' }}
release: ${{ inputs.release || 'nightly' }}
detector-version: ${{ inputs.detector-version || 'main' }}
clang-tidy-iwyu-CC: clang
clang-tidy-iwyu-CMAKE_BUILD_TYPE: Debug
Expand Down Expand Up @@ -71,7 +69,7 @@ jobs:
- CC: clang
CXX: clang++
CMAKE_BUILD_TYPE: Release
release: ${{ env.release }}
release: ${{ inputs.release }}
steps:
- uses: actions/checkout@v3
- name: Prepare ccache timestamp
Expand Down Expand Up @@ -100,7 +98,7 @@ jobs:
- name: Build and install
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ matrix.release }}"
platform-release: "${{ inputs.platform }}:${{ matrix.release }}"
run: |
# install this repo
CC="${{ matrix.CC }}" CXX="${{ matrix.CXX }}" CXXFLAGS="${{ matrix.CXXFLAGS }}" cmake -B build -S . -DCMAKE_INSTALL_PREFIX=install -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} -DUSE_ASAN=ON -DUSE_TSAN=OFF -DUSE_UBSAN=ON
Expand All @@ -109,7 +107,7 @@ jobs:
- name: Check dynamic library loader paths
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ matrix.release }}"
platform-release: "${{ inputs.platform }}:${{ matrix.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH
Expand All @@ -120,7 +118,7 @@ jobs:
- name: Run testsuite
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ matrix.release }}"
platform-release: "${{ inputs.platform }}:${{ matrix.release }}"
run: |
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
ctest --test-dir build -V
Expand All @@ -129,7 +127,7 @@ jobs:
- name: Upload install directory
uses: actions/upload-artifact@v3
with:
name: install-${{ matrix.CC }}-eic-shell-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.platform }}-${{ matrix.release }}$
name: install-${{ matrix.CC }}-eic-shell-${{ matrix.CMAKE_BUILD_TYPE }}-${{ inputs.platform }}-${{ matrix.release }}$
path: install.tar.zst
if-no-files-found: error
# Only compress and upload build directory if we are going to use it later
Expand All @@ -140,7 +138,7 @@ jobs:
if: matrix.CC == env.clang-tidy-iwyu-CC && matrix.CMAKE_BUILD_TYPE == env.clang-tidy-iwyu-CMAKE_BUILD_TYPE
uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.CC }}-eic-shell-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.platform }}-${{ matrix.release }}
name: build-${{ matrix.CC }}-eic-shell-${{ matrix.CMAKE_BUILD_TYPE }}-${{ inputs.platform }}-${{ matrix.release }}
path: build.tar.zst
if-no-files-found: error

Expand All @@ -164,14 +162,14 @@ jobs:
uses: eic/run-cvmfs-osg-eic-shell@main
if: ${{ github.event_name == 'pull_request' }}
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
run: |
git diff ${{github.event.pull_request.base.sha}} ${{ github.event.pull_request.base.sha }} | clang-tidy-diff -p 1 -path build -quiet -export-fixes clang_tidy_fixes.yml -extra-arg='-std=c++20' -checks='-*,bugprone-*,-bugprone-narrowing-conversions' -clang-tidy-binary run-clang-tidy
- name: Run clang-tidy on all files
uses: eic/run-cvmfs-osg-eic-shell@main
if: ${{ github.event_name == 'push' }}
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
run: |
run-clang-tidy -p build -export-fixes clang_tidy_fixes.yml -extra-arg='-std=c++20'
- name: Upload clang-tidy fixes as artifact
Expand All @@ -192,7 +190,7 @@ jobs:
uses: eic/run-cvmfs-osg-eic-shell@main
if: ${{ github.event_name == 'pull_request' }}
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
run: |
# reduce headers until diff is stable
while [[ ${sha:-} != $(git diff | sha256sum) ]] ; do
Expand All @@ -206,7 +204,7 @@ jobs:
uses: eic/run-cvmfs-osg-eic-shell@main
if: ${{ github.event_name == 'push' }}
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
run: |
# don't aim for stability for all files
iwyu_tool.py -p build -- -Xiwyu --verbose=3 -Xiwyu --no_fwd_decls -Xiwyu --cxx17ns -Xiwyu --mapping_file=${{github.workspace}}/.github/iwyu.imp -Xiwyu --regex=ecmascript | tee iwyu_fixes.log
Expand Down Expand Up @@ -300,7 +298,7 @@ jobs:
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.retrieve_simulation_files.outputs.cache-hit != 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
npsim --compactFile ${DETECTOR_PATH}/${DETECTOR}_${{ matrix.detector_config }}.xml -G --random.seed 1 --gun.particle "${{ matrix.particle }}-" --gun.momentumMin "1*GeV" --gun.momentumMax "20*GeV" --gun.distribution "uniform" -N 100 --outputFile sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root -v WARNING
Expand Down Expand Up @@ -333,7 +331,7 @@ jobs:
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.retrieve_simulation_files.outputs.cache-hit != 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
python src/tests/LUMISPECCAL_test/TwoElectronsTopCAL.py genParticles.hepmc
Expand Down Expand Up @@ -370,7 +368,7 @@ jobs:
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.retrieve_simulation_files.outputs.cache-hit != 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
url=root://dtn-eic.jlab.org//work/eic2/EPIC/EVGEN/DIS/NC/${{matrix.beam}}/minQ2=${{matrix.minq2}}/pythia8NCDIS_${{matrix.beam}}_minQ2=${{matrix.minq2}}_beamEffects_xAngle=-0.025_hiDiv_1.hepmc3.tree.root
Expand Down Expand Up @@ -411,7 +409,7 @@ jobs:
- name: Run EICrecon (digitization)
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
Expand All @@ -427,7 +425,7 @@ jobs:
- name: Run EICrecon (reconstruction)
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
Expand Down Expand Up @@ -469,7 +467,7 @@ jobs:
- name: Run EICrecon
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
Expand Down Expand Up @@ -516,7 +514,7 @@ jobs:
- name: Run EICrecon
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
Expand Down Expand Up @@ -557,15 +555,15 @@ jobs:
- name: Check dynamic library loader paths
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
export LD_LIBRARY_PATH=$PWD/install/lib:$LD_LIBRARY_PATH
ldd -r install/lib/*.so install/lib/EICrecon/plugins/*.so
- name: Run EICrecon
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
Expand Down Expand Up @@ -604,7 +602,7 @@ jobs:
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.download_previous_artifact.outputs.found_artifact == 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
pip install 'pygithub>=2' 'bokeh>=3'
Expand Down Expand Up @@ -638,7 +636,7 @@ jobs:
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.download_previous_artifact.outputs.found_artifact == 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
echo "::group::pip install"
Expand Down Expand Up @@ -676,7 +674,7 @@ jobs:
- name: Run EICrecon
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
Expand Down Expand Up @@ -731,7 +729,7 @@ jobs:
- name: Run EICrecon
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
Expand Down Expand Up @@ -765,7 +763,7 @@ jobs:
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.download_previous_artifact.outputs.found_artifact == 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
pip install 'pygithub>=2' 'bokeh>=3'
Expand Down Expand Up @@ -799,7 +797,7 @@ jobs:
uses: eic/run-cvmfs-osg-eic-shell@main
if: steps.download_previous_artifact.outputs.found_artifact == 'true'
with:
platform-release: "${{ env.platform }}:${{ env.release }}"
platform-release: "${{ inputs.platform }}:${{ inputs.release }}"
setup: "/opt/detector/epic-${{ env.detector-version }}/setup.sh"
run: |
echo "::group::pip install"
Expand Down

0 comments on commit 0ba6b55

Please sign in to comment.