Skip to content

Commit 7dfd98e

Browse files
authored
set up CI (#13)
* add CI Signed-off-by: Anton Dukhovnikov <[email protected]>
1 parent aefaeed commit 7dfd98e

File tree

5 files changed

+47
-4
lines changed

5 files changed

+47
-4
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
2+
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
3+
name: CI
4+
permissions:
5+
contents: read
6+
7+
on:
8+
push:
9+
#branches: [ "master" ]
10+
pull_request:
11+
#branches: [ "master" ]
12+
13+
jobs:
14+
check_schema:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
19+
fail-fast: false
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Dependencies
25+
shell: bash
26+
run: |
27+
pipx install check-jsonschema
28+
29+
- name: Check
30+
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
31+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
32+
working-directory: .
33+
run: |
34+
./scripts/check_schema.sh
35+

data/cmf/cmf_1931.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"laboratory" : "scitech",
1111
"document_creation_date" : "2017-04-16T12:00:00Z",
1212
"comments" : "this is for rawtoaces software to convert RAW to aces",
13-
"license" : null
13+
"license" : ""
1414
},
1515
"spectral_data": {
1616
"units" : "relative",

data/illuminant/iso7589_stutung_380_780_5.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"laboratory" : "scitech",
1111
"document_creation_date" : "2017-04-13T12:00:00Z",
1212
"comments" : "this is for rawtoaces software to convert RAW to aces",
13-
"license" : null
13+
"license" : ""
1414
},
1515
"spectral_data": {
1616
"units" : "relative",
@@ -107,4 +107,4 @@
107107
}
108108
}
109109
}
110-
}
110+
}

data/training/training_spectral.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"unique_identifier" : "09a6f5b3-6d14-4cd6-8913-ec95aa566960",
99
"measurement_equipment" : null,
1010
"laboratory" : "scitech",
11-
"document_creation_date" : "2017-04-16",
11+
"document_creation_date" : "2017-04-16T12:00:00Z",
1212
"comments" : "this is for rawtoaces software to convert RAW to aces",
1313
"license" : "Apache-2.0"
1414
},

scripts/check_schema.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
for DIR in camera cmf illuminant training; do
4+
for FILE in ./data/$DIR/*; do
5+
echo "Processing file $FILE"
6+
check-jsonschema --schemafile ./schema_0.1.0.json $FILE
7+
done
8+
done

0 commit comments

Comments
 (0)