Debian Codegraph @

subprojects/pythoncapi-compat/.github/workflows/build.yml

raw
1 name: Build
2
3 on:
4 push:
5 branches: [main]
6 pull_request:
7 branches: [main]
8
9 jobs:
10 build:
11 runs-on: ${{ matrix.os }}
12 strategy:
13 matrix:
14 # Available OS Images:
15 # https://github.com/actions/runner-images/#available-images
16 #
17 # Allow Python pre-releases:
18 # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#allow-pre-releases
19 # See "allow-prereleases: true" below.
20 os: [ubuntu-latest]
21 python:
22 # Python versions (CPython):
23 # https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
24 - "3.8"
25 - "3.9"
26 - "3.10"
27 - "3.11"
28 - "3.12"
29 - "3.13"
30 - "3.13t"
31 # CPython 3.14 final is scheduled for October 2025:
32 # https://peps.python.org/pep-0719/
33 - "3.14"
34 - "3.14t"
35
36 # PyPy versions:
37 # - https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md
38 # - https://downloads.python.org/pypy/
39 # - Only versions listed in this JSON are supported:
40 # https://downloads.python.org/pypy/versions.json
41 - "pypy2.7"
42 - "pypy3.6"
43 - "pypy3.7"
44 - "pypy3.8"
45 - "pypy3.9"
46 - "pypy3.10"
47 - "pypy3.11"
48
49 # Old PyPy versions
50 # See https://foss.heptapod.net/pypy/pypy/-/issues/3991
51 - "pypy2.7-v7.3.2"
52 - "pypy3.6-v7.3.2"
53 - "pypy3.7-v7.3.2"
54
55 include:
56 # Windows
57 - os: windows-latest
58 python: "3.6"
59 - os: windows-latest
60 python: "3.7"
61 - os: windows-latest
62 python: "3.8"
63 - os: windows-latest
64 python: "3.9"
65 - os: windows-latest
66 python: "3.10"
67 - os: windows-latest
68 python: "3.11"
69 - os: windows-latest
70 python: "3.12"
71 - os: windows-latest
72 python: "3.13"
73 - os: windows-latest
74 python: "3.13t"
75
76 # macOS
77 # Python 3.9 is the oldest version available on macOS/arm64.
78 - os: macos-latest
79 python: "3.9"
80 - os: macos-latest
81 python: "3.10"
82 - os: macos-latest
83 python: "3.11"
84 - os: macos-latest
85 python: "3.12"
86 - os: macos-latest
87 python: "3.13"
88 - os: macos-latest
89 python: "3.13t"
90
91 # Ubuntu: test deadsnakes Python versions which are not supported by
92 # GHA python-versions.
93 - os: ubuntu-22.04
94 python: "3.7"
95
96 steps:
97 # https://github.com/actions/checkout
98 - uses: actions/checkout@v4
99 - name: Setup Python
100 # https://github.com/actions/setup-python
101 uses: actions/setup-python@v5
102 with:
103 python-version: ${{ matrix.python }}
104 allow-prereleases: true
105 - name: Install setuptools
106 run: python -m pip install setuptools
107 - name: Display the Python version
108 run: python -VV
109 - name: Run tests
110 run: python runtests.py --current --verbose
111
112 test_python27:
113 # Get Python 2.7 from Ubuntu 22.04.
114 #
115 # Python 2.7 was removed from GHA setup-python in June 2023:
116 # https://github.com/actions/setup-python/issues/672
117 name: 'Test Python 2.7'
118 runs-on: ubuntu-22.04
119 steps:
120 - uses: actions/checkout@v4
121 - name: Install Python 2.7
122 run: |
123 sudo apt-get update
124 sudo apt-get -yq install python2.7 python2.7-dev
125 - name: Display the Python version
126 run: python2.7 -VV
127 - name: Run tests
128 run: python2.7 runtests.py --current --verbose