-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: check JSON schema of CMakePresets.json
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Static analysis | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
static-analysis: | ||
if: | | ||
github.event_name == 'push' || | ||
github.event_name == 'pull_request' && | ||
github.event.pull_request.head.repo.full_name != github.repository | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#schema | ||
# A machine-readable JSON schema for the CMakePresets.json format. | ||
- run: curl -O https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json | ||
|
||
- run: pip3 install jsonschema | ||
|
||
- name: Check JSON schema of the CMakePresets.json | ||
run: jsonschema -i CMakePresets.json schema.json |