Skip to content

Commit

Permalink
Merge branch '2023.06-software.eessi.io' into 2023.06-software.eessi.…
Browse files Browse the repository at this point in the history
…io_Paraver
  • Loading branch information
bedroge authored Jul 19, 2024
2 parents 40e2691 + 9ec0cad commit 72c8604
Show file tree
Hide file tree
Showing 48 changed files with 758 additions and 238 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,20 @@

name: Scorecards supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '25 15 * * 3'
push:
branches: [ "main" ]
pull_request:
branches:
- main
branches:
- '*-software.eessi.io'

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
if: github.repository_owner == 'EESSI' # Prevent running on forks
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
Expand All @@ -35,12 +31,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -62,14 +58,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@807578363a7869ca324a79039e6db9c843e0e100 # v2.1.27
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
with:
sarif_file: results.sarif
8 changes: 6 additions & 2 deletions .github/workflows/test-software.eessi.io.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Check for missing software installations in software.eessi.io
on: [push, pull_request, workflow_dispatch]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
check_missing:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/test_eessi_container_script.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests for eessi_container.sh script
on: [push, pull_request, workflow_dispatch]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
eessi_container_script:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -45,7 +49,8 @@ jobs:
elif [[ ${{matrix.SCRIPT_TEST}} == 'listrepos_default' ]]; then
outfile=out_listrepos.txt
./eessi_container.sh --verbose --list-repos | tee ${outfile}
grep "EESSI" ${outfile}
# make sure that the default EESSI software repository is available
grep "software.eessi.io" ${outfile}
# test use of --list-repos with custom repos.cfg
elif [[ ${{matrix.SCRIPT_TEST}} == 'listrepos_custom' ]]; then
Expand All @@ -57,11 +62,12 @@ jobs:
echo "[EESSI/20HT.TP]" >> cfg/repos.cfg
echo "repo_version = 20HT.TP" >> cfg/repos.cfg
./eessi_container.sh --verbose --list-repos | tee ${outfile}
grep "EESSI" ${outfile}
# make sure that the default EESSI software repository is available
grep "software.eessi.io" ${outfile}
export EESSI_REPOS_CFG_DIR_OVERRIDE=${PWD}/cfg
./eessi_container.sh --verbose --list-repos | tee ${outfile2}
grep "[EESSI/2023.02]" ${outfile2}
grep "EESSI/20AB.CD" ${outfile2}
# test use of --mode run
elif [[ ${{matrix.SCRIPT_TEST}} == 'run' ]]; then
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test_licenses.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Test software licenses
on: [push, pull_request]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Check out software-layer repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests
on: [push, pull_request]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.6, 3.7, 3.8, 3.9, '3.10']
python: [3.7, 3.8, 3.9, '3.10']
fail-fast: false
steps:
- name: checkout
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tests_archdetect.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests for eessi_archdetect.sh
on: [push, pull_request]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
proc_cpuinfo:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/tests_init.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Tests for init scripts
on: [push, pull_request]
on:
push:
branches: [ "*-software.eessi.io" ]
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.6, 3.7, 3.8, 3.9, '3.10']
python: [3.7, 3.8, 3.9, '3.10']
fail-fast: false
steps:
- name: checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Check out software-layer repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
10 changes: 8 additions & 2 deletions EESSI-extend-2023.06-easybuild.eb
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,17 @@ setenv ("EASYBUILD_SYSROOT", sysroot)
setenv ("EASYBUILD_PREFIX", pathJoin(working_dir, "easybuild"))
setenv ("EASYBUILD_INSTALLPATH", easybuild_installpath)
setenv ("EASYBUILD_HOOKS", pathJoin(os.getenv("EESSI_PREFIX"), "init", "easybuild", "eb_hooks.py"))
setenv ("EASYBUILD_UMASK", "002")
-- Make sure to use the general umask that allows a global read
setenv ("EASYBUILD_UMASK", "022")
-- Allow this module to be loaded when running EasyBuild
setenv ("EASYBUILD_ALLOW_LOADED_MODULES", "EasyBuild,EESSI-extend")
-- Set all related environment variables if we have project or user installations (including extending MODULEPATH)
if (user_modulepath ~= nil) then
-- Use a more restrictive umask for this case
setenv ("EASYBUILD_UMASK", "022")
setenv ("EASYBUILD_UMASK", "077")
setenv ("EASYBUILD_STICKY_BIT", "1")
-- configure MODULEPATH
if (project_modulepath ~= nil) then
Expand All @@ -155,6 +160,7 @@ elseif (project_modulepath ~= nil) then
setenv ("EASYBUILD_SET_GID_BIT", "1")
setenv ("EASYBUILD_GROUP_WRITABLE_INSTALLDIR", "1")
setenv ("EASYBUILD_STICKY_BIT", "0")
setenv ("EASYBUILD_UMASK", "002")
-- configure MODULEPATH
prepend_path("MODULEPATH", project_modulepath)
end
Expand Down
14 changes: 10 additions & 4 deletions EESSI-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ display_help() {
echo " --skip-cuda-install - disable installing a full CUDA SDK in the host_injections prefix (e.g. in CI)"
}

# Function to check if a command exists
function command_exists() {
command -v "$1" >/dev/null 2>&1
}

function copy_build_log() {
# copy specified build log to specified directory, with some context added
build_log=${1}
Expand Down Expand Up @@ -238,10 +243,11 @@ else
echo "Skipping installation of CUDA SDK in host_injections, since the --skip-cuda-install flag was passed OR no EasyBuild module was found"
fi

# Install drivers in host_injections
# TODO: this is commented out for now, because the script assumes that nvidia-smi is available and works;
# if not, an error is produced, and the bot flags the whole build as failed (even when not installing GPU software)
# ${EESSI_PREFIX}/scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh
# Install NVIDIA drivers in host_injections (if they exist)
if command_exists "nvidia-smi"; then
echo "Command 'nvidia-smi' found. Installing NVIDIA drivers for use in prefix shell..."
${EESSI_PREFIX}/scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh
fi

# use PR patch file to determine in which easystack files stuff was added
changed_easystacks=$(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep '^easystacks/.*yml$' | egrep -v 'known-issues|missing')
Expand Down
12 changes: 10 additions & 2 deletions bot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ echo "bot/build.sh: EESSI_VERSION_OVERRIDE='${EESSI_VERSION_OVERRIDE}'"
# determine CVMFS repo to be used from .repository.repo_name in ${JOB_CFG_FILE}
# here, just set EESSI_CVMFS_REPO_OVERRIDE, a bit further down
# "source init/eessi_defaults" via sourcing init/minimal_eessi_env
export EESSI_CVMFS_REPO_OVERRIDE=$(cfg_get_value "repository" "repo_name")
export EESSI_CVMFS_REPO_OVERRIDE=/cvmfs/$(cfg_get_value "repository" "repo_name")
echo "bot/build.sh: EESSI_CVMFS_REPO_OVERRIDE='${EESSI_CVMFS_REPO_OVERRIDE}'"

# determine architecture to be used from entry .architecture in ${JOB_CFG_FILE}
Expand Down Expand Up @@ -223,7 +223,15 @@ mkdir -p ${TARBALL_TMP_BUILD_STEP_DIR}
BUILD_STEP_ARGS+=("--save" "${TARBALL_TMP_BUILD_STEP_DIR}")
BUILD_STEP_ARGS+=("--storage" "${STORAGE}")
# add options required to handle NVIDIA support
BUILD_STEP_ARGS+=("--nvidia" "all")
if command_exists "nvidia-smi"; then
echo "Command 'nvidia-smi' found, using available GPU"
BUILD_STEP_ARGS+=("--nvidia" "all")
else
echo "No 'nvidia-smi' found, no available GPU but allowing overriding this check"
BUILD_STEP_ARGS+=("--nvidia" "install")
fi
# Retain location for host injections so we don't reinstall CUDA
# (Always need to run the driver installation as available driver may change)
if [[ ! -z ${SHARED_FS_PATH} ]]; then
BUILD_STEP_ARGS+=("--host-injections" "${SHARED_FS_PATH}/host-injections")
fi
Expand Down
2 changes: 1 addition & 1 deletion bot/check-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ elif [[ ${ERROR} -eq 1 ]]; then
reason="EESSI test suite was not run, test step itself failed to execute."
status="FAILURE"
else
summary=":grin: FAILURE"
summary=":cry: FAILURE"
reason="Failed for unknown reason"
status="FAILURE"
fi
Expand Down
20 changes: 11 additions & 9 deletions bot/inspect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
# stop as soon as something fails
set -e

# script_dir is the directory that contains THIS (inspect.sh) script, usually
# stored in the directory '.../bot'
script_dir=$(dirname $(realpath $BASH_SOURCE))

display_help() {
echo "usage: $0 [OPTIONS]"
echo " -h | --help - display this usage information"
Expand Down Expand Up @@ -81,8 +85,8 @@ done
set -- "${POSITIONAL_ARGS[@]}"

# source utils.sh and cfg_files.sh
source scripts/utils.sh
source scripts/cfg_files.sh
source ${script_dir}/../scripts/utils.sh
source ${script_dir}/../scripts/cfg_files.sh

if [[ -z ${resume_tgz} ]]; then
echo_red "path to tarball for resuming build job is missing"
Expand Down Expand Up @@ -255,10 +259,8 @@ CMDLINE_ARGS+=("--storage" "${JOB_STORAGE}")

# make sure some environment settings are available inside the shell started via
# startprefix
base_dir=$(dirname $(realpath $0))
# base_dir of inspect.sh script is '.../bot', 'init' dir is at the same level
# TODO better use script from tarball???
source ${base_dir}/../init/eessi_defaults
source ${script_dir}/../init/eessi_defaults

if [ -z $EESSI_VERSION ]; then
echo "ERROR: \$EESSI_VERSION must be set!" >&2
Expand Down Expand Up @@ -432,14 +434,14 @@ echo "Executing command to start interactive session to inspect build job:"
# These initializations are combined into a single script that is executed when
# the shell in startprefix is started. We set the env variable BASH_ENV here.
if [[ -z ${run_in_prefix} ]]; then
echo "./eessi_container.sh ${CMDLINE_ARGS[@]}"
echo "${script_dir}/../eessi_container.sh ${CMDLINE_ARGS[@]}"
echo " -- ${EESSI_COMPAT_LAYER_DIR}/startprefix"
./eessi_container.sh "${CMDLINE_ARGS[@]}" \
${script_dir}/../eessi_container.sh "${CMDLINE_ARGS[@]}" \
-- ${EESSI_COMPAT_LAYER_DIR}/startprefix
else
echo "./eessi_container.sh ${CMDLINE_ARGS[@]}"
echo "${script_dir}/../eessi_container.sh ${CMDLINE_ARGS[@]}"
echo " -- ${EESSI_COMPAT_LAYER_DIR}/startprefix <<< ${run_in_prefix}"
./eessi_container.sh "${CMDLINE_ARGS[@]}" \
${script_dir}/../eessi_container.sh "${CMDLINE_ARGS[@]}" \
-- ${EESSI_COMPAT_LAYER_DIR}/startprefix <<< ${run_in_prefix}
fi

Expand Down
5 changes: 4 additions & 1 deletion bot/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ echo "bot/test.sh: EESSI_PILOT_VERSION_OVERRIDE='${EESSI_PILOT_VERSION_OVERRIDE}
# determine CVMFS repo to be used from .repository.repo_name in ${JOB_CFG_FILE}
# here, just set EESSI_CVMFS_REPO_OVERRIDE, a bit further down
# "source init/eessi_defaults" via sourcing init/minimal_eessi_env
export EESSI_CVMFS_REPO_OVERRIDE=$(cfg_get_value "repository" "repo_name")
export EESSI_CVMFS_REPO_OVERRIDE=/cvmfs/$(cfg_get_value "repository" "repo_name")
echo "bot/test.sh: EESSI_CVMFS_REPO_OVERRIDE='${EESSI_CVMFS_REPO_OVERRIDE}'"

# determine architecture to be used from entry .architecture in ${JOB_CFG_FILE}
Expand Down Expand Up @@ -204,6 +204,9 @@ if [[ -z ${RESUME_DIR} ]]; then
else
TEST_STEP_ARGS+=("--resume" "${RESUME_DIR}")
fi
# Bind mount /sys/fs/cgroup so that we can determine the amount of memory available in our cgroup for
# Reframe configuration
TEST_STEP_ARGS+=("--extra-bind-paths" "/sys/fs/cgroup:/hostsys/fs/cgroup:ro")

# prepare arguments to test_suite.sh (specific to test step)
declare -a TEST_SUITE_ARGS=()
Expand Down
6 changes: 6 additions & 0 deletions configure_easybuild
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ if [[ "$EESSI_CPU_FAMILY" == "aarch64" ]]; then
DEPS_TO_FILTER="${DEPS_TO_FILTER},Yasm"
fi

# Version 23.06 of EESSI ships PSM2 in the compat layer, so we can filter this out while retaining support for OFA fabric
# (longer term this is probably not the right move as PSM2 should be configured with accelerator support, hence the restricted version)
if [[ "$EESSI_VERSION" == "2023.06" ]]; then
DEPS_TO_FILTER="${DEPS_TO_FILTER},PSM2"
fi

export EASYBUILD_FILTER_DEPS=$DEPS_TO_FILTER

export EASYBUILD_MODULE_EXTENSIONS=1
Expand Down
Loading

0 comments on commit 72c8604

Please sign in to comment.