Skip to content

Commit 426072e

Browse files
committed
#2454: Test spack+vt on pull requests
1 parent df9e4d0 commit 426072e

File tree

5 files changed

+13
-61
lines changed

5 files changed

+13
-61
lines changed

.github/workflows/build-docker-images.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ jobs:
6363
targets: ${{ matrix.target }}
6464
files: docker-bake.hcl
6565
push: ${{ github.ref == 'refs/heads/develop' }}
66+
env:
67+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

.github/workflows/develop-pipelines.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

ci/docker/vt.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ FROM --platform=${ARCH} ${BASE} AS build
99
ARG BUILD_SHARED_LIBS
1010
ARG CMAKE_BUILD_TYPE
1111
ARG CMAKE_CXX_STANDARD
12+
ARG GIT_BRANCH
1213
ARG VT_ASAN_ENABLED
1314
ARG VT_BUILD_TRACE_ONLY
1415
ARG VT_CI_BUILD
@@ -50,6 +51,8 @@ if [ -d vt/docker-output/build/ccache ]; then
5051
fi
5152
EOF
5253

54+
ENV GIT_BRANCH=${GIT_BRANCH}
55+
5356
RUN --mount=target=/vt,rw \
5457
if [ "${VT_TEST_SPACK}" = "1" ]; then \
5558
apt update -y -q && apt install -y -q libssl-dev unzip && \

ci/test_spack_package.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#!/usr/bin/env bash
22

3-
set -euo pipefail
3+
set -exo pipefail
44

55
cur_path=$(pwd)
66
vt_spack_package="$cur_path/spack-package"
77

88
git clone --branch v0.23.1 --depth=2 https://github.com/spack/spack.git
99
. spack/share/spack/setup-env.sh
1010

11-
git clone -b master https://github.com/DARMA-tasking/spack-package.git
11+
git clone -b 31-add-script-for-testing-per-branch-changes https://github.com/DARMA-tasking/spack-package.git
12+
python3 spack-package/ci/add_vt_branch.py "${GIT_BRANCH}"
1213

1314
declare -A variables_map
1415
variables_map["lb_enabled"]="${VT_LB_ENABLED:-0}"
@@ -40,7 +41,7 @@ do
4041
done
4142

4243
install_cmd=$(printf " %s" "${cmd_vars[@]}")
43-
install_cmd="spack install darma-vt@develop build_type=Release ${install_cmd:1} ^[email protected]"
44+
install_cmd="spack install darma-vt@${GIT_BRANCH} build_type=Release ${install_cmd:1} ^[email protected]"
4445

4546
mkdir -p ~/.spack
4647
cat >> ~/.spack/packages.yaml <<'EOF'

docker-bake.hcl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ variable "REPO" {
22
default = "lifflander1/vt"
33
}
44

5+
variable "GIT_BRANCH" {}
6+
57
function "arch" {
68
params = [item]
79
result = lookup(item, "arch", "amd64")
@@ -207,6 +209,7 @@ target "vt-build-all" {
207209

208210
args = {
209211
ARCH = arch(item)
212+
GIT_BRANCH = "${GIT_BRANCH}"
210213
IMAGE = "wf-${item.image}"
211214
REPO = REPO
212215
BUILD_SHARED_LIBS = vt_build_shared_libs(item)
@@ -407,11 +410,6 @@ group "vt-pull-request" {
407410
"vt-build-amd64-ubuntu-24-04-clang-18-cpp",
408411
"vt-build-amd64-ubuntu-24-04-gcc-13-cpp",
409412
"vt-build-amd64-ubuntu-24-04-gcc-14-cpp",
410-
]
411-
}
412-
413-
group "vt-develop" {
414-
targets = [
415-
"vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp-spack",
413+
"vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp-spack"
416414
]
417415
}

0 commit comments

Comments
 (0)