Skip to content

Commit dd88263

Browse files
author
Aliaksandr Adziareika
committed
Investigate setup-python action
1 parent 27c6b1f commit dd88263

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Test Python Setup
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- '.github/workflows/test-python-setup.yml'
8+
push:
9+
paths:
10+
- '.github/workflows/test-python-setup.yml'
11+
12+
jobs:
13+
test-python:
14+
runs-on: ${{ matrix.runner }}
15+
name: ${{ matrix.runner }} / Python ${{ matrix.python-version }} / ${{ matrix.architecture }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
runner: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-15-intel, windows-latest]
20+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
21+
architecture: ['x64', 'x86']
22+
exclude:
23+
# ARM runners don't support x86/x64 architecture parameter
24+
- runner: ubuntu-24.04-arm
25+
architecture: x86
26+
- runner: ubuntu-24.04-arm
27+
architecture: x64
28+
# macOS doesn't need x86
29+
- runner: macos-latest
30+
architecture: x86
31+
- runner: macos-15-intel
32+
architecture: x86
33+
include:
34+
# ARM runners - test native architecture
35+
- runner: ubuntu-24.04-arm
36+
python-version: '3.8'
37+
architecture: 'arm64'
38+
- runner: ubuntu-24.04-arm
39+
python-version: '3.9'
40+
architecture: 'arm64'
41+
- runner: ubuntu-24.04-arm
42+
python-version: '3.10'
43+
architecture: 'arm64'
44+
- runner: ubuntu-24.04-arm
45+
python-version: '3.11'
46+
architecture: 'arm64'
47+
- runner: ubuntu-24.04-arm
48+
python-version: '3.12'
49+
architecture: 'arm64'
50+
- runner: ubuntu-24.04-arm
51+
python-version: '3.13'
52+
architecture: 'arm64'
53+
- runner: ubuntu-24.04-arm
54+
python-version: '3.14'
55+
architecture: 'arm64'
56+
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
61+
- name: Setup Python ${{ matrix.python-version }} (${{ matrix.architecture }})
62+
uses: actions/setup-python@v5
63+
with:
64+
python-version: ${{ matrix.python-version }}
65+
architecture: ${{ matrix.architecture }}
66+
67+
- name: Check Python
68+
shell: bash
69+
run: |
70+
echo "=== Python version ==="
71+
python --version
72+
which python
73+
74+
echo "=== Architecture ==="
75+
python -c "import struct; print(f'Pointer size: {struct.calcsize(\"P\")*8} bits')"
76+
77+
echo "=== File type ==="
78+
file $(which python) || echo "file command not available"

0 commit comments

Comments
 (0)