Skip to content

Commit aaaf255

Browse files
committed
Add GitHub workflow
Verify all JSON-openPMD files written by testing against the schema
1 parent 6d956a5 commit aaaf255

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/linux.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ jobs:
245245
- name: Install
246246
run: |
247247
sudo apt-get update
248-
sudo apt-get install g++ libopenmpi-dev libhdf5-openmpi-dev python3 python3-numpy python3-mpi4py python3-pandas
248+
sudo apt-get install g++ libopenmpi-dev libhdf5-openmpi-dev python3 python3-numpy python3-mpi4py python3-pandas python3-pip
249249
# TODO ADIOS2
250250
- name: Build
251251
env: {CXXFLAGS: -Werror, PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig}
@@ -260,6 +260,22 @@ jobs:
260260
cd build
261261
ctest --output-on-failure
262262
263+
python3 -m pip install jsonschema
264+
cd share/openPMD/json_schema
265+
PATH="../../../build/bin:$PATH" make -j 2
266+
# We need to exclude the thetaMode example since that has a different
267+
# meshesPath and the JSON schema needs to hardcode that.
268+
find ../../../build/samples/ \
269+
! -path '*thetaMode*' \
270+
! -path '/*many_iterations/*' \
271+
! -name 'profiling.json' \
272+
! -name '*config.json' \
273+
-iname '*.json' \
274+
| while read i; do
275+
echo "Checking $i"
276+
./check.py "$i"
277+
done
278+
263279
musllinux_py10:
264280
runs-on: ubuntu-20.04
265281
if: github.event.pull_request.draft == false

0 commit comments

Comments
 (0)