Skip to content

Commit

Permalink
add tag for numpy in error test, update actions versions (cython#5985)
Browse files Browse the repository at this point in the history
* add tag for numpy in error test

* fix the test for the extra line

* upgrade github actions to versions using node20

* update ccache action, add python version to wheel upload name
  • Loading branch information
mattip committed Feb 11, 2024
1 parent 51c0a0a commit 4c87330
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,17 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
fetch-depth: 1

- name: Setup python
uses: actions/setup-python@v3
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ matrix.python-version }}

- name: Compilation Cache
uses: hendrikmuhs/ccache-action@v1.2.9
uses: hendrikmuhs/ccache-action@v1.2.12
with:
variant: ${{ startsWith(runner.os, 'windows') && 'sccache' || 'ccache' }} # fake ternary
key: ${{ runner.os }}-hendrikmuhs-ccache${{ matrix.extra_hash }}-${{ matrix.python-version }}-${{ matrix.backend == 'c' || matrix.backend == 'c,cpp' }}-${{ contains(matrix.backend, 'cpp') }}-${{ hashFiles('test-requirements*.txt', '.github/**/ci.yml', 'Tools/**/ci-run.sh') }}
Expand All @@ -198,16 +198,16 @@ jobs:
run: bash ./Tools/ci-run.sh

- name: Upload HTML docs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.0
with:
name: htmldocs
path: docs/build/html
if-no-files-found: ignore

- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.0
with:
name: wheels-${{ runner.os }}${{ matrix.extra_hash }}
name: wheels-${{ runner.os }}-${{ matrix.python-version }}${{ matrix.extra_hash }}
path: dist/*.whl
if-no-files-found: ignore

Expand All @@ -222,10 +222,10 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1

- name: Setup python
uses: actions/setup-python@v3
uses: actions/setup-python@v5.0.0
with:
python-version: "3.11"

Expand All @@ -234,7 +234,7 @@ jobs:
run: bash ./Tools/ci-run.sh

- name: Upload Coverage Report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.0
with:
name: pycoverage_html
path: coverage-report-html
Expand All @@ -249,12 +249,12 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
fetch-depth: 1

- name: Setup python
uses: actions/setup-python@v3
uses: actions/setup-python@v5.0.0
with:
python-version: "3.11"

Expand All @@ -263,7 +263,7 @@ jobs:
run: bash ./Tools/ci-run.sh

- name: Upload Coverage Report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.0
with:
name: cycoverage_html
path: coverage-report-html
Expand All @@ -274,6 +274,6 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
- name: Codespell
uses: codespell-project/actions-codespell@v2
12 changes: 6 additions & 6 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:

steps:
- name: Checkout Cython
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1

- name: Set up QEMU
if: runner.os == 'Linux' && !contains(matrix.only, 'x86') && !contains(matrix.only, 'i686')
Expand All @@ -127,7 +127,7 @@ jobs:
${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b')
|| contains(github.ref_name, 'rc') || contains(github.ref_name, 'dev') }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.3.0
with:
name: ${{ matrix.only }}
path: ./wheelhouse/*.whl
Expand All @@ -144,10 +144,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Cython
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1

# Used to push the built wheels
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5.0.0
with:
# Build sdist on lowest supported Python
python-version: '3.8'
Expand All @@ -158,12 +158,12 @@ jobs:
python setup.py sdist
python setup.py bdist_wheel --no-cython-compile
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.3.0
with:
name: sdist
path: ./dist/*.tar.gz

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.3.0
with:
name: pure-wheel
path: ./dist/*.whl
Expand Down
3 changes: 2 additions & 1 deletion tests/errors/nogil_buffer_acquisition.pyx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# mode: error
#tag: numpy

cimport numpy as np

cdef void func(np.ndarray[np.double_t, ndim=1] myarray) nogil:
pass

_ERRORS = u"""
5:15: Buffer may not be acquired without the GIL. Consider using memoryview slices instead.
6:15: Buffer may not be acquired without the GIL. Consider using memoryview slices instead.
"""

0 comments on commit 4c87330

Please sign in to comment.