Skip to content

Merge pull request #33 from vpetrigo/feature/wrap_value_to_smart_ptr #91

Merge pull request #33 from vpetrigo/feature/wrap_value_to_smart_ptr

Merge pull request #33 from vpetrigo/feature/wrap_value_to_smart_ptr #91

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
custom-hash-map: [OFF, ON]
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: "Run tests"
run: |
mkdir build
cmake --version
$CC --version
$CXX --version
cd build
cmake .. -DUSE_CUSTOM_HASHMAP=${{ matrix.custom-hash-map }}
cmake --build . -- -j$(nproc)
ctest
shell: bash
build-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Run tests with coverage options
run: sudo apt install lcov -y
- name: Run tests with coverage options
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
mkdir build
cd build
cmake .. -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage" -DCMAKE_C_FLAGS="-fprofile-arcs -ftest-coverage"
cmake --build . -- -j$(nproc)
ctest
mkdir coverage
cd coverage
lcov --directory ../ -c -o coverage.info
lcov --remove coverage.info "/usr/*" "*/deps/*" "*/test/*" -o coverage.info
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -R .
build-clang:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag: [13, 15, 16, 17]
custom-hash-map: [OFF, ON]
env:
CC: clang-${{ matrix.tag }}
CXX: clang++-${{ matrix.tag }}
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Install Clang ${{ matrix.tag }}
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x ./llvm.sh
sudo ./llvm.sh ${{ matrix.tag }}
shell: bash
- name: "Run tests"
run: |
mkdir build
cmake --version
$CC --version
$CXX --version
cd build
cmake .. -DUSE_CUSTOM_HASHMAP=${{ matrix.custom-hash-map }}
cmake --build . -- -j$(nproc)
ctest
shell: bash
build-gcc:
runs-on: ubuntu-latest
container: gcc:${{ matrix.tag }}
strategy:
fail-fast: false
matrix:
tag: [7, 8, 9, 10, 11, 12, 13]
custom-hash-map: [OFF, ON]
env:
CC: gcc
CXX: g++
steps:
- uses: actions/checkout@v1
with:
submodules: 'true'
- uses: lukka/get-cmake@latest
- name: "Run tests"
run: |
mkdir build
cmake --version
$CC --version
$CXX --version
cd build
cmake .. -DUSE_CUSTOM_HASHMAP=${{ matrix.custom-hash-map }}
cmake --build . -- -j$(nproc)
ctest
shell: bash