Skip to content

Commit

Permalink
initial CMake workflow
Browse files Browse the repository at this point in the history
see #171
  • Loading branch information
pmed committed Sep 12, 2021
1 parent 57a7114 commit ac8cdda
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CMake

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
strategy:
matrix:
os: [ ubuntu-16.04, macOS-latest ]
build_type: [ Release, Debug ]
shared_lib: [ BUILD_SHARED_LIBS=TRUE, BUILD_SHARED_LIBS=FALSE ]
header_only: [ V8PP_HEADER_ONLY=TRUE, V8PP_HEADER_ONLY=FALSE ]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Install V8 PPA
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo add-apt-repository ppa:pinepain/libv8 -y
sudo apt-get update -q
sudo apt-get install libv8-6.6-dev -y
- name: Install V8 brew
if: startsWith(matrix.os, 'macOS')
run: brew install v8

- 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 -D${{matrix.shared_lib}} -D${{matrix.header_only}}

- 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

0 comments on commit ac8cdda

Please sign in to comment.