Skip to content

Commit

Permalink
MORE
Browse files Browse the repository at this point in the history
  • Loading branch information
oconnor663 committed Feb 1, 2024
1 parent 40564de commit f8c8fef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 67 deletions.
67 changes: 0 additions & 67 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,6 @@ on:
pull_request:

jobs:
rust_impl:
name: "Rust impl: ${{ matrix.python-version }}, ${{ matrix.rust-toolchain }}, ${{ 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 c_impl tests below
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
rust-toolchain: [stable, beta, nightly]
platform: [
# This list should be kept in sync with tag.yml.
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu", name: "Linux x64" },
{ os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin", name: "macOS x64" },
{ os: "macOS-11", python-architecture: "x64", rust-target: "aarch64-apple-darwin", name: "macOS ARM" },
{ os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc", name: "Windows x86" },
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc", name: "Windows x64" },
]
exclude:
# aarch64 macOS has no support for Python version lower than 3.8
- python-version: 3.7
platform:
os: "macOS-11"
rust-target: "aarch64-apple-darwin"
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
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
target: ${{ matrix.platform.rust-target }}
default: true
profile: minimal
# 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: Build and install the blake3 module
run: pip install .
- name: Run pytest
if: ${{ matrix.platform.rust-target != 'aarch64-apple-darwin' }}
run: python -u -m pytest --verbose

c_impl:
name: "C impl: ${{ matrix.python-version }}, ${{ matrix.platform.name }}"
runs-on: ${{ matrix.platform.os }}
Expand Down Expand Up @@ -108,18 +56,3 @@ jobs:
run: pip install pytest numpy
- name: Run pytest
run: python -u -m pytest --verbose

mypy:
name: "mypy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
# We use numpy to test the error case of trying to hash a strided buffer.
- name: Install pytest, numpy, and mypy
run: pip install pytest numpy mypy
- name: Run mypy
run: python -u -m mypy --strict tests/test_blake3.py
2 changes: 2 additions & 0 deletions c_impl/blake3module.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ static PyObject *Blake3_update(Blake3Object *self, PyObject *args) {
// TODO: actually mmap
static PyObject *Blake3_update_mmap(Blake3Object *self, PyObject *args,
PyObject *kwds) {
printf("JACK 0\n");
PyBytesObject *path_bytes = NULL;
FILE *file = NULL;
PyObject *ret = NULL;
Expand All @@ -242,6 +243,7 @@ static PyObject *Blake3_update_mmap(Blake3Object *self, PyObject *args,
PyUnicode_FSConverter, &path_bytes)) {
return NULL;
}
return NULL;

printf("JACK 2\n");
PyThreadState *thread_state;
Expand Down

0 comments on commit f8c8fef

Please sign in to comment.