1- # Test if it can run on multiplatform and both in serial (gcc) and parallel (openmpi)
1+ # Test if libyt can build with different options, download dependencies, and install and link correctly.
22
33name : CMake Build Test
44
@@ -24,80 +24,74 @@ jobs:
2424 platform :
2525 - os : ubuntu-latest
2626 mpi : ' openmpi'
27- - os : macos-latest
27+ check_shared_lib : ldd lib/libyt.so
28+ - os : macos-12
2829 mpi : ' mpich'
30+ check_shared_lib : otool -l lib/libyt.dylib
2931 python-version : ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
3032
3133 steps :
3234 - name : Checkout libyt repo
33- uses : actions/checkout@v3
35+ uses : actions/checkout@v4
3436
3537 - name : CMake Version
3638 run : cmake --version
3739
3840 - name : Setup Python ${{ matrix.python-version }} environment
39- uses : actions/setup-python@v4
41+ uses : actions/setup-python@v5
4042 with :
4143 python-version : ${{ matrix.python-version }}
4244 architecture : ' x64'
4345 cache : ' pip'
4446 - run : |
4547 python -m pip install --upgrade pip
46- pip install -r ${{ github.workspace }}/.github/tools/requirements.txt
48+ pip install numpy
4749
4850 - name : Setup MPI environment
4951 uses : mpi4py/setup-mpi@v1
5052 with :
5153 mpi : ${{ matrix.platform.mpi }}
5254
53- - name : Install yt, mpi4py, and yt_libyt
54- run : |
55- pip install mpi4py yt
56- pip install yt-libyt
57-
5855 - name : Update GitHub Environment Variables
5956 run : |
60- echo "LIBYT_PARALLEL_INSTALL_PATH=${{ github.workspace }}/libyt_parallel" >> $GITHUB_ENV
61- echo "LIBYT_SERIAL_INSTALL_PATH=${{ github.workspace }}/libyt_serial" >> $GITHUB_ENV
57+ echo "LIBYT_TEST_INSTALL_FOLDER=${{ github.workspace }}/libyt_installation" >> $GITHUB_ENV
6258
63- - name : Build libyt -- Parallel (MPI)
59+ - name : Test Option -DSERIAL_MODE=ON
6460 run : |
6561 cd ${{ github.workspace }}
6662 rm -rf build
67- cmake -B build -S .
63+ cmake -B build -S . -DSERIAL_MODE=ON
6864 cmake --build build
69- cmake --install build --prefix "${{ env.LIBYT_PARALLEL_INSTALL_PATH }}"
65+ cmake --install build --prefix "${{ env.LIBYT_TEST_INSTALL_FOLDER }}/libyt-serial-on"
66+ cd "${{ env.LIBYT_TEST_INSTALL_FOLDER }}/libyt-serial-on"
67+ ${{ matrix.platform.check_shared_lib }}
7068
71- - name : Build libyt -- Serial (GCC)
69+ - name : Test Option -DINTERACTIVE_MODE=ON
7270 run : |
7371 cd ${{ github.workspace }}
74- rm -rf build-serial
75- cmake -B build-serial -S . -DSERIAL_MODE=ON
76- cmake --build build-serial
77- cmake --install build-serial --prefix "${{ env.LIBYT_SERIAL_INSTALL_PATH }}"
78-
79- - name : Prepare Test
80- run : |
81- cd ${{ github.workspace }}/example
82- cp ${{ github.workspace }}/.github/tests/test-DataIO/DataIOTest.py .
83-
84- - name : Generate Density Data for Testing
85- run : |
86- cd ${{ github.workspace }}/example
87- cp ${{ github.workspace }}/.github/tools/generate_density_data.cpp .
88- g++ -o generate_density_data generate_density_data.cpp
89- ./generate_density_data
72+ rm -rf build
73+ cmake -B build -S . -DINTERACTIVE_MODE=ON
74+ cmake --build build
75+ cmake --install build --prefix "${{ env.LIBYT_TEST_INSTALL_FOLDER }}/libyt-interactive-on"
76+ cd "${{ env.LIBYT_TEST_INSTALL_FOLDER }}/libyt-interactive-on"
77+ ${{ matrix.platform.check_shared_lib }}
9078
91- - name : Test Run and DataIO Test - example - Serial
79+ - name : Test Option -DJUPYTER_KERNEL=ON
9280 run : |
93- cd ${{ github.workspace }}/example
94- make clean
95- make OPTIONS=-DSERIAL_MODE LIBYT_PATH="${{ env.LIBYT_SERIAL_INSTALL_PATH }}"
96- ./example DataIOTest.py
81+ cd ${{ github.workspace }}
82+ rm -rf build
83+ cmake -B build -S . -DJUPYTER_KERNEL=ON
84+ cmake --build build
85+ cmake --install build --prefix "${{ env.LIBYT_TEST_INSTALL_FOLDER }}/libyt-jupyter-on"
86+ cd "${{ env.LIBYT_TEST_INSTALL_FOLDER }}/libyt-jupyter-on"
87+ ${{ matrix.platform.check_shared_lib }}
9788
98- - name : Test Run and DataIO Test - example - Parallel (MPI 3)
89+ - name : Test Option -DSUPPORT_TIMER=ON
9990 run : |
100- cd ${{ github.workspace }}/example
101- make clean
102- make LIBYT_PATH="${{ env.LIBYT_PARALLEL_INSTALL_PATH }}"
103- OMPI_MCA_osc=sm,pt2pt mpirun -np 3 ./example DataIOTest.py
91+ cd ${{ github.workspace }}
92+ rm -rf build
93+ cmake -B build -S . -DSUPPORT_TIMER=ON
94+ cmake --build build
95+ cmake --install build --prefix "${{ env.LIBYT_TEST_INSTALL_FOLDER }}/libyt-timer-on"
96+ cd "${{ env.LIBYT_TEST_INSTALL_FOLDER }}/libyt-timer-on"
97+ ${{ matrix.platform.check_shared_lib }}
0 commit comments