<commit_before>name: "main"

on: # @see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events
  push:
    branches: # Array of patterns that match refs/heads
      - main
  pull_request:
    branches: [ main ]

jobs:
  format:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: CI Job
        shell: bash
        run: |
          bash ci/do_ci.sh format ;
  unix_build: # job id, can be any string
    name: Unix Build
    # This job runs on Linux
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: mbedtls
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: libressl
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: boringssl
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: openssl-1.1.1
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: no-rtti
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: no-exceptions
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc-latest
          - os: ubuntu-18.04
            triplet: x64-linux
            cc: gcc-4.8
          - os: ubuntu-latest
            triplet: x64-linux
            cc: clang-latest
          - os: macos-latest
            triplet: x64-osx
            cc: clang-latest
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build & Test
        shell: bash
        env:
          USE_CC: ${{ matrix.cc }}
          VCPKG_TARGET_TRIPLET: ${{ matrix.triplet }}
          CI_MODE: ${{ matrix.ci_mode }}
        run: |
          if [[ "xgcc-4.8" == "x$USE_CC" ]]; then
            sudo apt-get update ;
            sudo apt-get install --no-install-recommends --no-install-suggests -y g++-4.8 ;
            bash ci/do_ci.sh gcc.legacy.test ;
          elif [[ "x$CI_MODE" == "xno-rtti" ]]; then
            bash ci/do_ci.sh gcc.no-rtti.test ;
          elif [[ "x$CI_MODE" == "xno-exceptions" ]]; then
            bash ci/do_ci.sh gcc.no-exceptions.test ;
          elif [[ "x$CI_MODE" == "xmbedtls" ]]; then
            bash ci/do_ci.sh ssl.mbedtls ;
          elif [[ "x$CI_MODE" == "xlibressl" ]]; then
            bash ci/do_ci.sh ssl.libressl ;
          elif [[ "x$CI_MODE" == "xboringssl" ]]; then
            bash ci/do_ci.sh ssl.boringssl ;
          elif [[ "x$CI_MODE" == "xopenssl-1.1.1" ]]; then
            bash ci/do_ci.sh ssl.openssl-1.1.1 ;
          else
            bash ci/do_ci.sh ssl.openssl ;
          fi
      - name: Cache packages
        uses: actions/cache@v2
        with:
          path: |
            /usr/local/share/vcpkg/installed
            third_party/install
          key: ${{ runner.os }}-${ hashFiles('.github/.cache-key') }-${{ hashFiles('/usr/local/share/vcpkg/installed/**') }}
  vs2019_build: # job id, can be any string
    name: Visual Studio 2019 Build
    strategy:
      matrix:
        include:
          - os: windows-latest
            generator: "Visual Studio 16 2019"
            build_shared_libs: "ON"
            platform: x64
          - os: windows-latest
            generator: "Visual Studio 16 2019"
            build_shared_libs: "ON"
            platform: x64
            ci_mode: no-rtti
          - os: windows-latest
            generator: "Visual Studio 16 2019"
            build_shared_libs: "ON"
            platform: x64
            ci_mode: no-exceptions
          - os: windows-latest
            generator: "Visual Studio 16 2019"
            build_shared_libs: "OFF"
            platform: x64
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build & Test
        shell: pwsh
        env:
          CMAKE_GENERATOR: ${{ matrix.generator }}
          CMAKE_PLATFORM: ${{ matrix.platform }}
          BUILD_SHARED_LIBS: ${{ matrix.build_shared_libs }}
          CONFIGURATION: RelWithDebInfo
          CI_MODE: ${{ matrix.ci_mode }}
        run: |
          if ($ENV:CI_MODE -eq "no-rtti") {
            pwsh ci/do_ci.ps1 msvc.no-rtti.test ;
          } else if($ENV:CI_MODE -eq "no-exceptions") {
            pwsh ci/do_ci.ps1 msvc.no-exceptions.test ;
          } else {
            pwsh ci/do_ci.ps1 msvc.2019.test ;
          }
      - name: Cache packages
        uses: actions/cache@v2
        with:
          path: |
            third_party/install
          key: ${{ runner.os }}-${ hashFiles('.github/.cache-key') }
  vs2017_build: # job id, can be any string
    name: Visual Studio 2017 Build<commit_msg>Fix powershell script in CI<commit_after>name: "main"

on: # @see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events
  push:
    branches: # Array of patterns that match refs/heads
      - main
  pull_request:
    branches: [ main ]

jobs:
  format:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: CI Job
        shell: bash
        run: |
          bash ci/do_ci.sh format ;
  unix_build: # job id, can be any string
    name: Unix Build
    # This job runs on Linux
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: mbedtls
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: libressl
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: boringssl
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: openssl-1.1.1
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: no-rtti
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc
            ci_mode: no-exceptions
          - os: ubuntu-latest
            triplet: x64-linux
            cc: gcc-latest
          - os: ubuntu-18.04
            triplet: x64-linux
            cc: gcc-4.8
          - os: ubuntu-latest
            triplet: x64-linux
            cc: clang-latest
          - os: macos-latest
            triplet: x64-osx
            cc: clang-latest
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build & Test
        shell: bash
        env:
          USE_CC: ${{ matrix.cc }}
          VCPKG_TARGET_TRIPLET: ${{ matrix.triplet }}
          CI_MODE: ${{ matrix.ci_mode }}
        run: |
          if [[ "xgcc-4.8" == "x$USE_CC" ]]; then
            sudo apt-get update ;
            sudo apt-get install --no-install-recommends --no-install-suggests -y g++-4.8 ;
            bash ci/do_ci.sh gcc.legacy.test ;
          elif [[ "x$CI_MODE" == "xno-rtti" ]]; then
            bash ci/do_ci.sh gcc.no-rtti.test ;
          elif [[ "x$CI_MODE" == "xno-exceptions" ]]; then
            bash ci/do_ci.sh gcc.no-exceptions.test ;
          elif [[ "x$CI_MODE" == "xmbedtls" ]]; then
            bash ci/do_ci.sh ssl.mbedtls ;
          elif [[ "x$CI_MODE" == "xlibressl" ]]; then
            bash ci/do_ci.sh ssl.libressl ;
          elif [[ "x$CI_MODE" == "xboringssl" ]]; then
            bash ci/do_ci.sh ssl.boringssl ;
          elif [[ "x$CI_MODE" == "xopenssl-1.1.1" ]]; then
            bash ci/do_ci.sh ssl.openssl-1.1.1 ;
          else
            bash ci/do_ci.sh ssl.openssl ;
          fi
      - name: Cache packages
        uses: actions/cache@v2
        with:
          path: |
            /usr/local/share/vcpkg/installed
            third_party/install
          key: ${{ runner.os }}-${ hashFiles('.github/.cache-key') }-${{ hashFiles('/usr/local/share/vcpkg/installed/**') }}
  vs2019_build: # job id, can be any string
    name: Visual Studio 2019 Build
    strategy:
      matrix:
        include:
          - os: windows-latest
            generator: "Visual Studio 16 2019"
            build_shared_libs: "ON"
            platform: x64
          - os: windows-latest
            generator: "Visual Studio 16 2019"
            build_shared_libs: "ON"
            platform: x64
            ci_mode: no-rtti
          - os: windows-latest
            generator: "Visual Studio 16 2019"
            build_shared_libs: "ON"
            platform: x64
            ci_mode: no-exceptions
          - os: windows-latest
            generator: "Visual Studio 16 2019"
            build_shared_libs: "OFF"
            platform: x64
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build & Test
        shell: pwsh
        env:
          CMAKE_GENERATOR: ${{ matrix.generator }}
          CMAKE_PLATFORM: ${{ matrix.platform }}
          BUILD_SHARED_LIBS: ${{ matrix.build_shared_libs }}
          CONFIGURATION: RelWithDebInfo
          CI_MODE: ${{ matrix.ci_mode }}
        run: |
          if ($ENV:CI_MODE -eq "no-rtti") {
            pwsh ci/do_ci.ps1 msvc.no-rtti.test ;
          } elseif($ENV:CI_MODE -eq "no-exceptions") {
            pwsh ci/do_ci.ps1 msvc.no-exceptions.test ;
          } else {
            pwsh ci/do_ci.ps1 msvc.2019.test ;
          }
      - name: Cache packages
        uses: actions/cache@v2
        with:
          path: |
            third_party/install
          key: ${{ runner.os }}-${ hashFiles('.github/.cache-key') }
  vs2017_build: # job id, can be any string
    name: Visual Studio 2017 Build
{'fraction_non_alphanumeric': 0.11224592982101325, 'fraction_numerical': 0.020426736778238447, 'mean_word_length': 1.4275895925380462, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2980446', 'n_tokens_mistral': 3394, 'n_tokens_neox': 3121, 'n_words': 718}