forked from vincentlaucsb/csv-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (82 loc) · 2.62 KB
/
Copy pathpython-wheels-dry-run.yml
File metadata and controls
97 lines (82 loc) · 2.62 KB
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
95
96
97
name: Python Package Dry Run
on:
workflow_dispatch:
inputs:
build_selector:
description: "cibuildwheel selector"
required: false
default: "cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
test_wheels:
description: "Run Python tests against each built wheel"
required: false
default: true
type: boolean
pull_request:
branches: [ "master" ]
types: [opened, synchronize, reopened, labeled]
permissions:
contents: read
jobs:
build-wheels:
name: Build wheels (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v5
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install wheel tooling
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade cibuildwheel twine
- name: Build wheels with tests
if: ${{ github.event_name == 'pull_request' || inputs.test_wheels }}
env:
CIBW_BUILD: ${{ github.event_name == 'workflow_dispatch' && inputs.build_selector || 'cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*' }}
run: python -m cibuildwheel --output-dir wheelhouse
- name: Build wheels without tests
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.test_wheels }}
env:
CIBW_BUILD: ${{ inputs.build_selector }}
CIBW_TEST_SKIP: "*"
run: python -m cibuildwheel --output-dir wheelhouse
- name: Check wheel metadata
run: python -m twine check wheelhouse/*
- name: Upload wheel artifacts
uses: actions/upload-artifact@v5
with:
name: fastpycsv-wheels-${{ matrix.os }}
path: wheelhouse/*
if-no-files-found: error
build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v5
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Build and check source distribution
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build twine
python -m build --sdist
python -m twine check dist/*
- name: Upload source artifact
uses: actions/upload-artifact@v5
with:
name: fastpycsv-sdist
path: dist/*
if-no-files-found: error