Skip to content

Commit adcfcdf

Browse files
Tests: Add tests for various build systems (#67)
- Adds tests for building a PyAwaitable extension with `meson-python` and `scikit-build-core`. - Reformats a bunch of the workflow files. - Change CI to run the test suite if only tests (but not source) was changed.
1 parent 97e1c95 commit adcfcdf

File tree

22 files changed

+520
-280
lines changed

22 files changed

+520
-280
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ name: Bug report
22
description: Submit a bug report
33
labels: ["bug"]
44
body:
5-
- type: textarea
6-
attributes:
7-
label: "Problem:"
8-
description: >
9-
Give a clear description on what's going wrong and how to reproduce it, if possible.
5+
- type: textarea
6+
attributes:
7+
label: "Problem:"
8+
description: >
9+
Give a clear description on what's going wrong and how to reproduce it, if possible.
1010
11-
This should only be for *bugs*, not crashes. For that, use the crash template.
11+
This should only be for *bugs*, not crashes. For that, use the crash template.
1212
13-
value: |
14-
```c
15-
// Add your code here, if needed
16-
```
17-
validations:
18-
required: true
19-
- type: input
20-
attributes:
21-
label: "Version:"
22-
value: |
23-
What version(s) of PyAwaitable are you using?
24-
validations:
25-
required: true
26-
- type: dropdown
27-
attributes:
28-
label: "Operating system(s) tested on:"
29-
multiple: true
30-
options:
31-
- Linux
32-
- macOS
33-
- Windows
34-
- Other
35-
validations:
36-
required: false
13+
value: |
14+
```c
15+
// Add your code here, if needed
16+
```
17+
validations:
18+
required: true
19+
- type: input
20+
attributes:
21+
label: "Version:"
22+
value: |
23+
What version(s) of PyAwaitable are you using?
24+
validations:
25+
required: true
26+
- type: dropdown
27+
attributes:
28+
label: "Operating system(s) tested on:"
29+
multiple: true
30+
options:
31+
- Linux
32+
- macOS
33+
- Windows
34+
- Other
35+
validations:
36+
required: false

.github/ISSUE_TEMPLATE/crash.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ name: Crash report
22
description: Submit a crash report
33
labels: ["crash"]
44
body:
5-
- type: textarea
6-
attributes:
7-
label: "Crash Information:"
8-
description: >
9-
Give a clear description of what happened and how to reproduce it, if possible. If you aren't sure, attempt to run the program through a debugger, such as [Valgrind](https://valgrind.org/) or enabling [faulthandler](https://docs.python.org/3/library/faulthandler.html).
5+
- type: textarea
6+
attributes:
7+
label: "Crash Information:"
8+
description: >
9+
Give a clear description of what happened and how to reproduce it, if possible. If you aren't sure, attempt to run the program through a debugger, such as [Valgrind](https://valgrind.org/) or enabling [faulthandler](https://docs.python.org/3/library/faulthandler.html).
1010
11-
This should only be for *crashes* not bugs. For that, use the bug template.
11+
This should only be for *crashes* not bugs. For that, use the bug template.
1212
13-
value: |
14-
```c
15-
// Add your code here, if needed
16-
```
17-
validations:
18-
required: true
19-
- type: input
20-
attributes:
21-
label: "Version:"
22-
value: |
23-
What version(s) of PyAwaitable are you using?
24-
validations:
25-
required: true
26-
- type: dropdown
27-
attributes:
28-
label: "Operating system(s) tested on:"
29-
multiple: true
30-
options:
31-
- Linux
32-
- macOS
33-
- Windows
34-
- Other
35-
validations:
36-
required: false
13+
value: |
14+
```c
15+
// Add your code here, if needed
16+
```
17+
validations:
18+
required: true
19+
- type: input
20+
attributes:
21+
label: "Version:"
22+
value: |
23+
What version(s) of PyAwaitable are you using?
24+
validations:
25+
required: true
26+
- type: dropdown
27+
attributes:
28+
label: "Operating system(s) tested on:"
29+
multiple: true
30+
options:
31+
- Linux
32+
- macOS
33+
- Windows
34+
- Other
35+
validations:
36+
required: false

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ name: Feature
22
description: Suggest a new feature.
33
labels: ["feature"]
44
body:
5-
- type: markdown
6-
attributes:
7-
value: |
8-
# Feature Proposal
5+
- type: markdown
6+
attributes:
7+
value: |
8+
# Feature Proposal
99
10-
This is where you should propose a *new* feature to PyAwaitable. New features should not make breaking changes. This should be for something totally new, such as adding a new function to the ABI. General improvements to existing features should be made using an improvement request.
11-
- type: textarea
12-
attributes:
13-
label: "Proposal:"
14-
description: >
15-
Outline your idea and why it would be a good idea for PyAwaitable. Make sure to include an example API for what this could look like if implemented.
16-
value: |
17-
```c
18-
// Example API
19-
```
20-
validations:
21-
required: true
10+
This is where you should propose a *new* feature to PyAwaitable. New features should not make breaking changes. This should be for something totally new, such as adding a new function to the ABI. General improvements to existing features should be made using an improvement request.
11+
- type: textarea
12+
attributes:
13+
label: "Proposal:"
14+
description: >
15+
Outline your idea and why it would be a good idea for PyAwaitable. Make sure to include an example API for what this could look like if implemented.
16+
value: |
17+
```c
18+
// Example API
19+
```
20+
validations:
21+
required: true

.github/ISSUE_TEMPLATE/improvement.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ name: Improvement
22
description: Suggest an improvement to an existing feature.
33
labels: ["improvement"]
44
body:
5-
- type: markdown
6-
attributes:
7-
value: |
8-
# Improvement
5+
- type: markdown
6+
attributes:
7+
value: |
8+
# Improvement
99
10-
An improvement proposal should be related to an *existing* feature. For example, adding some functionality to the *existing* coroutine implementation.
11-
- type: textarea
12-
attributes:
13-
label: "Description:"
14-
description: >
15-
Outline what needs to be improved and why? Be sure to include an example API if necessary.
16-
value: |
17-
```c
18-
// Example API
19-
```
20-
validations:
21-
required: true
10+
An improvement proposal should be related to an *existing* feature. For example, adding some functionality to the *existing* coroutine implementation.
11+
- type: textarea
12+
attributes:
13+
label: "Description:"
14+
description: >
15+
Outline what needs to be improved and why? Be sure to include an example API if necessary.
16+
value: |
17+
```c
18+
// Example API
19+
```
20+
validations:
21+
required: true

.github/workflows/build.yml

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
name: Build
22

33
on:
4-
push:
5-
tags:
6-
- v*
7-
branches:
8-
- master
9-
paths:
10-
- 'src/**'
11-
pull_request:
12-
branches:
13-
- master
4+
push:
5+
tags:
6+
- v*
7+
branches:
8+
- master
9+
paths:
10+
- "src/**"
11+
pull_request:
12+
branches:
13+
- master
1414

1515
concurrency:
16-
group: build-${{ github.head_ref }}
17-
cancel-in-progress: true
16+
group: build-${{ github.head_ref }}
17+
cancel-in-progress: true
1818

1919
jobs:
20-
pure-python-wheel-and-sdist:
21-
name: Build a pure Python wheel and source distribution
22-
runs-on: ubuntu-latest
23-
24-
steps:
25-
- uses: actions/checkout@v3
26-
with:
27-
fetch-depth: 0
28-
29-
- name: Install build dependencies
30-
run: python -m pip install --upgrade build
31-
32-
- name: Build
33-
run: python -m build
34-
35-
- uses: actions/upload-artifact@v4
36-
with:
37-
name: artifacts
38-
path: dist/*
39-
if-no-files-found: error
40-
41-
publish:
42-
name: Publish release
43-
needs:
44-
- pure-python-wheel-and-sdist
45-
runs-on: ubuntu-latest
46-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
47-
48-
steps:
49-
- uses: actions/download-artifact@v4
50-
with:
51-
name: artifacts
52-
path: dist
53-
54-
- name: Push build artifacts to PyPI
55-
uses: pypa/[email protected]
56-
with:
57-
skip_existing: true
58-
user: __token__
59-
password: ${{ secrets.PYPI_API_TOKEN }}
20+
pure-python-wheel-and-sdist:
21+
name: Build a pure Python wheel and source distribution
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Install build dependencies
30+
run: python -m pip install --upgrade build
31+
32+
- name: Build
33+
run: python -m build
34+
35+
- uses: actions/upload-artifact@v4
36+
with:
37+
name: artifacts
38+
path: dist/*
39+
if-no-files-found: error
40+
41+
publish:
42+
name: Publish release
43+
needs:
44+
- pure-python-wheel-and-sdist
45+
runs-on: ubuntu-latest
46+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
47+
48+
steps:
49+
- uses: actions/download-artifact@v4
50+
with:
51+
name: artifacts
52+
path: dist
53+
54+
- name: Push build artifacts to PyPI
55+
uses: pypa/[email protected]
56+
with:
57+
skip_existing: true
58+
user: __token__
59+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)