|
| 1 | +# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions |
| 2 | +name: Check for CUDA builds in changed easystacks |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ "*-software.eessi.io" ] |
| 6 | + pull_request: |
| 7 | + workflow_dispatch: |
| 8 | +permissions: |
| 9 | + contents: read # to fetch code (actions/checkout) |
| 10 | +env: |
| 11 | + EESSI_ACCELERATOR_TARGETS: | |
| 12 | + x86_64/amd/zen2: |
| 13 | + - nvidia/cc80 |
| 14 | + x86_64/amd/zen3: |
| 15 | + - nvidia/cc80 |
| 16 | +jobs: |
| 17 | + check_missing: |
| 18 | + runs-on: ubuntu-24.04 |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + matrix: |
| 22 | + EESSI_VERSION: |
| 23 | + - 2023.06 |
| 24 | + EESSI_SOFTWARE_SUBDIR_OVERRIDE: |
| 25 | + - x86_64/amd/zen2 |
| 26 | + - x86_64/amd/zen3 |
| 27 | + - x86_64/amd/zen4 |
| 28 | + - x86_64/intel/haswell |
| 29 | + - x86_64/intel/skylake_avx512 |
| 30 | + - x86_64/generic |
| 31 | + steps: |
| 32 | + - name: Check out software-layer repository |
| 33 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 34 | + |
| 35 | + - name: Mount EESSI CernVM-FS pilot repository |
| 36 | + uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0 |
| 37 | + with: |
| 38 | + cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb |
| 39 | + cvmfs_http_proxy: DIRECT |
| 40 | + cvmfs_repositories: software.eessi.io |
| 41 | + filters: | |
| 42 | + changed: |
| 43 | + -'easystacks/**' |
| 44 | +
|
| 45 | + - name: Test check_missing_installations.sh script |
| 46 | + if: ${{ steps.changes.outputs.changed == 'true' }} |
| 47 | + run: | |
| 48 | + export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${{matrix.EESSI_SOFTWARE_SUBDIR_OVERRIDE}} |
| 49 | + source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash |
| 50 | + # set $EESSI_CPU_FAMILY to the CPU architecture that corresponds to $EESSI_SOFTWARE_SUBDIR_OVERRIDE (part before the first slash), |
| 51 | + # to prevent issues with checks in the Easybuild configuration that use this variable |
| 52 | + export EESSI_CPU_FAMILY=${EESSI_SOFTWARE_SUBDIR_OVERRIDE%%/*} |
| 53 | + module load EasyBuild |
| 54 | + which eb |
| 55 | + eb --version |
| 56 | + export EESSI_PREFIX=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}} |
| 57 | + export EESSI_OS_TYPE=linux |
| 58 | + env | grep ^EESSI | sort |
| 59 | +
|
| 60 | + # check for missing installations if a file in the easystacks directory is changed |
| 61 | + echo |
| 62 | +
|
| 63 | + # first check the CPU-only builds for this CPU target |
| 64 | + #echo "just run check_missing_installations.sh (should use easystacks/software.eessi.io/${{matrix.EESSI_VERSION}}/eessi-${{matrix.EESSI_VERSION}}-*.yml with latest EasyBuild release)" |
| 65 | + #for easystack_file in $(EESSI_VERSION=${{matrix.EESSI_VERSION}} .github/workflows/scripts/only_latest_easystacks.sh); do |
| 66 | + # echo "check missing installations for ${easystack_file}..." |
| 67 | + # ./check_missing_installations.sh ${easystack_file} |
| 68 | + # ec=$? |
| 69 | + # if [[ ${ec} -ne 0 ]]; then echo "missing installations found for ${easystack_file}!" >&2; exit ${ec}; fi |
| 70 | + #done |
| 71 | +
|
| 72 | + # now check the accelerator builds for this CPU target |
| 73 | + #accelerators=$(echo "${EESSI_ACCELERATOR_TARGETS}" | yq ".${EESSI_SOFTWARE_SUBDIR_OVERRIDE}[]") |
| 74 | + #if [ -z ${accelerators} ]; then |
| 75 | + # echo "no accelerator targets defined for ${EESSI_SOFTWARE_SUBDIR_OVERRIDE}" |
| 76 | + #else |
| 77 | + # for accel in ${accelerators}; do |
| 78 | + # module use ${EESSI_SOFTWARE_PATH}/accel/${accel}/modules/all |
| 79 | + # echo "checking missing installations for accelerator ${accel} using modulepath: ${MODULEPATH}" |
| 80 | + # for easystack_file in $(EESSI_VERSION=${{matrix.EESSI_VERSION}} ACCEL_EASYSTACKS=1 .github/workflows/scripts/only_latest_easystacks.sh); do |
| 81 | + # echo "check missing installations for ${easystack_file}..." |
| 82 | + # ./check_missing_installations.sh ${easystack_file} |
| 83 | + # ec=$? |
| 84 | + # if [[ ${ec} -ne 0 ]]; then echo "missing installations found for ${easystack_file}!" >&2; exit ${ec}; fi |
| 85 | + # done |
| 86 | + # module unuse ${EESSI_SOFTWARE_PATH}/accel/${accel}/modules/all |
| 87 | + # done |
| 88 | + #fi */ |
| 89 | +
|
| 90 | + #if ./check_missing_installations.sh ${easystack_file}; then |
| 91 | + # echo "did NOT capture missing package; test FAILED" |
| 92 | + # exit 1 |
| 93 | + #else |
| 94 | + # echo "captured missing package; test PASSED" |
| 95 | + exit 0 |
| 96 | + fi |
0 commit comments