Skip to content

Commit

Permalink
ci: check JSON schema of CMakePresets.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ligurio committed Jan 12, 2024
1 parent 574742c commit 29b10e1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/check.yaml
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

0 comments on commit 29b10e1

Please sign in to comment.