8080 make LIBYT_PATH="${{ steps.strings.outputs.install }}"
8181 OMPI_MCA_osc=sm,pt2pt mpirun -np 3 ./example DataIOTest.py
8282
83+ example-parallel-codecov :
84+ name : parallel
85+ runs-on : ${{ matrix.os }}
86+ strategy :
87+ fail-fast : false
88+ matrix :
89+ os : ['ubuntu-latest']
90+ mpi_compiler : ['openmpi']
91+ python_version : ['3.10']
92+ install_dep_command : ['sudo apt-get install -y libreadline-dev uuid-dev lcov']
93+ build_pybind11_option : ['-DUSE_PYBIND11=ON', '-DUSE_PYBIND11=OFF']
94+
95+ steps :
96+ - uses : actions/checkout@v4
97+
98+ - name : Setup MPI ${{ matrix.mpi_compiler }} environment
99+ uses : mpi4py/setup-mpi@v1
100+ with :
101+ mpi : ${{ matrix.mpi_compiler }}
102+
103+ - name : Setup Python ${{ matrix.python_version }} environment
104+ uses : actions/setup-python@v5
105+ with :
106+ python-version : ${{ matrix.python_version }}
107+ cache : ' pip'
108+ - run : |
109+ python -m pip install --upgrade pip
110+ pip install numpy mpi4py yt yt-libyt pandas
111+
112+ - name : Install other dependencies
113+ run : |
114+ ${{ matrix.install_dep_command }}
115+
116+ - name : Configure and Build
117+ run : |
118+ cd ${{ github.workspace }}
119+ rm -rf build
120+ cmake -B build -S . -DINTERACTIVE_MODE=ON -DJUPYTER_KERNEL=ON -DCODE_COVERAGE=ON \
121+ ${{ matrix.build_pybind11_option }}
122+ cmake --build build
123+
124+ - name : End-to-End Test - AMR Example - MPI Size 3
125+ working-directory : ${{ github.workspace }}/build/example/amr-example
126+ run : |
127+ OMPI_MCA_osc=sm,pt2pt mpirun -np 3 ./example
128+
129+ - name : Generate code coverage report
130+ working-directory : ${{ github.workspace }}/build/src/CMakeFiles/yt.dir
131+ run : |
132+ lcov --directory . --capture --ignore-errors mismatch --output-file coverage.info
133+ lcov --extract coverage.info "*/libyt/src/*" "*/libyt/include/*" -o coverage-project-only.info
134+
135+ - name : Upload code coverage report to Codecov
136+ uses : codecov/codecov-action@v5
137+ with :
138+ token : ${{ secrets.CODECOV_TOKEN }}
139+ files : ${{ github.workspace }}/build/src/CMakeFiles/yt.dir/coverage-project-only.info
140+ verbose : true
141+
83142 example-serial-test-run :
84143 name : serial
85144 runs-on : ${{ matrix.os }}
@@ -137,3 +196,56 @@ jobs:
137196 make clean
138197 make OPTIONS=-DSERIAL_MODE LIBYT_PATH="${{ steps.strings.outputs.install }}"
139198 ./example DataIOTest.py
199+
200+ example-serial-codecov :
201+ name : serial
202+ runs-on : ${{ matrix.os }}
203+ strategy :
204+ fail-fast : false
205+ matrix :
206+ os : ['ubuntu-latest']
207+ python_version : ['3.10']
208+ install_dep_command : ['sudo apt-get install -y libreadline-dev uuid-dev lcov']
209+ build_pybind11_option : ['-DUSE_PYBIND11=ON', '-DUSE_PYBIND11=OFF']
210+
211+ steps :
212+ - uses : actions/checkout@v4
213+
214+ - name : Setup Python ${{ matrix.python_version }} environment
215+ uses : actions/setup-python@v5
216+ with :
217+ python-version : ${{ matrix.python_version }}
218+ cache : ' pip'
219+ - run : |
220+ python -m pip install --upgrade pip
221+ pip install numpy yt yt-libyt pandas
222+
223+ - name : Install other dependencies
224+ run : |
225+ ${{ matrix.install_dep_command }}
226+
227+ - name : Configure and Build
228+ run : |
229+ cd ${{ github.workspace }}
230+ rm -rf build
231+ cmake -B build -S . -DINTERACTIVE_MODE=ON -DJUPYTER_KERNEL=ON -DSERIAL_MODE=ON -DCODE_COVERAGE=ON \
232+ ${{ matrix.build_pybind11_option }}
233+ cmake --build build
234+
235+ - name : End-to-End Test - AMR Example - Serial
236+ working-directory : ${{ github.workspace }}/build/example/amr-example
237+ run : |
238+ ./example
239+
240+ - name : Generate code coverage report
241+ working-directory : ${{ github.workspace }}/build/src/CMakeFiles/yt.dir
242+ run : |
243+ lcov --directory . --capture --ignore-errors mismatch --output-file coverage.info
244+ lcov --extract coverage.info "*/libyt/src/*" "*/libyt/include/*" -o coverage-project-only.info
245+
246+ - name : Upload code coverage report to Codecov
247+ uses : codecov/codecov-action@v5
248+ with :
249+ token : ${{ secrets.CODECOV_TOKEN }}
250+ files : ${{ github.workspace }}/build/src/CMakeFiles/yt.dir/coverage-project-only.info
251+ verbose : true
0 commit comments