File: build.yml

package info (click to toggle)
python-libcst 1.8.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,240 kB
  • sloc: python: 78,096; makefile: 15; sh: 2
file content (51 lines) | stat: -rw-r--r-- 1,538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: build
on:
  workflow_call:

jobs:
  # Build python wheels
  build:
    name: Build wheels on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        # macos-13 is an intel runner, macos-latest is apple silicon
        os:
          [
            macos-13,
            macos-latest,
            ubuntu-latest,
            ubuntu-24.04-arm,
            windows-latest,
            windows-11-arm,
          ]
    env:
      SCCACHE_VERSION: 0.2.13
      GITHUB_WORKSPACE: "${{github.workspace}}"
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          persist-credentials: false
      - uses: actions/setup-python@v6
        with:
          python-version: "3.12"
      - uses: dtolnay/rust-toolchain@stable
      - name: Set MACOSX_DEPLOYMENT_TARGET for Intel MacOS
        if: matrix.os == 'macos-13'
        run: >-
          echo MACOSX_DEPLOYMENT_TARGET=10.12 >> $GITHUB_ENV
      - name: Disable scmtools local scheme
        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
        run: >-
          echo LIBCST_NO_LOCAL_SCHEME=1 >> $GITHUB_ENV
      - name: Enable building wheels for pre-release CPython versions
        if: github.event_name != 'release'
        run: echo CIBW_ENABLE=cpython-prerelease >> $GITHUB_ENV
      - name: Build wheels
        uses: pypa/cibuildwheel@v3.2.1
      - uses: actions/upload-artifact@v4
        with:
          path: wheelhouse/*.whl
          name: wheels-${{matrix.os}}