<commit_before>name: cmake

on:
  push:
    branches:
      - '*'
    tags:
      - '*'
  pull_request:
    branches:
      - '*'

env:
  BUILD_TYPE: Release

jobs:
  cmake_linux:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: recursive
    - name: Set up dependencies
      run: |
        sudo apt-get update && \
        sudo apt-get install \
          cmake \
          ninja-build \
          libjack-jackd2-dev \
          liblo-dev \
          libgl-dev \
          libcairo2-dev \
          libdbus-1-dev \
          libx11-dev
    - name: Create Build Environment
      shell: bash
      working-directory: ${{runner.workspace}}
      run: cmake -E make_directory build
    - name: Configure CMake
      shell: bash
      working-directory: ${{runner.workspace}}/build
      run: |
        cmake "$GITHUB_WORKSPACE" -G Ninja \
          -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
    - name: Build all
      shell: bash
      working-directory: ${{runner.workspace}}/build
      run: cmake --build . --config "$BUILD_TYPE" -j 2
    - name: Display built files
      shell: bash
      working-directory: ${{runner.workspace}}/build/bin
      run: ls -lFR
    - uses: actions/upload-artifact@v2
      with:
        name: Linux artifacts
        path: ${{runner.workspace}}/build/bin/

  cmake_macos:
    runs-on: macos-11
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: recursive
    - name: Create Build Environment
      shell: bash
      working-directory: ${{runner.workspace}}
      run: cmake -E make_directory build
    - name: Configure CMake
      shell: bash
      working-directory: ${{runner.workspace}}/build
      run: |
        cmake "$GITHUB_WORKSPACE" \
          -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
    - name: Build all
      shell: bash
      working-directory: ${{runner.workspace}}/build
      run: cmake --build . --config "$BUILD_TYPE" -j 2
    - name: Display built files
      shell: bash
      working-directory: ${{runner.workspace}}/build/bin
      run: ls -lFR
    - uses: actions/upload-artifact@v2
      with:
        name: macOS artifacts
        path: ${{runner.workspace}}/build/bin/

  cmake_win32:
    runs-on: windows-2019
    steps:
    - name: Set environment
      run: |
        echo "release_arch=Win32" >> "${Env:GITHUB_ENV}"
        echo "vcpkg_triplet=x86-windows-static" >> "${Env:GITHUB_ENV}"
        echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
    - name: Restore from cache and install vcpkg
      uses: lukka/run-vcpkg@v6
      with:
        setupOnly: true
        vcpkgTriplet: ${{env.vcpkg_triplet}}
        vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
    #- name: Install packages
    #  run: |
    #    & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
    - uses: actions/checkout@v2
      with:
        submodules: recursive
    - name: Create Build Environment
      working-directory: ${{runner.workspace}}
      run: cmake -E make_directory build
    - name: Configure CMake
      working-directory: ${{runner.workspace}}/build
      run: |
       cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
    - name: Build all
      working-directory: ${{runner.workspace}}/build
      run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
    - name: Show built files
      working-directory: ${{runner.workspace}}/build/bin
      run: tree
    - uses: actions/upload-artifact@v2
      with:
        name: Win32 artifacts
        path: ${{runner.workspace}}/build/bin/

  cmake_win64:
    runs-on: windows-2019
    steps:
    - name: Set environment
      run: |
        echo "release_arch=x64" >> "${Env:GITHUB_ENV}"
        echo "vcpkg_triplet=x64-windows-static" >> "${Env:GITHUB_ENV}"
        echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
    - name: Restore from cache and install vcpkg
      uses: lukka/run-vcpkg@v6
      with:
        setupOnly: true
        vcpkgTriplet: ${{env.vcpkg_triplet}}
        vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
    #- name: Install packages
    #  run: |
    #    & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
    - uses: actions/checkout@v2
      with:
        submodules: recursive
    - name: Create Build Environment
      working-directory: ${{runner.workspace}}
      run: cmake -E make_directory build
    - name: Configure CMake
      working-directory: ${{runner.workspace}}/build
      run: |
       cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
    - name: Build all
      working-directory: ${{runner.workspace}}/build
      run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
    - name: Show built files
      working-directory: ${{runner.workspace}}/build/bin
      run: tree
    - uses: actions/upload-artifact@v2
      with:
        name: Win64 artifacts
        path: ${{runner.workspace}}/build/bin/
<commit_msg>Simplify cmake CI setup using shared action, leave old msvc stuff<commit_after>name: cmake

on:
  push:

env:
  BUILD_TYPE: Release

jobs:
  ubuntu-20-04:
    strategy:
      matrix:
        target: [linux-arm64, linux-armhf, linux-i686, linux-riscv64, linux-x86_64, win32, win64, pluginval]
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: recursive
      - uses: distrho/dpf-cmake-action@v1
        with:
          dpf_path: .
          target: ${{ matrix.target }}

  ubuntu-22-04:
    strategy:
      matrix:
        target: [linux-arm64, linux-armhf, linux-i686, linux-riscv64, linux-x86_64, win32, win64, pluginval]
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: recursive
      - uses: distrho/dpf-cmake-action@v1
        with:
          dpf_path: .
          target: ${{ matrix.target }}

  macos-11:
    strategy:
      matrix:
        target: [macos-intel, macos-universal]
    runs-on: macos-11
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: recursive
      - uses: distrho/dpf-cmake-action@v1
        with:
          dpf_path: .
          target: ${{ matrix.target }}

  macos-12:
    strategy:
      matrix:
        target: [macos-intel, macos-universal]
    runs-on: macos-12
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: recursive
      - uses: distrho/dpf-cmake-action@v1
        with:
          dpf_path: .
          target: ${{ matrix.target }}

  cmake_win32:
    runs-on: windows-2019
    steps:
    - name: Set environment
      run: |
        echo "release_arch=Win32" >> "${Env:GITHUB_ENV}"
        echo "vcpkg_triplet=x86-windows-static" >> "${Env:GITHUB_ENV}"
        echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
    - name: Restore from cache and install vcpkg
      uses: lukka/run-vcpkg@v6
      with:
        setupOnly: true
        vcpkgTriplet: ${{env.vcpkg_triplet}}
        vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
    #- name: Install packages
    #  run: |
    #    & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
    - uses: actions/checkout@v2
      with:
        submodules: recursive
    - name: Create Build Environment
      working-directory: ${{runner.workspace}}
      run: cmake -E make_directory build
    - name: Configure CMake
      working-directory: ${{runner.workspace}}/build
      run: |
       cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
    - name: Build all
      working-directory: ${{runner.workspace}}/build
      run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
    - name: Show built files
      working-directory: ${{runner.workspace}}/build/bin
      run: tree
    - uses: actions/upload-artifact@v2
      with:
        name: Win32 artifacts
        path: ${{runner.workspace}}/build/bin/

  cmake_win64:
    runs-on: windows-2019
    steps:
    - name: Set environment
      run: |
        echo "release_arch=x64" >> "${Env:GITHUB_ENV}"
        echo "vcpkg_triplet=x64-windows-static" >> "${Env:GITHUB_ENV}"
        echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
    - name: Restore from cache and install vcpkg
      uses: lukka/run-vcpkg@v6
      with:
        setupOnly: true
        vcpkgTriplet: ${{env.vcpkg_triplet}}
        vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
    #- name: Install packages
    #  run: |
    #    & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
    - uses: actions/checkout@v2
      with:
        submodules: recursive
    - name: Create Build Environment
      working-directory: ${{runner.workspace}}
      run: cmake -E make_directory build
    - name: Configure CMake
      working-directory: ${{runner.workspace}}/build
      run: |
       cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
    - name: Build all
      working-directory: ${{runner.workspace}}/build
      run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
    - name: Show built files
      working-directory: ${{runner.workspace}}/build/bin
      run: tree
    - uses: actions/upload-artifact@v2
      with:
        name: Win64 artifacts
        path: ${{runner.workspace}}/build/bin/

{'fraction_non_alphanumeric': 0.12912524850894633, 'fraction_numerical': 0.02654075546719682, 'mean_word_length': 2.510467550593161, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, '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': '4642475', 'n_tokens_mistral': 3716, 'n_tokens_neox': 3424, 'n_words': 675}