NULL in hte error path #269
Workflow file for this run
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
name: tests | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
jobs: | |
c_impl: | |
name: "C impl: ${{ matrix.python-version }}, ${{ matrix.platform.name }}" | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
matrix: | |
# This list needs to be kept in sync with: | |
# - tag.yml | |
# - maturin_build_wheel.py | |
# - the rust_impl tests above | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
platform: [ | |
# This list should be kept in sync with tag.yml. | |
{ os: "ubuntu-latest", python-architecture: "x64", name: "Linux x64" }, | |
{ os: "macOS-latest", python-architecture: "x64", name: "macOS x64" }, | |
{ os: "windows-latest", python-architecture: "x86", name: "Windows x86" }, | |
{ os: "windows-latest", python-architecture: "x64", name: "Windows x64" }, | |
] | |
fail-fast: false | |
env: | |
CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.platform.python-architecture }} | |
- run: python tests/python_info.py | |
- run: pip install --upgrade setuptools | |
- name: build the C extension | |
run: python setup.py build | |
working-directory: c_impl | |
- run: git clean -dffx | |
- name: build the C extension with FORCE_INTRINSICS | |
run: python setup.py build | |
working-directory: c_impl | |
env: | |
FORCE_INTRINSICS: "1" | |
- run: git clean -dffx | |
- name: install the C extension | |
run: pip install . | |
working-directory: c_impl | |
- name: test import, __version__, __file__ | |
run: python -c "import blake3; print(blake3.__version__); print(blake3.__file__)" | |
# We use numpy to test the error case of trying to hash a strided buffer. | |
- name: Install pytest and numpy | |
run: pip install pytest numpy | |
- name: Run pytest | |
run: python -u -m pytest --verbose --capture=no |