hdr_histogram_log: Fix potential division-by-zero #102
Workflow file for this run
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
matrix: | |
os: [linux, windows, macos] | |
build_type: [Debug, RelWithDebInfo] | |
arch: [x86, x64] | |
cmake: [minimal, latest] | |
hdr_log_required: [ON, DISABLED] | |
exclude: | |
- os: linux | |
arch: x86 | |
- os: windows | |
cmake: minimal | |
- os: windows | |
hdr_log_required: DISABLED | |
- os: macos | |
arch: x86 | |
- os: macos | |
cmake: minimal | |
- os: macos | |
hdr_log_required: DISABLED | |
include: | |
- cmake: minimal | |
cmake_url_part: v3.12/cmake-3.12.4 | |
- cmake: latest | |
cmake_url_part: v3.17/cmake-3.17.3 | |
- os: linux | |
runner: ubuntu-latest | |
- os: windows | |
runner: windows-latest | |
- os: windows | |
arch: x86 | |
cmake_args: -A Win32 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake | |
- os: windows | |
arch: x64 | |
cmake_args: -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake | |
- os: macos | |
runner: macos-latest | |
env: | |
VCPKG_DEFAULT_TRIPLET: ${{ matrix.arch }}-${{ matrix.os }} | |
VCPKG_TARGET_ARCHITECTURE: ${{ matrix.arch }} | |
VCPKG_LIBRARY_LINKAGE: static | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
- name: Install dependencies (linux) | |
if: matrix.os == 'linux' | |
run: | | |
sudo apt-get install -y zlib1g-dev | |
wget --no-check-certificate https://cmake.org/files/${{ matrix.cmake_url_part }}-Linux-x86_64.tar.gz -O /tmp/cmake.tar.gz | |
sudo tar xf /tmp/cmake.tar.gz -C /usr/local --strip-components 1 | |
- name: Install dependencies (windows) | |
if: matrix.os == 'windows' | |
run: vcpkg install zlib | |
- name: CMake version | |
run: | | |
cmake --version | |
ctest --version | |
cpack --version | |
- name: Configure | |
run: cmake -E make_directory _build && cmake -E chdir _build cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DHDR_LOG_REQUIRED=${{ matrix.hdr_log_required }} ${{ matrix.cmake_args }} | |
- name: Build | |
run: cmake --build _build --config ${{ matrix.build_type }} | |
- name: Test | |
run: cmake -E chdir _build ctest --build-config ${{ matrix.build_type }} --output-in-failure |