<commit_before>name: "Create Python distributions and upload to PyPI"

on:
  release:
    types: [ published ]
  workflow_dispatch: {}


env:
  STAN_BACKEND: "CMDSTANPY"

jobs:
  make-wheels:
    name: Make ${{ matrix.os }} wheels
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: ["macos-latest", "ubuntu-latest", "windows-latest"]
      fail-fast: false

    steps:
      - name: "Checkout repo"
        uses: actions/checkout@v3

      - name: "Restore RTools40"
        if: startsWith(runner.os, 'Windows')
        id: cache-rtools
        uses: actions/cache@v2
        with:
          path: C:/rtools40
          key: ${{ runner.os }}-${{ env.OS_VERSION }}-rtools-v1

      - name: "Build wheels"
        uses: pypa/cibuildwheel@v2.6.0
        with:
          package-dir: python
        env:
          CIBW_ENVIRONMENT: >
            STAN_BACKEND="${{ env.STAN_BACKEND }}"
          CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
          CIBW_BUILD: cp37-* cp38-* cp39-* cp310-*
          CIBW_SKIP: "*musllinux*"
          CIBW_ARCHS: native
          CIBW_BUILD_FRONTEND: build
          CIBW_TEST_REQUIRES: pytest
          CIBW_TEST_COMMAND: pytest --pyargs prophet

      - name: "Upload wheel as artifact"
        uses: actions/upload-artifact@v3
        with:
          name: artifact-${{ matrix.os }}-wheel
          path: "./**/*.whl"

  make-sdist:
    name: Make source distribution
    runs-on: ubuntu-latest
    steps:<commit_msg>Enable qemu emulation and aarch64 build for prophet (#2254)<commit_after>name: "Create Python distributions and upload to PyPI"

on:
  release:
    types: [ published ]
  workflow_dispatch: {}


env:
  STAN_BACKEND: "CMDSTANPY"

jobs:
  make-wheels:
    name: Make ${{ matrix.os }} ${{ matrix.cibw_arch }} ${{ matrix.py_version }} wheels
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: ["macos-latest", "ubuntu-latest", "windows-latest"]
        cibw_arch: ["native", "aarch64"]
        py_version: ["cp37-*", "cp38-*", "cp39-*", "cp310-*"]
        exclude:
          - os: macos-latest
            cibw_arch: "aarch64"
          - os: windows-latest
            cibw_arch: "aarch64"
      fail-fast: false

    steps:
      - name: "Checkout repo"
        uses: actions/checkout@v3

      - name: "Restore RTools40"
        if: startsWith(runner.os, 'Windows')
        id: cache-rtools
        uses: actions/cache@v2
        with:
          path: C:/rtools40
          key: ${{ runner.os }}-${{ env.OS_VERSION }}-rtools-v1

      - name: Set up QEMU
        if: matrix.cibw_arch == 'aarch64'
        uses: docker/setup-qemu-action@v2
        with:
          platforms: arm64

      - name: "Build wheels"
        uses: pypa/cibuildwheel@v2.6.0
        with:
          package-dir: python
        env:
          CIBW_ENVIRONMENT: >
            STAN_BACKEND="${{ env.STAN_BACKEND }}"
          CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
          CIBW_BUILD: ${{ matrix.py_version }}
          CIBW_SKIP: "*musllinux*"
          CIBW_ARCHS: ${{ matrix.cibw_arch }}
          CIBW_BUILD_FRONTEND: build
          CIBW_TEST_REQUIRES: pytest
          CIBW_TEST_COMMAND: pytest --pyargs prophet

      - name: "Upload wheel as artifact"
        uses: actions/upload-artifact@v3
        with:
          name: artifact-${{ matrix.os }}-${{ matrix.cibw_arch }}-wheel
          path: "./**/*.whl"

  make-sdist:
    name: Make source distribution
    runs-on: ubuntu-latest
    steps:
{'fraction_non_alphanumeric': 0.12694748990190421, 'fraction_numerical': 0.021061742642815927, 'mean_word_length': 2.0332458442694663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2944290', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1185, 'n_words': 252}