Added a test for templated structs (#111) #102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: [ push, pull_request ] | |
jobs: | |
linux-clang: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Run vcpkg | |
uses: lukka/run-vcpkg@v11 | |
- uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: "16" | |
- name: link clang lib | |
run: | | |
sudo mkdir -p /usr/lib/llvm-16/lib | |
sudo ln -s clang /usr/lib/llvm-16/lib/clang | |
working-directory: ${{ env.LLVM_PATH }}/lib | |
- name: Compile | |
env: | |
CC: clang | |
CXX: clang++ | |
run: | | |
clang --version | |
cmake -S . -B build -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_BSON=ON -DREFLECTCPP_CBOR=ON -DREFLECTCPP_FLEXBUFFERS=ON -DREFLECTCPP_MSGPACK=ON -DREFLECTCPP_TOML=ON -DREFLECTCPP_XML=ON -DREFLECTCPP_YAML=ON -DCMAKE_BUILD_TYPE=Release | |
cmake --build build -j 4 | |
- name: Run tests | |
run: | | |
./build/tests/bson/reflect-cpp-bson-tests | |
./build/tests/cbor/reflect-cpp-cbor-tests | |
./build/tests/flexbuffers/reflect-cpp-flexbuffers-tests | |
./build/tests/json/reflect-cpp-json-tests | |
./build/tests/msgpack/reflect-cpp-msgpack-tests | |
./build/tests/toml/reflect-cpp-toml-tests | |
./build/tests/xml/reflect-cpp-xml-tests | |
./build/tests/yaml/reflect-cpp-yaml-tests | |
- name: Run benchmarks | |
run: | | |
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada | |
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=simple_read | |
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read | |
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write |