<commit_before>name: msys2

concurrency:
  group: msys2-${{ github.head_ref }}
  cancel-in-progress: true

on:
  push:
    paths:
      - "mesonbuild/**"
      - "test cases/**"
      - "unittests/**"
      - ".github/workflows/msys2.yml"
      - "run_unittests.py"
  pull_request:
    paths:
      - "mesonbuild/**"
      - "test cases/**"
      - "unittests/**"
      - ".github/workflows/msys2.yml"
      - "run_unittests.py"

jobs:
  test:
    runs-on: windows-2019
    name: ${{ matrix.NAME }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - NAME: gccx86ninja
            MSYSTEM: MINGW32
            MSYS2_ARCH: i686
            MSYS2_CURSES: ncurses
            COMPILER: gcc
            TOOLCHAIN: toolchain
          - NAME: gccx64ninja
            MSYSTEM: MINGW64
            MSYS2_ARCH: x86_64
            MSYS2_CURSES: pdcurses
            COMPILER: gcc
            TOOLCHAIN: toolchain
          - NAME: clangx64ninja
            MSYSTEM: MINGW64
            MSYS2_ARCH: x86_64
            MSYS2_CURSES:
            COMPILER: clang
            TOOLCHAIN: clang
    env:
      MESON_CI_JOBNAME: msys2-${{ matrix.NAME }}

    defaults:
      run:
        shell: msys2 {0}

    steps:
      - uses: actions/checkout@v2

      - uses: msys2/setup-msys2@v2
        with:
          msystem: ${{ matrix.MSYSTEM }}
          update: true
          install: >-
            base-devel
            git
            mercurial
            lcov
            mingw-w64-${{ matrix.MSYS2_ARCH }}-cmake
            mingw-w64-${{ matrix.MSYS2_ARCH }}-glib2
            mingw-w64-${{ matrix.MSYS2_ARCH }}-libxml2
            mingw-w64-${{ matrix.MSYS2_ARCH }}-ninja
            mingw-w64-${{ matrix.MSYS2_ARCH }}-pkg-config
            mingw-w64-${{ matrix.MSYS2_ARCH }}-python2
            mingw-w64-${{ matrix.MSYS2_ARCH }}-python
            mingw-w64-${{ matrix.MSYS2_ARCH }}-python-lxml
            mingw-w64-${{ matrix.MSYS2_ARCH }}-python-setuptools
            mingw-w64-${{ matrix.MSYS2_ARCH }}-python-pip
            mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.TOOLCHAIN }}

      - name: Install dependencies
        run: |
          python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage codecov

      - name: Run Tests
        run: |
          export BOOST_ROOT=
          export PATHEXT="$PATHEXT;.py"

          if [[ '${{ matrix.COMPILER }}' == 'clang' ]]; then
            export CC=clang
            export CXX=clang++
            export OBJC=clang
            export OBJCXX=clang++
          fi

          if [[ "${{ matrix.MSYS2_CURSES }}" != "" ]]; then
            pacman --noconfirm --needed -S mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.MSYS2_CURSES }}
          fi

          MSYSTEM= python3 ./tools/run_with_cov.py run_tests.py --backend=ninja

      - uses: actions/upload-artifact@v2
        with:
          name: ${{ matrix.NAME }}
          path: meson-test-run.*

      - name: Upload coverage report
        run: ./ci/upload_cov.sh "${{ matrix.NAME }}"
<commit_msg>add pypy3 to msys2 CI run<commit_after>name: msys2

concurrency:
  group: msys2-${{ github.head_ref }}
  cancel-in-progress: true

on:
  push:
    paths:
      - "mesonbuild/**"
      - "test cases/**"
      - "unittests/**"
      - ".github/workflows/msys2.yml"
      - "run_unittests.py"
  pull_request:
    paths:
      - "mesonbuild/**"
      - "test cases/**"
      - "unittests/**"
      - ".github/workflows/msys2.yml"
      - "run_unittests.py"

jobs:
  test:
    runs-on: windows-2019
    name: ${{ matrix.NAME }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - NAME: gccx86ninja
            MSYSTEM: MINGW32
            MSYS2_ARCH: i686
            MSYS2_CURSES: ncurses
            COMPILER: gcc
            TOOLCHAIN: toolchain
          - NAME: gccx64ninja
            MSYSTEM: MINGW64
            MSYS2_ARCH: x86_64
            MSYS2_CURSES: pdcurses
            COMPILER: gcc
            TOOLCHAIN: toolchain
          - NAME: clangx64ninja
            MSYSTEM: MINGW64
            MSYS2_ARCH: x86_64
            MSYS2_CURSES:
            COMPILER: clang
            TOOLCHAIN: clang
    env:
      MESON_CI_JOBNAME: msys2-${{ matrix.NAME }}

    defaults:
      run:
        shell: msys2 {0}

    steps:
      - uses: actions/checkout@v2

      - uses: msys2/setup-msys2@v2
        with:
          msystem: ${{ matrix.MSYSTEM }}
          update: true
          install: >-
            base-devel
            git
            mercurial
            lcov
            wget
            unzip
            mingw-w64-${{ matrix.MSYS2_ARCH }}-cmake
            mingw-w64-${{ matrix.MSYS2_ARCH }}-glib2
            mingw-w64-${{ matrix.MSYS2_ARCH }}-libxml2
            mingw-w64-${{ matrix.MSYS2_ARCH }}-ninja
            mingw-w64-${{ matrix.MSYS2_ARCH }}-pkg-config
            mingw-w64-${{ matrix.MSYS2_ARCH }}-python2
            mingw-w64-${{ matrix.MSYS2_ARCH }}-python
            mingw-w64-${{ matrix.MSYS2_ARCH }}-python-lxml
            mingw-w64-${{ matrix.MSYS2_ARCH }}-python-setuptools
            mingw-w64-${{ matrix.MSYS2_ARCH }}-python-pip
            mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.TOOLCHAIN }}

      - name: Install dependencies
        run: |
          python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage codecov

      - name: Install pypy3 on x86_64
        run: |
          mkdir pypy3local
          pushd pypy3local
          wget -nv https://downloads.python.org/pypy/pypy3.8-v7.3.9-win64.zip
          unzip pypy3.8-v7.3.9-win64.zip
          mv pypy3.8-v7.3.9-win64/* ./
          popd
        if: ${{ matrix.MSYS2_ARCH == 'x86_64' }}

      - name: Run Tests
        run: |
          if [[ "${{ matrix.MSYS2_ARCH }}" == "x86_64" ]]; then
            # There apparently is no clean way to add to the PATH in the 
            # previous step?
            # See for instance https://github.com/msys2/setup-msys2/issues/171
            export PATH=$PATH:$PWD/pypy3local
            # Make sure it is on the PATH
            pypy3 -c "import sys; print(sys.version)"
          fi
          export BOOST_ROOT=
          export PATHEXT="$PATHEXT;.py"

          if [[ '${{ matrix.COMPILER }}' == 'clang' ]]; then
            export CC=clang
            export CXX=clang++
            export OBJC=clang
            export OBJCXX=clang++
          fi

          if [[ "${{ matrix.MSYS2_CURSES }}" != "" ]]; then
            pacman --noconfirm --needed -S mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.MSYS2_CURSES }}
          fi

          MSYSTEM= python3 ./tools/run_with_cov.py run_tests.py --backend=ninja

      - uses: actions/upload-artifact@v2
        with:
          name: ${{ matrix.NAME }}
          path: meson-test-run.*

      - name: Upload coverage report
        run: ./ci/upload_cov.sh "${{ matrix.NAME }}"

{'fraction_non_alphanumeric': 0.12449741527857554, 'fraction_numerical': 0.03202182653647329, 'mean_word_length': 1.5710594315245479, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6582897', 'n_tokens_mistral': 2615, 'n_tokens_neox': 2381, 'n_words': 458}