Unverified Commit ba9a763d by Dominic Hamon Committed by GitHub

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

* 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
parent 64cb55e9
...@@ -7,15 +7,27 @@ on: ...@@ -7,15 +7,27 @@ on:
branches: [ master ] branches: [ master ]
jobs: 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: job:
# TODO(dominic): Extend this to include compiler and set through env: CC/CXX. name: ${{ matrix.os }}.${{ matrix.build_type }}.${{ matrix.compiler }}
name: ${{ matrix.os }}.${{ matrix.build_type }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: 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'] 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: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
...@@ -23,9 +35,14 @@ jobs: ...@@ -23,9 +35,14 @@ jobs:
run: cmake -E make_directory ${{ runner.workspace }}/_build run: cmake -E make_directory ${{ runner.workspace }}/_build
- name: configure cmake - name: configure cmake
env:
CXX: ${{ matrix.compiler }}
shell: bash shell: bash
working-directory: ${{ runner.workspace }}/_build 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 - name: build
shell: bash shell: bash
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment