Skip to content

Commit

Permalink
Add test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Pansysk75 committed Apr 26, 2024
1 parent 7dfa90a commit 8e1a00c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 13 deletions.
46 changes: 34 additions & 12 deletions .github/workflows/hpxmp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
container: stellargroup/build_env:latest
container: stellargroup/hpxmp_build_env:latest

steps:

- name: Install dependencies
run: |
apt-get update
apt-get install -y \
libc++-12-dev \
libc++abi-12-dev
# apt-get install -y \
# libc++-12-dev \
# libc++abi-12-dev
- name: Set environment variables
run: |
Expand Down Expand Up @@ -63,7 +63,10 @@ jobs:
- name: Fetch LLVM
run: |
LLVM_SRC_DIR=${ROOT_DIR}/llvm-project
git clone -b hpxmp_testing --depth 1 https://github.com/STEllAR-GROUP/llvm-project ${LLVM_SRC_DIR}
# Needed to fetch PRs
git clone https://github.com/STEllAR-GROUP/llvm-project ${LLVM_SRC_DIR}
git -C ${LLVM_SRC_DIR} fetch origin +$GITHUB_SHA:refs/remotes/origin/pr
git -C ${LLVM_SRC_DIR} checkout $GITHUB_SHA
echo "LLVM_SRC_DIR=${LLVM_SRC_DIR}" >> $GITHUB_ENV
# OpenMP test suite requires `FileCheck`, `not` and `llvm-lit` binaries
Expand All @@ -80,6 +83,32 @@ jobs:
cmake --build ${LLVM_UTILS_BUILD_DIR} --target not FileCheck
echo "LLVM_UTILS_BIN_DIR=${LLVM_UTILS_BUILD_DIR}/bin" >> $GITHUB_ENV
- name: Build OMP
run: |
OMP_SRC_DIR=${LLVM_SRC_DIR}/openmp
OMP_BUILD_DIR=${OMP_SRC_DIR}/cmake-build-omp-${BUILD_TYPE}
OMP_INSTALL_DIR=${OMP_SRC_DIR}/cmake-install-omp-${BUILD_TYPE}
cmake -G Ninja \
-DCMAKE_INSTALL_PREFIX=${OMP_INSTALL_DIR} \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DOPENMP_ENABLE_LIBOMPTARGET=OFF \
-DLIBOMP_OMPD_SUPPORT=OFF \
-DLIBOMP_USE_ITT_NOTIFY=OFF \
-DOPENMP_LLVM_TOOLS_DIR=${LLVM_UTILS_BIN_DIR} \
-Wdev -S ${OMP_SRC_DIR} -B ${OMP_BUILD_DIR}
cmake --build ${OMP_BUILD_DIR}
cmake --install ${OMP_BUILD_DIR}
echo "OMP_BUILD_DIR=${OMP_BUILD_DIR}" >> $GITHUB_ENV
- name: Run OMP tests
run: |
cd ${OMP_BUILD_DIR}
cmake --build . --target check-libomp
- name: Build HPXMP
run: |
HPXMP_SRC_DIR=${LLVM_SRC_DIR}/openmp
Expand Down Expand Up @@ -107,10 +136,3 @@ jobs:
run: |
cd ${HPXMP_BUILD_DIR}
cmake --build . --target check-libomp
- name: Setup tmate session
continue-on-error: true
uses: mxschmitt/action-tmate@v3
with:
sudo: false

2 changes: 1 addition & 1 deletion openmp/cmake/OpenMPTesting.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (${OPENMP_STANDALONE_BUILD})
find_standalone_test_dependencies()

# Set lit arguments.
set(DEFAULT_LIT_ARGS "-a --show-unsupported --show-xfail")
set(DEFAULT_LIT_ARGS "-a --show-unsupported --show-xfail --timeout=300")
if (MSVC OR XCODE)
set(DEFAULT_LIT_ARGS "${DEFAULT_LIT_ARGS} --no-progress-bar")
endif()
Expand Down

0 comments on commit 8e1a00c

Please sign in to comment.