-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,29 +7,54 @@ permissions: | |
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
if: matrix.version != 3.13 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "${{ matrix.version }}" | ||
allow-prereleases: true | ||
|
||
- name: Setup Python via Miniconda | ||
if: matrix.version == 3.13 | ||
uses: conda-incubator/[email protected] | ||
with: | ||
python-version: 3.13 | ||
channels: defaults,ad-testing/label/py313_nogil | ||
|
||
- name: Check Python version | ||
run: | | ||
python -VV | ||
python -c "import sys; print(sys._is_gil_enabled())" | ||
- name: Check Python GIL enabled | ||
if: matrix.version == 3.13 | ||
run: python -c "import sys; print(sys._is_gil_enabled())" | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install setuptools | ||
- name: Build and run tests | ||
- name: Build C extension | ||
run: | | ||
python python_c_extension/setup.py build | ||
cp -r build/*/* python_c_extension | ||
python -m unittest discover tests/ -vvv | ||
- name: Run script in single and multi-thread mode | ||
run: | | ||
python python_c_extension/c_extension_gil.py | ||
env: | ||
PYTHON_GIL: 0 | ||
|
||
- name: Run Tests | ||
run: python -m unittest discover tests/ -vvv | ||
env: | ||
PYTHON_GIL: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters