Skip to content

Fix/test all cases for constant namescheme #323

Fix/test all cases for constant namescheme

Fix/test all cases for constant namescheme #323

Workflow file for this run

name: Basic
on:
workflow_dispatch: # Allows manual triggering from GitHub UI
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- '[0-9]*.[0-9]*RC'
- '[0-9]*.[0-9]*.[0-9]*RC'
concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install json-c
run: |
sudo apt-get update
sudo apt-get install -y libjson-c-dev
- name: Install HDF5
run: |
wget -q https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-1.14.4/bin/unix/hdf5-1.14.4-3-ubuntu-2204_gcc.tar.gz
mkdir hdf5-1.14.4-3
tar -xf hdf5-1.14.4-3-ubuntu-2204_gcc.tar.gz
tar -xf hdf5/HDF5-1.14.4.3-Linux.tar.gz --strip-components=4 -C hdf5-1.14.4-3
rm -rf hdf5
- name: Build Silo CMake
run: |
export PATH="$PWD/hdf5-1.14.4-3/bin:$PATH"
mkdir cmake_build
cd cmake_build
cmake -DCMAKE_INSTALL_PREFIX=`pwd`/my_install \
-DSILO_BUILD_FOR_BSD_LICENSE:BOOL=OFF \
-DSILO_ENABLE_HDF5:BOOL=ON \
-DSILO_HDF5_DIR:PATH=`pwd`/../hdf5-1.14.4-3 \
-DSILO_ENABLE_JSON:BOOL=ON \
-DSILO_ENABLE_FPZIP:BOOL=ON \
-DSILO_ENABLE_HZIP:BOOL=ON \
-DSILO_ENABLE_ZFP:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DSILO_ENABLE_SILOCK:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DSILO_ENABLE_PYTHON_MODULE:BOOL=ON \
-DSILO_ENABLE_INSTALL_LITE_HEADERS=ON \
..
make -j 8 install
env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/../hdf5-1.14.4-3/lib make installcheck
- name: Build Silo CMake with ASAN
run: |
export PATH="$PWD/hdf5-1.14.4-3/bin:$PATH"
mkdir cmake_asan_build
cd cmake_asan_build
cmake -DCMAKE_INSTALL_PREFIX=`pwd`/my_install \
-DSILO_BUILD_FOR_BSD_LICENSE:BOOL=OFF \
-DSILO_ENABLE_HDF5:BOOL=ON \
-DSILO_HDF5_DIR:PATH=`pwd`/../hdf5-1.14.4-3 \
-DSILO_ENABLE_JSON:BOOL=ON \
-DSILO_ENABLE_FPZIP:BOOL=ON \
-DSILO_ENABLE_HZIP:BOOL=ON \
-DSILO_ENABLE_ZFP:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DSILO_ENABLE_SILOCK:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DSILO_BUILD_FOR_ASAN:BOOL=ON \
-DSILO_ENABLE_PYTHON_MODULE:BOOL=ON \
-DSILO_ENABLE_INSTALL_LITE_HEADERS=ON \
..
make -j 8 install
- name: Check Silo CTest
id: makecheck-cmake
continue-on-error: true
run: |
export PATH="$PWD/hdf5-1.14.4-3/bin:$PATH"
cd cmake_build
ctest --output-log ctest.log
- name: Check Silo CTest+ASAN
id: makecheck-cmake-asan
continue-on-error: true
run: |
export PATH="$PWD/hdf5-1.14.4-3/bin:$PATH"
cd cmake_asan_build
ctest --output-log ctest.log
- name: Package Artifact CMake
id: pack-cmake
if: ${{ steps.makecheck-cmake.outcome == 'failure' }}
run: |
cd cmake_build
tar -cJf ctest.tar.xz Testing/Temporary ctest.log
- name: Package Artifact CMake-Asan
id: pack-cmake-asan
if: ${{ steps.makecheck-cmake-asan.outcome == 'failure' }}
run: |
cd cmake_asan_build
tar -cJf ctest.tar.xz Testing/Temporary ctest.log
- name: Upload artifacts
if: ${{ steps.makecheck-cmake.outcome == 'failure' || steps.makecheck-cmake-asan.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: silo-test-artifacts
path: |
cmake_build/tests/ctest.tar.xz
cmake_asan_build/tests/ctest.tar.xz
if-no-files-found: error
retention-days: 14
# Re-signal the failure so the job ends red.
- name: Fail job if make check failed
if: ${{ steps.makecheck-cmake.outcome == 'failure' || steps.makecheck-cmake-asan.outcome == 'failure' }}
run: exit 1