-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
97 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: velocypack-test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
CMAKE_BUILD_PARALLEL_LEVEL: 4 | ||
CXX_STANDARD: 20 | ||
HASH_TYPE: xxhash | ||
SANITIZER: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
# GCC builds | ||
- {os: ubuntu-latest, compiler: gcc, version: '7', | ||
flags: '-Wsuggest-override', options: '--with-boost-filesystem'} | ||
- {os: ubuntu-latest, compiler: gcc, version: '8', | ||
flags: '-Wsuggest-override', options: '--with-boost-filesystem'} | ||
- {os: ubuntu-latest, compiler: gcc, version: '9', | ||
flags: '-Wsuggest-override'} | ||
- {os: ubuntu-latest, compiler: gcc, version: '10', | ||
flags: '-Wsuggest-override'} | ||
|
||
# Clang builds | ||
- {os: ubuntu-18.04, compiler: clang, version: '7'} | ||
- {os: ubuntu-18.04, compiler: clang, version: '8'} | ||
- {os: ubuntu-latest, compiler: clang, version: '9'} | ||
- {os: ubuntu-latest, compiler: clang, version: '10'} | ||
- {os: ubuntu-latest, compiler: clang, version: '11'} | ||
|
||
# Windows builds | ||
- {os: windows-2016, compiler: msvc, version: '14.16', | ||
boost-version: '1.72.0'} | ||
- {os: windows-latest, compiler: msvc, version: '14.28', | ||
boost-version: '1.72.0'} | ||
|
||
# macOS builds | ||
- {os: macos-latest, compiler: clang} | ||
|
||
# C++20 builds | ||
- {os: ubuntu-latest, compiler: gcc, version: '10', | ||
common-options: '--std=c++20', flags: '-Wsuggest-override', | ||
boost-version: '1.74.0', extra-desc: 'c++20'} | ||
- {os: ubuntu-latest, compiler: clang, version: '11', | ||
common-options: '--std=c++20', boost-version: '1.74.0', | ||
extra-desc: 'c++20'} | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install gcc | ||
if: startsWith(matrix.os, 'ubuntu-') && matrix.compiler == 'gcc' | ||
run: | | ||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | ||
sudo apt-get update | ||
sudo apt-get install g++-${{ matrix.version }} | ||
echo "CXX=g++-${{ matrix.version }}" >> ${GITHUB_ENV} | ||
- name: Install clang | ||
if: startsWith(matrix.os, 'ubuntu-') && matrix.compiler == 'clang' | ||
run: | | ||
export CODENAME=`lsb_release -c | sed 's/Codename:\t//'` | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add - | ||
sudo add-apt-repository "deb http://apt.llvm.org/${CODENAME}/ llvm-toolchain-${CODENAME}-${{ matrix.version }} main" | ||
sudo apt-get update | ||
sudo apt-get install clang-${{ matrix.version }} | ||
echo "CXX=clang++-${{ matrix.version }}" >> ${GITHUB_ENV} | ||
- name: Initialize MSVC ${{ matrix.version }} | ||
if: startsWith(matrix.os, 'windows-') | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
toolset: ${{ matrix.version }} | ||
- name: Configure CMake | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
run: cmake -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DHashType=${{env.HASH_TYPE}} -DBuildTests=ON -DBuildLargeTests=OFF -DBuildVelocyPackExamples=ON -DBuildTools=ON -DEnableSSE=OFF -DCMAKE_CXX_STANDARD=${{env.CXX_STANDARD}} | ||
|
||
- name: Build | ||
# Build your program with the given configuration | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
|
||
- name: Test | ||
working-directory: ${{github.workspace}}/build | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ctest -C ${{env.BUILD_TYPE}} | ||
|
||
- name: Fuzzer | ||
working-directory: ${{github.workspace}} | ||
run: scripts/travis-test.sh | ||
|