Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Feb 14, 2025
1 parent ad6909d commit 01ee9e4
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/build-hpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,39 +125,32 @@ jobs:
{% 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"
echo "::group::Get dependency $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(' ') }}
echo "+ cmake -G Ninja -S . -B build {{ options['cmake_options']|join(' ') }}"
cmake -G Ninja -S . -B build {{ options['cmake_options']|join(' ') }}
start=`date +%s`
echo "+ cmake --build build"
cmake --build build
end=`date +%s`
runtime=$((end-start))
echo "Build $name took $runtime seconds"
echo "::endgroup::"
echo "::group::Install $name"
echo "+ cmake --install build --prefix $BASEDIR/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 }}
Expand All @@ -171,9 +164,10 @@ jobs:
echo "::endgroup::"
echo "::group::Build $REPO"
cmake -G Ninja -S $REPO -B build \
{{ cmake_options|join(' ') }}
echo "+ cmake -G Ninja -S $REPO -B build {{ cmake_options|join(' ') }}"
cmake -G Ninja -S $REPO -B build {{ cmake_options|join(' ') }}
start=`date +%s`
echo "+ cmake --build build"
cmake --build build
end=`date +%s`
runtime=$((end-start))
Expand All @@ -182,18 +176,23 @@ jobs:
echo "::group::Test $REPO"
export ATLAS_FINALISES_MPI=1
echo "+ ctest --test-dir build --output-on-failure {{ ctest_options }}"
ctest --test-dir build --output-on-failure {{ ctest_options }}
echo "::endgroup::"
echo "::group::Install $REPO"
echo "+ cmake --install build --prefix $BASEDIR/install/$REPO"
cmake --install build --prefix $BASEDIR/install/$REPO
export PATH=$BASEDIR/install/$REPO/bin:$PATH
echo "::endgroup::"
echo "::group::Verify $REPO installation"
echo "+ atlas --info"
atlas --info
echo "::endgroup::"
echo "::group::Cleanup"
{% for repo_name in dependencies.keys() %}
name=$(basename {{repo_name}})
rm -r $name
Expand All @@ -202,3 +201,6 @@ jobs:
rm -r $REPO
rm -r build
rm -r $BASEDIR/install
echo "::endgroup::"

0 comments on commit 01ee9e4

Please sign in to comment.