-
Notifications
You must be signed in to change notification settings - Fork 6
69 lines (60 loc) · 2.07 KB
/
package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: JSON Schema
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: write
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
# TODO: Do this from another job in the workflow so we can collect from multiple platforms
# TODO: Create a proper release if there is a tag instead
- run: gh config set prompt disabled
env:
GH_TOKEN: ${{ github.token }}
- run: gh release delete continuous --cleanup-tag --yes || true
env:
GH_TOKEN: ${{ github.token }}
- run: gh release create continuous --prerelease --draft=false --title continuous --target "$GITHUB_SHA"
env:
GH_TOKEN: ${{ github.token }}
- run: gh release upload --clobber continuous build/out/*.zip
env:
GH_TOKEN: ${{ github.token }}