-
Notifications
You must be signed in to change notification settings - Fork 9
#2454: Add spack-package build to bake file
#2460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
9148e12
60c5e8a
5e71a44
5e2beac
df9e4d0
37af7aa
b800e85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Develop CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - develop | ||
|
|
||
| jobs: | ||
| prepare: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| targets: ${{ steps.list-targets.outputs.targets }} | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: List targets | ||
| id: list-targets | ||
| uses: docker/bake-action/subaction/list-targets@v6 | ||
| with: | ||
| target: vt-develop | ||
|
|
||
| bake: | ||
| needs: | ||
| - prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| target: ${{ fromJson(needs.prepare.outputs.targets) }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: docker-output/build/ccache | ||
| key: ${{ matrix.target }}-${{ github.ref }}-${{ github.sha }} | ||
| restore-keys: | | ||
| ${{ matrix.target }}-${{ github.ref }} | ||
| ${{ matrix.target }}- | ||
|
|
||
| - name: Build | ||
| uses: docker/bake-action@v6 | ||
| with: | ||
| source: . | ||
| targets: ${{ matrix.target }} | ||
| files: docker-bake.hcl |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,19 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| cur_path=$(pwd) | ||
| spack_path="$cur_path/spack" | ||
| vt_spack_package="$cur_path/spack-package" | ||
|
|
||
| git clone https://github.com/spack/spack.git | ||
| git clone https://github.com/DARMA-tasking/spack-package.git | ||
| git clone --branch v0.23.1 --depth=2 https://github.com/spack/spack.git | ||
| . spack/share/spack/setup-env.sh | ||
|
|
||
| cd "$spack_path" || exit 1 | ||
| git checkout v0.16.3 | ||
| cd "$cur_path" || exit 1 | ||
| git clone -b master https://github.com/DARMA-tasking/spack-package.git | ||
|
|
||
| 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["trace_only"]="${VT_BUILD_TRACE_ONLY:-1}" | ||
| variables_map["doxygen_enabled"]="${VT_DOXYGEN_ENABLED:-0}" | ||
| variables_map["mimalloc_enabled"]="${VT_MIMALLOC_ENABLED:-0}" | ||
| variables_map["asan_enabled"]="${VT_ASAN_ENABLED:-0}" | ||
|
|
@@ -26,6 +25,7 @@ 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}" | ||
| variables_map["kokkos"]="${VT_KOKKOS_ENABLED:-0}" | ||
|
|
||
| cmd_vars=() | ||
| for flag in "${!variables_map[@]}" | ||
|
|
@@ -40,16 +40,27 @@ do | |
| done | ||
|
|
||
| install_cmd=$(printf " %s" "${cmd_vars[@]}") | ||
| install_cmd="$spack_path/bin/spack install darma-vt@develop build_type=Release ${install_cmd:1}" | ||
| install_cmd="spack install darma-vt@develop build_type=Release ${install_cmd:1} ^[email protected]" | ||
|
|
||
| mkdir -p ~/.spack | ||
| cat >> ~/.spack/packages.yaml <<'EOF' | ||
| packages: | ||
| openmpi: | ||
| externals: | ||
| - spec: [email protected] | ||
| prefix: /usr/local | ||
| EOF | ||
|
|
||
| spack clean --all | ||
| spack repo add "$vt_spack_package" | ||
| spack external find | ||
|
|
||
| "$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) | ||
| vt_DIR=$(spack location --install-dir darma-vt) | ||
| export vt_DIR | ||
| cmake -G "${CMAKE_GENERATOR:-Ninja}" \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -122,6 +122,11 @@ function "vt_rdma_tests" { | |
| result = lookup(item, "vt_rdma_tests", "") | ||
| } | ||
|
|
||
| function "vt_test_spack" { | ||
| params = [item] | ||
| result = lookup(item, "vt_test_spack", "0") | ||
| } | ||
|
|
||
| function "vt_tests_num_nodes" { | ||
| params = [item] | ||
| result = lookup(item, "vt_tests_num_nodes", "") | ||
|
|
@@ -196,7 +201,7 @@ target "vt-build" { | |
| } | ||
|
|
||
| target "vt-build-all" { | ||
| name = "vt-build-${replace(item.image, ".", "-")}" | ||
| name = "vt-build-${replace(item.image, ".", "-")}${vt_test_spack(item) == 1 ? "-spack" : ""}" | ||
| inherits = ["vt-build"] | ||
| tags = ["${REPO}:vt-${item.image}"] | ||
|
|
||
|
|
@@ -227,6 +232,7 @@ target "vt-build-all" { | |
| VT_POOL_ENABLED = vt_pool(item) | ||
| VT_PRODUCTION_BUILD_ENABLED = vt_production_build(item) | ||
| VT_RDMA_TESTS_ENABLED = vt_rdma_tests(item) | ||
| VT_TEST_SPACK = vt_test_spack(item) | ||
| VT_TESTS_NUM_NODES = vt_tests_num_nodes(item) | ||
| VT_TRACE_ENABLED = vt_trace(item) | ||
| VT_TRACE_RUNTIME_ENABLED = vt_trace_runtime(item) | ||
|
|
@@ -266,6 +272,12 @@ target "vt-build-all" { | |
| vt_lb = 0 | ||
| vt_tests_num_nodes = 4 | ||
| }, | ||
| { | ||
| image = "amd64-ubuntu-20.04-gcc-10-openmpi-cpp" | ||
| vt_lb = 1 | ||
| vt_trace_only = 1 | ||
| vt_test_spack = 1 | ||
| }, | ||
| { | ||
| image = "amd64-ubuntu-20.04-gcc-9-cpp" | ||
| }, | ||
|
|
@@ -366,3 +378,40 @@ target "vt-build-all" { | |
| ] | ||
| } | ||
| } | ||
|
|
||
|
|
||
| group "vt-pull-request" { | ||
| targets = [ | ||
| "vt-build-amd64-alpine-3-16-clang-cpp", | ||
| "vt-build-amd64-ubuntu-20-04-clang-10-cpp", | ||
| "vt-build-amd64-ubuntu-20-04-clang-9-cpp", | ||
| "vt-build-amd64-ubuntu-20-04-gcc-10-cpp", | ||
| "vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp", | ||
| "vt-build-amd64-ubuntu-20-04-gcc-9-cpp", | ||
| "vt-build-amd64-ubuntu-20-04-gcc-9-cuda-11-4-3-cpp", | ||
| "vt-build-amd64-ubuntu-20-04-gcc-9-cuda-12-2-0-cpp", | ||
| "vt-build-amd64-ubuntu-20-04-icpx-cpp", | ||
| "vt-build-amd64-ubuntu-22-04-clang-11-cpp", | ||
| "vt-build-amd64-ubuntu-22-04-clang-12-cpp", | ||
| "vt-build-amd64-ubuntu-22-04-clang-13-cpp", | ||
| "vt-build-amd64-ubuntu-22-04-clang-14-cpp", | ||
| "vt-build-amd64-ubuntu-22-04-clang-15-cpp", | ||
| "vt-build-amd64-ubuntu-22-04-gcc-11-cpp", | ||
| "vt-build-amd64-ubuntu-22-04-gcc-12-cpp", | ||
| "vt-build-amd64-ubuntu-22-04-gcc-12-vtk-cpp", | ||
| "vt-build-amd64-ubuntu-22-04-gcc-12-zoltan-cpp", | ||
| "vt-build-amd64-ubuntu-24-04-clang-16-cpp", | ||
| "vt-build-amd64-ubuntu-24-04-clang-16-vtk-cpp", | ||
| "vt-build-amd64-ubuntu-24-04-clang-16-zoltan-cpp", | ||
| "vt-build-amd64-ubuntu-24-04-clang-17-cpp", | ||
| "vt-build-amd64-ubuntu-24-04-clang-18-cpp", | ||
| "vt-build-amd64-ubuntu-24-04-gcc-13-cpp", | ||
| "vt-build-amd64-ubuntu-24-04-gcc-14-cpp", | ||
| ] | ||
| } | ||
|
|
||
| group "vt-develop" { | ||
| targets = [ | ||
| "vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp-spack", | ||
|
||
| ] | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.