Skip to content

Commit

Permalink
Enable unit test on clang-latest-openmp-offload job GA CI
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfgc committed May 13, 2021
1 parent ab97baf commit a89c13c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci-github-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
clang-openmpi-real-asan,
clang-openmpi-complex-asan,
clang-openmpi-real-ubsan,
clang-latest-openmp-offload-build
clang-latest-openmp-offload
]
include:
- jobname: gcc-openmpi-real-coverage
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: clang-latest-openmp-offload-build
- jobname: clang-latest-openmp-offload
container:
image: williamfgc/qmcpack-ci:ubuntu20-clang-latest
options: -u 1001
Expand All @@ -70,7 +70,6 @@ jobs:
run: tests/test_automation/github-actions/ci/run_step.sh build

- name: Test
if: "!contains(matrix.jobname, 'build')"
run: tests/test_automation/github-actions/ci/run_step.sh test

- name: Coverage
Expand Down
16 changes: 9 additions & 7 deletions tests/test_automation/github-actions/ci/run_step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ case "$1" in
-DQMC_COMPLEX=$IS_COMPLEX \
${GITHUB_WORKSPACE}
;;
*"offload-build"*)
echo 'Configure for building OpenMP offload with clang on x86_64'
*"clang-latest-openmp-offload"*)
echo 'Configure for building OpenMP offload with clang-12 on x86_64'
cmake -GNinja -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 \
-DENABLE_OFFLOAD=ON -DOFFLOAD_TARGET=x86_64-pc-linux-gnu \
-DUSE_OBJECT_TARGET=ON -DQMC_MPI=0 \
Expand Down Expand Up @@ -103,15 +103,17 @@ case "$1" in
export LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/config/sanitizers/lsan.supp
fi

# Enable libomptarget.so
if [[ "${GH_JOBNAME}" =~ (clang-latest) ]]
# Run only deterministic tests (reasonable for CI) by default
TEST_LABEL=deterministic
if [[ "${GH_JOBNAME}" =~ (clang-latest-openmp-offload) ]]
then
echo "Adding /usr/lib/llvm-12/lib/ to LD_LIBRARY_PATH"
echo "Adding /usr/lib/llvm-12/lib/ to LD_LIBRARY_PATH to enable libomptarget.so"
export LD_LIBRARY_PATH=/usr/lib/llvm-12/lib/:${LD_LIBRARY_PATH}
# Run only unit tests (reasonable for CI using openmp-offload)
TEST_LABEL=unit
fi

# Run only deterministic tests (reasonable for CI)
ctest --output-on-failure -L deterministic
ctest --output-on-failure -L $TEST_LABEL
;;

# Generate coverage reports
Expand Down

0 comments on commit a89c13c

Please sign in to comment.