generated from DARMA-tasking/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from DARMA-tasking/19-update-spack-to-look-for…
…-magistrate #19: Update spack to look for magistrate
- Loading branch information
Showing
5 changed files
with
103 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Test spack package | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
run-script: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: lifflander1/vt:amd64-ubuntu-20.04-gcc-10-gcc-10-openmpi-cpp | ||
env: | ||
VT_LB_ENABLED: 0 | ||
VT_TRACE_ENABLED: 0 | ||
VT_BUILD_TRACE_ONLY: 1 | ||
VT_DOXYGEN_ENABLED: 0 | ||
VT_MIMALLOC_ENABLED: 0 | ||
VT_DOCS_ENABLED: 0 | ||
VT_ASAN_ENABLED: 0 | ||
VT_WERROR_ENABLED: 1 | ||
VT_POOL_ENABLED: 1 | ||
VT_ZOLTAN_ENABLED: 0 | ||
VT_MPI_GUARD_ENABLED: 0 | ||
VT_DIAGNOSTICS_ENABLED: 1 | ||
VT_DIAGNOSTICS_RUNTIME_ENABLED: 0 | ||
VT_UNITY_BUILD_ENABLED: 1 | ||
VT_FCONTEXT_ENABLED: 0 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run test script | ||
run: | | ||
chmod +x ci/test_spack.sh | ||
ci/test_spack.sh ${{ github.head_ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/usr/bin/env bash | ||
|
||
cur_path=$(pwd) | ||
spack_path="$cur_path/spack" | ||
vt_spack_package="$cur_path/spack-package" | ||
|
||
branch_name=${1:-master} | ||
git clone https://github.com/spack/spack.git | ||
git clone -b "$branch_name" https://github.com/DARMA-tasking/spack-package.git | ||
|
||
cd "$spack_path" || exit 1 | ||
git checkout v0.16.3 | ||
cd "$cur_path" || exit 1 | ||
|
||
declare -A variables_map | ||
variables_map["lb_enabled"]="${VT_LB_ENABLED:-0}" | ||
variables_map["trace_enabled"]="${VT_TRACE_ENABLED:-0}" | ||
variables_map["trace_only"]="${VT_BUILD_TRACE_ONLY:-0}" | ||
variables_map["doxygen_enabled"]="${VT_DOXYGEN_ENABLED:-0}" | ||
variables_map["mimalloc_enabled"]="${VT_MIMALLOC_ENABLED:-0}" | ||
variables_map["asan_enabled"]="${VT_ASAN_ENABLED:-0}" | ||
variables_map["werror_enabled"]="${VT_WERROR_ENABLED:-0}" | ||
variables_map["pool_enabled"]="${VT_POOL_ENABLED:-0}" | ||
variables_map["zoltan_enabled"]="${VT_ZOLTAN_ENABLED:-0}" | ||
variables_map["mpi_guards"]="${VT_MPI_GUARD_ENABLED:-0}" | ||
variables_map["diagnostics_enabled"]="${VT_DIAGNOSTICS_ENABLED:-0}" | ||
variables_map["diagnostics_runtime_enabled"]="${VT_DIAGNOSTICS_RUNTIME_ENABLED:-0}" | ||
variables_map["unity_build_enabled"]="${VT_UNITY_BUILD_ENABLED:-0}" | ||
variables_map["fcontext_enabled"]="${VT_FCONTEXT_ENABLED:-0}" | ||
|
||
cmd_vars=() | ||
for flag in "${!variables_map[@]}" | ||
do | ||
flag_var=${variables_map[${flag}]} | ||
if test "$flag_var" -eq 0 | ||
then | ||
cmd_vars+=("-$flag") | ||
else | ||
cmd_vars+=("+$flag") | ||
fi | ||
done | ||
|
||
install_cmd=$(printf " %s" "${cmd_vars[@]}") | ||
install_cmd="$spack_path/bin/spack install darma-vt@develop build_type=Release ${install_cmd:1}" | ||
|
||
"$spack_path"/bin/spack repo add "$vt_spack_package" | ||
"$spack_path"/bin/spack external find | ||
$install_cmd | ||
|
||
git clone https://github.com/DARMA-tasking/vt-sample-project | ||
mkdir -p vt-sample-project/build | ||
cd vt-sample-project/build || exit 1 | ||
vt_DIR=$("$spack_path"/bin/spack location --install-dir darma-vt) | ||
export vt_DIR | ||
cmake -G "${CMAKE_GENERATOR:-Ninja}" \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_CXX_COMPILER="${CXX:-c++}" \ | ||
-DCMAKE_C_COMPILER="${CC:-cc}" \ | ||
-Dbuild_with_libs=1 \ | ||
.. | ||
cmake --build . |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters