Skip to content

Update build.yml

Update build.yml #42

Workflow file for this run

name: Build SurfATT
on:
push:
branches: [ "devel", "devsj"]
pull_request:
branches: [ "main" ]
jobs:
LinuxTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install build-essential gfortran cmake libopenmpi-dev openmpi-bin libhdf5-openmpi-dev hdf5-tools
- name: make
run: |
mkdir build && cd build
cmake .. && make -j 4
- name: Diagnose HDF5
if: always() # 即使前面失败也执行
run: |
echo ">>>>> CMake HDF5 info"
grep -i hdf5 build/CMakeCache.txt || true
echo ">>>>> Linked HDF5 libs"
ldd build/SurfATT | grep hdf5 || true
echo ">>>>> System HDF5"
h5dump --version || true
echo ">>>>> Env vars"
env | grep -i hdf5 || true
- name: test
run: |
cd $GITHUB_WORKSPACE/examples/00_checkerboard_iso
sed -i "/NPROC=/c\NPROC=1" run_this_example.sh
sed -i "/niter: /c\ niter: 2" input_params.yml
sh run_this_example.sh