1
0
mirror of https://github.com/google/benchmark.git synced 2025-04-29 14:30:37 +08:00

Add multiple compiler support to build-and-test workflow ()

* 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
This commit is contained in:
Dominic Hamon 2021-04-30 14:22:15 +01:00 committed by GitHub
parent 64cb55e910
commit ba9a763def
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,15 +7,27 @@ on:
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:
# TODO(dominic): Extend this to include compiler and set through env: CC/CXX.
name: ${{ matrix.os }}.${{ matrix.build_type }}
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, windows-latest]
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
@ -23,9 +35,14 @@ jobs:
run: cmake -E make_directory ${{ runner.workspace }}/_build
- name: configure cmake
env:
CXX: ${{ matrix.compiler }}
shell: bash
working-directory: ${{ runner.workspace }}/_build
run: cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
run: >
cmake $GITHUB_WORKSPACE
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: build
shell: bash