Skip to content

Commit e99b0fb

Browse files
committed
Add GitHub workflow
Verify all JSON-openPMD files written by testing against the schema
1 parent 5fc0073 commit e99b0fb

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
@@ -239,7 +239,7 @@ jobs:
239239
- name: Install
240240
run: |
241241
sudo apt-get update
242-
sudo apt-get install g++ libopenmpi-dev libhdf5-openmpi-dev python3 python3-numpy python3-mpi4py python3-pandas
242+
sudo apt-get install g++ libopenmpi-dev libhdf5-openmpi-dev python3 python3-numpy python3-mpi4py python3-pandas python3-pip
243243
# TODO ADIOS2
244244
- name: Build
245245
env: {CXXFLAGS: -Werror, PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig}
@@ -253,6 +253,22 @@ jobs:
253253
cmake --build build --parallel 2
254254
ctest --test-dir build --output-on-failure
255255
256+
python3 -m pip install jsonschema
257+
cd share/openPMD/json_schema
258+
PATH="../../../build/bin:$PATH" make -j 2
259+
# We need to exclude the thetaMode example since that has a different
260+
# meshesPath and the JSON schema needs to hardcode that.
261+
find ../../../build/samples/ \
262+
! -path '*thetaMode*' \
263+
! -path '/*many_iterations/*' \
264+
! -name 'profiling.json' \
265+
! -name '*config.json' \
266+
-iname '*.json' \
267+
| while read i; do
268+
echo "Checking $i"
269+
./check.py "$i"
270+
done
271+
256272
musllinux_py10:
257273
runs-on: ubuntu-20.04
258274
if: github.event.pull_request.draft == false

0 commit comments

Comments
 (0)