Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance tests #226

Merged
merged 17 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/code-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
check-includes-are-relative:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- shell : bash
run: |
cd include
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ concurrency:
jobs:
# Build job
build:
if: github.repository == 'getml/reflect-cpp'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -40,6 +41,7 @@ jobs:

# Deployment job
deploy:
if: github.repository == 'getml/reflect-cpp'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
71 changes: 0 additions & 71 deletions .github/workflows/linux-clang-14.yaml

This file was deleted.

71 changes: 0 additions & 71 deletions .github/workflows/linux-clang-16.yaml

This file was deleted.

67 changes: 43 additions & 24 deletions .github/workflows/linux-gcc.yaml → .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
name: linux-gcc
name: linux

on: [ pull_request ]
on: [ pull_request, workflow_dispatch ]

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

jobs:
linux-gcc:
runs-on: ubuntu-latest
linux:
strategy:
fail-fast: false
matrix:
include:
- compiler: llvm
compiler-version: 16
- compiler: llvm
compiler-version: 18
- compiler: gcc
compiler-version: 11
additional-dep: "g++-11"
- compiler: gcc
compiler-version: 12
- compiler: gcc
compiler-version: 14
name: "${{ github.job }} (${{ matrix.compiler }}-${{ matrix.compiler-version }})"
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
Expand All @@ -20,29 +36,34 @@ jobs:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: "${{ github.job }}-${{ matrix.compiler }}-${{ matrix.compiler-version }}"
max-size: "2G"
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- name: install dependencies
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y g++
- name: Compile
sudo apt install -y ninja-build ${{ matrix.additional-dep }}
- name: Compile
run: |
g++ --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
if [[ "${{ matrix.compiler }}" == "llvm" ]]; then
export CC=clang-${{ matrix.compiler-version }}
export CXX=clang++-${{ matrix.compiler-version }}
elif [[ "${{ matrix.compiler }}" == "gcc" ]]; then
export CC=gcc-${{ matrix.compiler-version }}
export CXX=g++-${{ matrix.compiler-version }}
fi
sudo ln -s $(which ccache) /usr/local/bin/$CC
sudo ln -s $(which ccache) /usr/local/bin/$CXX
$CXX --version
cmake -S . -B build -G Ninja -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
- 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/generic/reflect-cpp-generic-tests
./build/tests/json/reflect-cpp-json-tests
./build/tests/json_c_arrays_and_inheritance/reflect-cpp-json-c-arrays-and-inheritance-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
ctest --test-dir build --output-on-failure
- name: Run benchmarks
run: |
echo '# Benchmarks' >> $GITHUB_STEP_SUMMARY
Expand All @@ -61,5 +82,3 @@ jobs:
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada >> $GITHUB_STEP_SUMMARY
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=licenses >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY


65 changes: 0 additions & 65 deletions .github/workflows/macos-clang-arm.yaml

This file was deleted.

Loading
Loading