Skip to content

feat/build: cmake packages #32

feat/build: cmake packages

feat/build: cmake packages #32

Workflow file for this run

on:
pull_request:
workflow_dispatch:
name: C++ CI
jobs:
cpp:
name: C++
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust:
- stable
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: ./.github/actions/libextism
- run: git submodule update --init
- name: Install C++ SDK deps
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install jsoncpp googletest cmake
- name: Install C++ SDK deps
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get install g++ libjsoncpp-dev libgtest-dev cmake
- name: Run C++ tests
run: |
mkdir build
cd build
cmake ..
stat /usr/local/include/json/json.h || true
stat /usr/local/include/jsoncpp/json/json.h || true
stat /opt/homebrew/include/json/json.h || true
stat /opt/homebrew/include/jsoncpp/json/json.h || true
make
LD_LIBRARY_PATH=/usr/local/lib make test
LD_LIBRARY_PATH=/usr/local/lib ./example ../wasm/code-functions.wasm