-
Notifications
You must be signed in to change notification settings - Fork 122
59 lines (48 loc) · 2.02 KB
/
cmake.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
name: CMake
on: [ push, pull_request ]
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
build_type: [ Release ]
shared_lib: [ false, true ]
header_only: [ false, true ]
include:
- os: ubuntu-latest
v8_compress_pointers: false
v8_enable_sandbox: false
- os: macos-latest
v8_compress_pointers: true
v8_enable_sandbox: true
- os: windows-latest
v8_compress_pointers: true
v8_enable_sandbox: false
runs-on: ${{matrix.os}}
name: '${{matrix.os}} ${{matrix.build_type}} shared_lib=${{matrix.shared_lib}} header_only=${{matrix.header_only}} v8_compress_pointers=${{matrix.v8_compress_pointers}} v8_enable_sandbox=${{matrix.v8_enable_sandbox}}'
steps:
- uses: actions/checkout@v2
- name: Install V8 apt
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt install libv8-dev -y
- name: Install V8 brew
if: startsWith(matrix.os, 'macos')
run: brew install v8
- name: Install V8 nuget
if: startsWith(matrix.os, 'windows')
run: nuget install v8-v142-x64 -OutputDirectory ${{github.workspace}}/build
- name: Install Visual C++
if: startsWith(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
toolset: 14.29 # Visual C++ 2019
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_TESTING=TRUE -DBUILD_SHARED_LIBS=${{matrix.shared_lib}} -DV8PP_HEADER_ONLY=${{matrix.header_only}} -DV8_COMPRESS_POINTERS=${{matrix.v8_compress_pointers}} -DV8_ENABLE_SANDBOX=${{matrix.v8_enable_sandbox}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} -V