mirror of
https://github.com/google/benchmark.git
synced 2024-12-01 07:16:07 +00:00
ba9a763def
* Add 32-bit build support to build-and-test * attempt different yaml multiline string format * syntax fixes to yaml * switch to getting alternative compilers working * remove done TODO * trying to separate out windows * oops, typo. * add TODOs for missing builds wrt travis
56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
name: build-and-test
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
# TODO: add job using container ubuntu:14.04 with and without g++-6
|
|
# TODO: add 32-bit builds (g++ and clang++) for ubuntu (requires g++-multilib and libc6:i386)
|
|
# TODO: add coverage build (requires lcov)
|
|
# TODO: add clang + libc++ builds for ubuntu
|
|
# TODO: add clang + ubsan/asan/msan + libc++ builds for ubuntu
|
|
job:
|
|
name: ${{ matrix.os }}.${{ matrix.build_type }}.${{ matrix.compiler }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, ubuntu-16.04, ubuntu-20.04, macos-latest]
|
|
build_type: ['Release', 'Debug']
|
|
compiler: [g++, clang++]
|
|
include:
|
|
- displayTargetName: windows-latest-release
|
|
os: windows-latest
|
|
build_type: 'Release'
|
|
- displayTargetName: windows-latest-debug
|
|
os: windows-latest
|
|
build_type: 'Debug'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: create build environment
|
|
run: cmake -E make_directory ${{ runner.workspace }}/_build
|
|
|
|
- name: configure cmake
|
|
env:
|
|
CXX: ${{ matrix.compiler }}
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}/_build
|
|
run: >
|
|
cmake $GITHUB_WORKSPACE
|
|
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
|
|
|
- name: build
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}/_build
|
|
run: cmake --build . --config ${{ matrix.build_type }}
|
|
|
|
- name: test
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}/_build
|
|
run: ctest -C ${{ matrix.build_type }} -VV
|