Skip to content

Commit

Permalink
Add a GitHub Actions workflow to run on main branch (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored May 27, 2024
1 parent d22c846 commit 7b8e07e
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: JSON Schema

on:
push:
branches:
- main

jobs:
package:
strategy:
fail-fast: false
matrix:
platform:
- os: ubuntu-latest
cc: clang
cxx: clang++
shell: sh

defaults:
run:
shell: ${{ matrix.platform.shell }}

runs-on: ${{ matrix.platform.os }}
env:
CC: ${{ matrix.platform.cc }}
CXX: ${{ matrix.platform.cxx }}
steps:
- uses: actions/checkout@v3
- run: cmake --version
- name: Configure JSON Schema
run: >
cmake -S . -B ./build
-DCMAKE_BUILD_TYPE:STRING=Release
-DJSONSCHEMA_TESTS:BOOL=ON
-DBUILD_SHARED_LIBS:BOOL=OFF
-DCMAKE_COMPILE_WARNING_AS_ERROR:BOOL=ON
- run: cmake --build ./build --config Release --parallel 4
- run: >
cmake --install ./build --prefix ./build/dist --config Release --verbose
--component intelligence_jsonschema
# Not every CTest version supports the --test-dir option. If such option
# is not recognized, `ctest` will successfully exit finding no tests.
# Better to be sure and `cd` all the time here.
- run: cd ./build && ctest --build-config Release --output-on-failure --parallel

- run: cpack --config build/CPackConfig.cmake -B build/out -C Release

0 comments on commit 7b8e07e

Please sign in to comment.