File: wheels.yaml

package info (click to toggle)
python-fastbencode 0.3.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 228 kB
  • sloc: python: 478; makefile: 12
file content (94 lines) | stat: -rw-r--r-- 2,589 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
name: Build Python distributions

"on":
  push:
  pull_request:
  schedule:
    - cron: "0 6 * * *"  # Daily 6AM UTC build

jobs:
  build-wheels:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
      fail-fast: true

    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install setuptools wheel cibuildwheel setuptools-rust
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3
        if: "matrix.os == 'ubuntu-latest'"
      - name: Build wheels
        run: python -m cibuildwheel --output-dir wheelhouse
      - name: Upload wheels
        uses: actions/upload-artifact@v5
        with:
          name: artifact-${{ matrix.os }}
          path: ./wheelhouse/*.whl

  build-sdist:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install build
      - name: Build sdist
        run: python -m build --sdist
      - name: Upload sdist
        uses: actions/upload-artifact@v5
        with:
          name: artifact-sdist
          path: ./dist/*.tar.gz

  test-sdist:
    needs:
      - build-sdist
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-python@v6
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          # Upgrade packging to avoid a bug in twine.
          # See https://github.com/pypa/twine/issues/1216
          pip install "twine>=6.1.0" "packaging>=24.2"
      - name: Download sdist
        uses: actions/download-artifact@v6
        with:
          name: artifact-sdist
          path: dist
      - name: Test sdist
        run: twine check dist/*
      - name: Test installation from sdist
        run: pip install dist/*.tar.gz

  publish:
    runs-on: ubuntu-latest
    needs:
      - build-wheels
      - build-sdist
    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
    permissions:
      id-token: write
    environment:
      name: pypi
      url: https://pypi.org/p/fastbencode
    steps:
      - name: Download distributions
        uses: actions/download-artifact@v6
        with:
          merge-multiple: true
          pattern: artifact-*
          path: dist
      - name: Publish package distributions to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1