<commit_before>name: Windows Builds

on: 
  push:
  pull_request:

jobs:
  build:
    name: ${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }}
    runs-on: ${{ matrix.os }}
    strategy:
      # If any of the configurations fail, others will proceed to run
      fail-fast: false
      matrix:
        os: [windows-latest,]
        build_type: ["Release"]
        architecture: ["x64",]
        python_version: [2.7]
        generator: ["Visual Studio 16 2019",]
        include:
        - os: windows-latest
          architecture: "x64"
          vcpkg_triplet: "x64-windows-static"
          # For x64, this variable probably doesnt make sense but
          # for x86, the command line argument to pass to cmake is -A Win32 and not -A x86
          msbuild_platform: "x64"

    steps:
      # Check out with submodule (vcpkg is a submodule)
      - uses: actions/checkout@v2
        with:
          submodules: true

      - name: Set env variables for subsequent steps (all)
        run: |
          echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_${{ matrix.vcpkg_triplet }}_response_file.txt"
          echo "::set-env name=PIP_REQUIREMENTS_FILE::external/pip_requirements.txt"

      - name: Install Ninja
        if: startsWith(matrix.generator, 'Ninja') && startsWith(matrix.os, 'windows')
        run: |
          choco install ninja

      - name: Cache vcpkg C++ dependencies
        id: cache_vcpkg
        uses: actions/cache@v2
        with:
          path: external/vcpkg/installed
          key: dev-vcpkg-${{ matrix.vcpkg_triplet }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}

      - name: Install vcpkg packages (windows)
        if: startsWith(matrix.os, 'windows')
        run: |
          ${{ github.workspace }}/external/vcpkg/bootstrap-vcpkg.bat -disableMetrics
          ${{ github.workspace }}/external/vcpkg/vcpkg install @${{env.VCPKG_RESPONSE_FILE}}

      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python_version }}
          architecture: ${{ matrix.architecture }}

      - name: Install pip packages
        run: |
          python -m pip install --upgrade pip
          pip install -r ${{ env.PIP_REQUIREMENTS_FILE }}

      - name: Configure
        shell: bash
        run: |
          mkdir build
          cmake \
            -S . \
            -B build \
            -G "${{ matrix.generator }}" \
            -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
            -DCMAKE_TOOLCHAIN_FILE=external/vcpkg/scripts/buildsystems/vcpkg.cmake \
            -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }} \

      - name: Build
        shell: bash
        run: cmake --build build --config ${{ matrix.build_type }} -j 8

      - name: Print built libraries
        shell: bash
        run: |
          find build -name "*.lib"
          find build -name "*.dll"
          find build -name "*.dylib"
          find build -name "*.a"
          find build -name "*.so"
<commit_msg>do not install vcpkg deps on cache hit<commit_after>name: Windows Builds

on: 
  push:
  pull_request:

jobs:
  build:
    name: ${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}-${{ matrix.generator }}
    runs-on: ${{ matrix.os }}
    strategy:
      # If any of the configurations fail, others will proceed to run
      fail-fast: false
      matrix:
        os: [windows-latest,]
        build_type: ["Release"]
        architecture: ["x64",]
        python_version: [2.7]
        generator: ["Visual Studio 16 2019",]
        include:
        - os: windows-latest
          architecture: "x64"
          vcpkg_triplet: "x64-windows-static"
          # For x64, this variable probably doesnt make sense but
          # for x86, the command line argument to pass to cmake is -A Win32 and not -A x86
          msbuild_platform: "x64"

    steps:
      # Check out with submodule (vcpkg is a submodule)
      - uses: actions/checkout@v2
        with:
          submodules: true

      - name: Set env variables for subsequent steps (all)
        run: |
          echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_${{ matrix.vcpkg_triplet }}_response_file.txt"
          echo "::set-env name=PIP_REQUIREMENTS_FILE::external/pip_requirements.txt"

      - name: Install Ninja
        if: startsWith(matrix.generator, 'Ninja') && startsWith(matrix.os, 'windows')
        run: |
          choco install ninja

      - name: Cache vcpkg C++ dependencies
        id: cache_vcpkg
        uses: actions/cache@v2
        with:
          path: external/vcpkg/installed
          key: <KEY>-${{ matrix.vcpkg_triplet }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}

      - name: Install vcpkg packages (windows)
        if: steps.cache_vcpkg.outputs.cache-hit!='true' && startsWith(matrix.os, 'windows')
        run: |
          ${{ github.workspace }}/external/vcpkg/bootstrap-vcpkg.bat -disableMetrics
          ${{ github.workspace }}/external/vcpkg/vcpkg install @${{env.VCPKG_RESPONSE_FILE}}

      - name: Setup python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python_version }}
          architecture: ${{ matrix.architecture }}

      - name: Install pip packages
        run: |
          python -m pip install --upgrade pip
          pip install -r ${{ env.PIP_REQUIREMENTS_FILE }}

      - name: Configure
        shell: bash
        run: |
          mkdir build
          cmake \
            -S . \
            -B build \
            -G "${{ matrix.generator }}" \
            -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
            -DCMAKE_TOOLCHAIN_FILE=external/vcpkg/scripts/buildsystems/vcpkg.cmake \
            -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }} \

      - name: Build
        shell: bash
        run: cmake --build build --config ${{ matrix.build_type }} -j 8

      - name: Print built libraries
        shell: bash
        run: |
          find build -name "*.lib"
          find build -name "*.dll"
          find build -name "*.dylib"
          find build -name "*.a"
          find build -name "*.so"

{'fraction_non_alphanumeric': 0.12397346809854706, 'fraction_numerical': 0.00915982312065698, 'mean_word_length': 2.028694404591105, 'pattern_counts': {'":': 4, '<': 4, '<?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': '1657456', 'n_tokens_mistral': 2055, 'n_tokens_neox': 1938, 'n_words': 484}