Skip to content

Commit c41ce68

Browse files
authored
#37: Add annotations for compiler errors/warnings.
2 parents 770fad4 + 466e477 commit c41ce68

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

.github/problem-matchers/gcc.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"__comment": "Taken from CPython, with modifications.",
3+
"problemMatcher": [
4+
{
5+
"owner": "gcc-problem-matcher",
6+
"pattern": [
7+
{
8+
"regexp": "^\\s*(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*?(?:\\s+\\[(.*)\\])?)\\s*$",
9+
"file": 1,
10+
"line": 2,
11+
"column": 3,
12+
"severity": 4,
13+
"message": 5,
14+
"code": 6
15+
}
16+
]
17+
}
18+
]
19+
}

.github/problem-matchers/msvc.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"__comment": "Taken from CPython, with modifications.",
3+
"problemMatcher": [
4+
{
5+
"owner": "msvc-problem-matcher",
6+
"pattern": [
7+
{
8+
"regexp": "^\\s*(?:\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning)\\s+((\\w+\\d+)\\s*:\\s*.*?)\\s*$",
9+
"file": 1,
10+
"line": 2,
11+
"column": 3,
12+
"severity": 4,
13+
"message": 5,
14+
"code": 6
15+
}
16+
]
17+
}
18+
]
19+
}

.github/workflows/ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ jobs:
2424
name: dist
2525
path: dist
2626
whl:
27-
name: Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
27+
name: Build / ${{ matrix.os }} / Python ${{ matrix.major }}.${{ matrix.minor }}
2828
strategy:
2929
matrix:
3030
os: [macOS, Ubuntu, Windows]
31+
major: [3]
3132
minor: [6, 7, 8]
3233
runs-on: ${{ matrix.os }}-latest
3334
steps:
@@ -37,13 +38,18 @@ jobs:
3738
if: matrix.os == 'Ubuntu' && github.event_name == 'release' && github.event.action == 'published'
3839
with:
3940
platforms: all
40-
- uses: joerick/[email protected]
41+
- run: echo '::add-matcher::.github/problem-matchers/gcc.json'
42+
if: matrix.os == 'macOS' || matrix.os == 'Ubuntu'
43+
- run: echo '::add-matcher::.github/problem-matchers/msvc.json'
44+
if: matrix.os == 'Windows'
45+
- uses: joerick/[email protected]
4146
with:
4247
output-dir: dist
4348
env:
4449
CIBW_ARCHS: "${{ github.event_name == 'release' && github.event.action == 'published' && 'all' || 'auto' }}"
4550
CIBW_BEFORE_BUILD: pip install -r {project}/requirements.txt
46-
CIBW_BUILD: cp3${{ matrix.minor }}-*
51+
CIBW_BUILD: cp${{ matrix.major }}${{ matrix.minor }}-*
52+
CIBW_BUILD_VERBOSITY: 1
4753
CIBW_BEFORE_TEST: pip install -r {project}/requirements-test.txt
4854
CIBW_TEST_COMMAND: pytest {project}
4955
- uses: actions/upload-artifact@master

0 commit comments

Comments
 (0)