mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-11 16:01:00 +08:00
parent
855b95b34b
commit
6596c3edc3
137
.github/workflows/testxpr.yml
vendored
Normal file
137
.github/workflows/testxpr.yml
vendored
Normal file
@ -0,0 +1,137 @@
|
||||
name: hdf5 TestExpress CI
|
||||
|
||||
# Run TestExpress CI daily at 04:00 CDT (9:00 UTC)
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 9 * * *"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build_and_test:
|
||||
strategy:
|
||||
matrix:
|
||||
build_sys: ["CMake"]
|
||||
build_mode: ["Release", "Debug"]
|
||||
include:
|
||||
- build_sys: "CMake"
|
||||
build_mode: "Release"
|
||||
- build_sys: "CMake"
|
||||
build_mode: "Debug"
|
||||
# build_sys: ["CMake", "Autotools"]
|
||||
# build_mode: ["Release", "production", "Debug", "debug"]
|
||||
# include:
|
||||
# - build_sys: "CMake"
|
||||
# build_mode: "Release"
|
||||
# - build_sys: "CMake"
|
||||
# build_mode: "Debug"
|
||||
# - build_sys: "Autotools"
|
||||
# build_mode: "production"
|
||||
# - build_sys: "Autotools"
|
||||
# build_mode: "debug"
|
||||
# # Exclude mismatched configurations
|
||||
# exclude:
|
||||
# - build_sys: "CMake"
|
||||
# build_mode: "production"
|
||||
# - build_sys: "CMake"
|
||||
# build_mode: "debug"
|
||||
# - build_sys: "Autotools"
|
||||
# build_mode: "Release"
|
||||
# - build_sys: "Autotools"
|
||||
# build_mode: "Debug"
|
||||
|
||||
# Sets the job's name from the properties
|
||||
name: "${{ matrix.build_sys }} ${{ matrix.build_mode }} Workflows"
|
||||
|
||||
# Don't run the action if the commit message says to skip CI
|
||||
if: "!contains(github.event.head_commit.message, 'skip-ci')"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Linux Dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt-get install ninja-build doxygen graphviz
|
||||
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
|
||||
sudo apt install gcc-12 g++-12 gfortran-12
|
||||
echo "CC=gcc-12" >> $GITHUB_ENV
|
||||
echo "CXX=g++-12" >> $GITHUB_ENV
|
||||
echo "FC=gfortran-12" >> $GITHUB_ENV
|
||||
|
||||
- name: Install Autotools Dependencies (Linux)
|
||||
run: |
|
||||
sudo apt install automake autoconf libtool libtool-bin
|
||||
sudo apt install libaec0 libaec-dev
|
||||
if: ${{ matrix.build_sys == 'Autotools' }}
|
||||
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Get Sources
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
########## CMake ###########
|
||||
- name: CMake Configure
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir "${{ runner.workspace }}/build"
|
||||
cd "${{ runner.workspace }}/build"
|
||||
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
|
||||
-G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DHDF5_ENABLE_ALL_WARNINGS=ON \
|
||||
-DHDF5_ENABLE_PARALLEL:BOOL=OFF \
|
||||
-DHDF5_BUILD_CPP_LIB:BOOL=OFF \
|
||||
-DHDF5_BUILD_FORTRAN=OFF \
|
||||
-DHDF5_BUILD_JAVA=OFF \
|
||||
-DHDF5_BUILD_DOC=OFF \
|
||||
-DLIBAEC_USE_LOCALCONTENT=OFF \
|
||||
-DZLIB_USE_LOCALCONTENT=OFF \
|
||||
-DHDF_TEST_EXPRESS=0 \
|
||||
$GITHUB_WORKSPACE
|
||||
if: ${{ matrix.build_sys == 'CMake' }}
|
||||
|
||||
- name: CMake Build
|
||||
run: cmake --build . --parallel 3 --config ${{ matrix.build_mode }}
|
||||
working-directory: ${{ runner.workspace }}/build
|
||||
if: ${{ matrix.build_sys == 'CMake' }}
|
||||
|
||||
- name: CMake Run Tests
|
||||
run: ctest . --parallel 2 -C ${{ matrix.build_mode }} -V -R H5TESTXPR
|
||||
working-directory: ${{ runner.workspace }}/build
|
||||
if: ${{ matrix.build_sys == 'CMake' }}
|
||||
|
||||
########## autotools ###########
|
||||
- name: Autotools Configure
|
||||
shell: bash
|
||||
run: |
|
||||
sh ./autogen.sh
|
||||
mkdir "${{ runner.workspace }}/build"
|
||||
cd "${{ runner.workspace }}/build"
|
||||
$GITHUB_WORKSPACE/configure \
|
||||
--enable-build-mode=${{ matrix.build_mode }} \
|
||||
--enable-shared \
|
||||
--disable-parallel \
|
||||
--disable-cxx \
|
||||
--disable-fortran \
|
||||
--disable-java \
|
||||
--with-szlib=yes
|
||||
if: ${{ matrix.build_sys == 'Autotools' }}
|
||||
|
||||
- name: Autotools Build
|
||||
shell: bash
|
||||
run: |
|
||||
make -j3
|
||||
working-directory: ${{ runner.workspace }}/build
|
||||
if: ${{ matrix.build_sys == 'Autotools' }}
|
||||
|
||||
- name: Autotools Test
|
||||
shell: bash
|
||||
env:
|
||||
HDF_TEST_EXPRESS: 0
|
||||
run: |
|
||||
cd test
|
||||
make -j3 check
|
||||
working-directory: ${{ runner.workspace }}/build
|
||||
if: ${{ matrix.build_sys == 'Autotools' }}
|
@ -350,21 +350,26 @@ set (ttsafe_SOURCES
|
||||
${HDF5_TEST_SOURCE_DIR}/ttsafe_attr_vlen.c
|
||||
)
|
||||
|
||||
set (H5_TESTS
|
||||
testhdf5 # multiple source
|
||||
set (H5_EXPRESS_TESTS
|
||||
cache
|
||||
cache_api
|
||||
cache_image # multiple source
|
||||
btree2
|
||||
farray
|
||||
earray
|
||||
fheap
|
||||
objcopy_ref
|
||||
objcopy
|
||||
)
|
||||
|
||||
set (H5_TESTS
|
||||
testhdf5 # multiple source
|
||||
cache_tagging
|
||||
lheap
|
||||
ohdr
|
||||
stab
|
||||
gheap
|
||||
evict_on_close
|
||||
farray
|
||||
earray
|
||||
btree2
|
||||
fheap
|
||||
accum
|
||||
hyperslab
|
||||
istore
|
||||
@ -383,8 +388,6 @@ set (H5_TESTS
|
||||
external
|
||||
external_env
|
||||
efc
|
||||
objcopy_ref
|
||||
objcopy
|
||||
links
|
||||
unlink
|
||||
twriteorder
|
||||
@ -463,7 +466,7 @@ set (H5_TESTS_MULTIPLE
|
||||
mirror_vfd
|
||||
)
|
||||
# Only build single source tests here
|
||||
foreach (h5_test ${H5_TESTS})
|
||||
foreach (h5_test ${H5_TESTS} ${H5_EXPRESS_TESTS})
|
||||
if (NOT h5_test IN_LIST H5_TESTS_MULTIPLE)
|
||||
ADD_H5_EXE(${h5_test})
|
||||
endif ()
|
||||
|
@ -344,6 +344,39 @@ set (H5TEST_SEPARATE_TESTS
|
||||
flush2
|
||||
vds_env
|
||||
)
|
||||
foreach (h5_test ${H5_EXPRESS_TESTS})
|
||||
if (NOT h5_test IN_LIST H5TEST_SEPARATE_TESTS)
|
||||
if (HDF5_USING_ANALYSIS_TOOL)
|
||||
add_test (NAME H5TESTXPR-${h5_test} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${h5_test}>)
|
||||
set_tests_properties (H5TESTXPR-${h5_test} PROPERTIES
|
||||
FIXTURES_REQUIRED clear_H5TEST
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
else ()
|
||||
add_test (NAME H5TESTXPR-${h5_test} COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_EXPECT=0"
|
||||
-D "TEST_SKIP_COMPARE=TRUE"
|
||||
-D "TEST_OUTPUT=${h5_test}.txt"
|
||||
-D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
|
||||
#-D "TEST_REFERENCE=${test}.out"
|
||||
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
|
||||
)
|
||||
set_tests_properties (H5TESTXPR-${h5_test} PROPERTIES
|
||||
FIXTURES_REQUIRED clear_H5TEST
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
endif ()
|
||||
if ("H5TESTXPR-${h5_test}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
|
||||
set_tests_properties (H5TESTXPR-${h5_test} PROPERTIES DISABLED true)
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
foreach (h5_test ${H5_TESTS})
|
||||
if (NOT h5_test IN_LIST H5TEST_SEPARATE_TESTS)
|
||||
if (HDF5_USING_ANALYSIS_TOOL)
|
||||
@ -384,10 +417,10 @@ foreach (h5_test ${H5_TESTS})
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
set_tests_properties (H5TEST-fheap PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
|
||||
set_tests_properties (H5TESTXPR-fheap PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
|
||||
set_tests_properties (H5TEST-big PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
|
||||
set_tests_properties (H5TEST-btree2 PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
|
||||
set_tests_properties (H5TEST-objcopy PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
|
||||
set_tests_properties (H5TESTXPR-btree2 PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
|
||||
set_tests_properties (H5TESTXPR-objcopy PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
|
||||
|
||||
#-- Adding test for cache
|
||||
if (NOT CYGWIN)
|
||||
|
Loading…
Reference in New Issue
Block a user