<commit_before>name: main

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

on:
  push:
  pull_request:

jobs:
  build:
    if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master'}}
    strategy:
      fail-fast: false
      matrix:
        include: [
          { msystem: MINGW64, can-fail: false, runner: windows-2022 },
          { msystem: MINGW32, can-fail: false, runner: windows-2022 },
          { msystem: UCRT64, can-fail: false, runner: windows-2022 },
          { msystem: CLANG64, can-fail: true, runner: windows-2022 },
          { msystem: CLANG32, can-fail: true, runner: windows-2022 },
          # { msystem: CLANGARM64, can-fail: true, runner: ['Windows', 'ARM64'] }
        ]
    name: ${{ matrix.msystem }}
    runs-on: ${{ matrix.runner }}
    steps:
      - name: Get CPU Name
        run : |
          Get-CIMInstance -Class Win32_Processor | Select-Object -Property Name

      - uses: actions/checkout@v2
        with:
          path: temp
          fetch-depth: 0
          persist-credentials: false

      # to match the autobuild environment
      - uses: actions/setup-python@v2
        with:
          python-version: '3.8'
          architecture: 'x64'

      - uses: msys2/setup-msys2@v2
        with:
          msystem: ${{ contains(matrix.msystem, 'ARM64') && 'MSYS' || matrix.msystem }}
          install: git python base-devel pactoys
          update: true
          release: ${{ runner.arch != 'ARM64' }}
          location: 'D:\M'

      - name: Add staging repo
        shell: msys2 {0}
        run: |
          cp /etc/pacman.conf /etc/pacman.conf.bak
          grep -qF '[clang32]' /etc/pacman.conf || sed -i '1s|^|[clang32]\nInclude = /etc/pacman.d/mirrorlist.mingw\n|' /etc/pacman.conf
          grep -qF '[clangarm64]' /etc/pacman.conf || sed -i '1s|^|[clangarm64]\nInclude = /etc/pacman.d/mirrorlist.mingw\n|' /etc/pacman.conf
          sed -i '1s|^|[staging]\nServer = https://repo.msys2.org/staging/\nSigLevel = Never\n|' /etc/pacman.conf

      - name: Update using staging
        run: |
          msys2 -c 'pacman --noconfirm -Suuy'
          msys2 -c 'pacman --noconfirm -Suu'

      - name: Move Checkout
        run: |
          If (Test-Path "C:\_") { rm -r -fo "C:\_" }
          Copy-Item -Path ".\temp" -Destination "C:\_" -Recurse

      - name: CI-Build
        shell: msys2 {0}
        continue-on-error: ${{ matrix.can-fail }}
        id: build
        run: |
          cd /C/_
          if [[ "$MSYSTEM" != "${{ matrix.msystem }}" ]]; then
            MSYSTEM=${{ matrix.msystem }}
            set +e
            . shell ${MSYSTEM,,}
            set -e
          fi
          MINGW_ARCH=${{ matrix.msystem }} ./.ci/ci-build.sh

      - name: "Upload binaries"
        uses: actions/upload-artifact@v2
        continue-on-error: ${{ matrix.can-fail }}
        with:
          name: ${{ matrix.msystem }}-packages
          path: C:/_/artifacts/*.pkg.tar.*

      - name: "Clean up runner"
        if: ${{ always() }}
        continue-on-error: true
        run: |
          If (Test-Path "C:\_") { rm -r -fo "C:\_" }
          msys2 -c 'mv -f /etc/pacman.conf.bak /etc/pacman.conf'
          msys2 -c 'pacman --noconfirm -Suuy'
          msys2 -c 'pacman --noconfirm -Suu'

  check:
    needs: [build]
    runs-on: windows-2022
    steps:
      - uses: actions/checkout@v2
      - uses: actions/download-artifact@v2
        continue-on-error: true
        with:
          name: MINGW64-packages
          path: C:/_/artifacts
      - name: Check whether to Run
        id: check-run
        run: |
          python .ci/ci-check.py --whether-to-run
      - uses: msys2/setup-msys2@v2
        if: steps.check-run.outputs.run == 'true'
        with:
          msystem: MINGW64
          install: mingw-w64-x86_64-python-pip
          release: false # since we aren't building anything
      - name: Add staging repo
        if: steps.check-run.outputs.run == 'true'
        shell: msys2 {0}
        run: |
          sed -i '1s|^|[staging]\nServer = https://repo.msys2.org/staging/\nSigLevel = Never\n|' /etc/pacman.conf
      - name: Update using staging
        if: steps.check-run.outputs.run == 'true'
        run: |
          msys2 -c 'pacman --noconfirm -Suuy'
          msys2 -c 'pacman --noconfirm -Suu'
      - name: Run Checks
        if: steps.check-run.outputs.run == 'true'
        shell: msys2 {0}
        run: |
          python .ci/ci-check.py
<commit_msg>Make clang jobs in CI fatal<commit_after>name: main

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

on:
  push:
  pull_request:

jobs:
  build:
    if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master'}}
    strategy:
      fail-fast: false
      matrix:
        include: [
          { msystem: MINGW64, runner: windows-2022 },
          { msystem: MINGW32, runner: windows-2022 },
          { msystem: UCRT64, runner: windows-2022 },
          { msystem: CLANG64, runner: windows-2022 },
          { msystem: CLANG32, runner: windows-2022 },
          # { msystem: CLANGARM64, can-fail: true, runner: ['Windows', 'ARM64'] }
        ]
    name: ${{ matrix.msystem }}
    runs-on: ${{ matrix.runner }}
    steps:
      - name: Get CPU Name
        run : |
          Get-CIMInstance -Class Win32_Processor | Select-Object -Property Name

      - uses: actions/checkout@v2
        with:
          path: temp
          fetch-depth: 0
          persist-credentials: false

      # to match the autobuild environment
      - uses: actions/setup-python@v2
        with:
          python-version: '3.8'
          architecture: 'x64'

      - uses: msys2/setup-msys2@v2
        with:
          msystem: ${{ contains(matrix.msystem, 'ARM64') && 'MSYS' || matrix.msystem }}
          install: git python base-devel pactoys
          update: true
          release: ${{ runner.arch != 'ARM64' }}
          location: 'D:\M'

      - name: Add staging repo
        shell: msys2 {0}
        run: |
          cp /etc/pacman.conf /etc/pacman.conf.bak
          grep -qF '[clang32]' /etc/pacman.conf || sed -i '1s|^|[clang32]\nInclude = /etc/pacman.d/mirrorlist.mingw\n|' /etc/pacman.conf
          grep -qF '[clangarm64]' /etc/pacman.conf || sed -i '1s|^|[clangarm64]\nInclude = /etc/pacman.d/mirrorlist.mingw\n|' /etc/pacman.conf
          sed -i '1s|^|[staging]\nServer = https://repo.msys2.org/staging/\nSigLevel = Never\n|' /etc/pacman.conf

      - name: Update using staging
        run: |
          msys2 -c 'pacman --noconfirm -Suuy'
          msys2 -c 'pacman --noconfirm -Suu'

      - name: Move Checkout
        run: |
          If (Test-Path "C:\_") { rm -r -fo "C:\_" }
          Copy-Item -Path ".\temp" -Destination "C:\_" -Recurse

      - name: CI-Build
        shell: msys2 {0}
        id: build
        run: |
          cd /C/_
          if [[ "$MSYSTEM" != "${{ matrix.msystem }}" ]]; then
            MSYSTEM=${{ matrix.msystem }}
            set +e
            . shell ${MSYSTEM,,}
            set -e
          fi
          MINGW_ARCH=${{ matrix.msystem }} ./.ci/ci-build.sh

      - name: "Upload binaries"
        uses: actions/upload-artifact@v2
        with:
          name: ${{ matrix.msystem }}-packages
          path: C:/_/artifacts/*.pkg.tar.*

      - name: "Clean up runner"
        if: ${{ always() }}
        continue-on-error: true
        run: |
          If (Test-Path "C:\_") { rm -r -fo "C:\_" }
          msys2 -c 'mv -f /etc/pacman.conf.bak /etc/pacman.conf'
          msys2 -c 'pacman --noconfirm -Suuy'
          msys2 -c 'pacman --noconfirm -Suu'

  check:
    needs: [build]
    runs-on: windows-2022
    steps:
      - uses: actions/checkout@v2
      - uses: actions/download-artifact@v2
        continue-on-error: true
        with:
          name: MINGW64-packages
          path: C:/_/artifacts
      - name: Check whether to Run
        id: check-run
        run: |
          python .ci/ci-check.py --whether-to-run
      - uses: msys2/setup-msys2@v2
        if: steps.check-run.outputs.run == 'true'
        with:
          msystem: MINGW64
          install: mingw-w64-x86_64-python-pip
          release: false # since we aren't building anything
      - name: Add staging repo
        if: steps.check-run.outputs.run == 'true'
        shell: msys2 {0}
        run: |
          sed -i '1s|^|[staging]\nServer = https://repo.msys2.org/staging/\nSigLevel = Never\n|' /etc/pacman.conf
      - name: Update using staging
        if: steps.check-run.outputs.run == 'true'
        run: |
          msys2 -c 'pacman --noconfirm -Suuy'
          msys2 -c 'pacman --noconfirm -Suu'
      - name: Run Checks
        if: steps.check-run.outputs.run == 'true'
        shell: msys2 {0}
        run: |
          python .ci/ci-check.py

{'fraction_non_alphanumeric': 0.1468005018820577, 'fraction_numerical': 0.02258469259723965, 'mean_word_length': 1.710355486862442, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2852677', 'n_tokens_mistral': 3186, 'n_tokens_neox': 2994, 'n_words': 687}