<commit_before>name: build-and-test

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  job:
    # TODO(dominic): Extend this to include compiler and set through env: CC/CXX.
    name: ${{ matrix.os }}.${{ matrix.build_type }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, ubuntu-16.04, ubuntu-20.04, macos-latest, windows-latest]
        build_type: ['Release', 'Debug']
    steps:
    - uses: actions/checkout@v2

    - name: create build environment
      run: cmake -E make_directory ${{ runner.workspace }}/_build

    - name: configure cmake
      shell: bash
      working-directory: ${{ runner.workspace }}/_build
      run: cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON $GITHUB_WORKSPACE -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<commit_msg>Add multiple compiler support to build-and-test workflow (#1128)<commit_after>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
{'fraction_non_alphanumeric': 0.13145869947275923, 'fraction_numerical': 0.011599297012302284, 'mean_word_length': 2.531017369727047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3293878', 'n_tokens_mistral': 962, 'n_tokens_neox': 877, 'n_words': 230}