Skip to content

Commit

Permalink
groups
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Feb 14, 2025
1 parent 04a0a25 commit ad6909d
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/build-hpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,34 +116,49 @@ jobs:
template: |
set +x
module_load() {
echo "+ module load $1"
module load $1
}
{% for module in "${{ join(matrix.modules, ',') }}".split(',') %}
module load {{module}}
module_load {{module}}
{% endfor %}
echo "+ module list"
module list
set -x
BASEDIR=$PWD
export CMAKE_TEST_LAUNCHER="srun;-n;1"
export CMAKE_PREFIX_PATH=$BASEDIR/install:$CMAKE_PREFIX_PATH
echo "::group::Get dependencies"
{% for repo_name, options in dependencies.items() %}
name=$(basename {{repo_name}})
echo "::group::$name"
echo "::group::Checkout $name"
mkdir -p $name
pushd $name
git init
git remote add origin ${{ github.server_url }}/{{repo_name}}
git fetch origin {{options['version']}}
git reset --hard FETCH_HEAD
echo "::endgroup::"
echo "::group::Build $name"
cmake -G Ninja -S . -B build \
{{ options['cmake_options']|join(' ') }}
start=`date +%s`
cmake --build build
end=`date +%s`
runtime=$((end-start))
echo "Build $name took $runtime seconds"
echo "::endgroup::"
echo "::group::Install $name"
cmake --install build --prefix $BASEDIR/install/$name
export PATH=$BASEDIR/install/$name/bin:$PATH
echo "::endgroup::"
echo "::endgroup::"
popd
{% endfor %}
echo "::endgroup::"
echo "::group::Checkout $REPO"
REPO=${{ github.event.pull_request.head.repo.full_name || github.repository }}
SHA=${{ github.event.pull_request.head.sha || github.sha }}
mkdir -p $REPO
Expand All @@ -153,18 +168,31 @@ jobs:
git fetch origin $SHA
git reset --hard FETCH_HEAD
popd
echo "::endgroup::"
echo "::group::Build $REPO"
cmake -G Ninja -S $REPO -B build \
{{ cmake_options|join(' ') }}
start=`date +%s`
cmake --build build
end=`date +%s`
runtime=$((end-start))
echo "Build $name took $runtime seconds"
echo "::endgroup::"
echo "::group::Test $REPO"
export ATLAS_FINALISES_MPI=1
ctest --test-dir build --output-on-failure {{ ctest_options }}
echo "::endgroup::"
echo "::group::Install $REPO"
cmake --install build --prefix $BASEDIR/install/$REPO
export PATH=$BASEDIR/install/$REPO/bin:$PATH
echo "::endgroup::"
echo "::group::Verify $REPO installation"
atlas --info
echo "::endgroup::"
{% for repo_name in dependencies.keys() %}
name=$(basename {{repo_name}})
Expand Down

0 comments on commit ad6909d

Please sign in to comment.