-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python tests 2: Streaming boogaloo (#12)
* bindings created * pip install . working * python -m build working (on Windows anyway) * get it building on linux * Remove test stub (save for the next PR) * Undo an overzealous rename * Add Python wheel build job * Prepare for Python bindings * Don't export the enum values into the module base namespace. * (wip) some basic tests * Revert CMake minimum version and use cmake_policy. Using builtin `BUILD_TESTING` cmake option. * Update build.yml * Update release.yml * some simple tests * add python tests to CI * (wip): first stream test (crash!) * Remove deprecated workflows * A rectification of names * whitespace * Fix double free error * Slightly improve debug output. * Add some more streaming tests. * concurrency? * Explicit nullopt * Get it working ok on Windows * remove stub * Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR * Respond to PR comments
- Loading branch information
Showing
12 changed files
with
506 additions
and
113 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 |
---|---|---|
|
@@ -4,12 +4,10 @@ on: | |
push: | ||
branches: | ||
- "main" | ||
pull_request: # TODO (aliddell): remove this | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
windows-and-linux-build: | ||
name: Build on ${{ matrix.platform }} with ${{ matrix.build_type }} configuration | ||
strategy: | ||
matrix: | ||
build_type: | ||
|
@@ -29,12 +27,11 @@ jobs: | |
permissions: | ||
actions: write | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
@@ -58,7 +55,7 @@ jobs: | |
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} | ||
cpack --config ${{github.workspace}}/build/CPackConfig.cmake -C ${{matrix.build_type}} -G ZIP | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{matrix.platform}} ${{matrix.build_type}} binaries | ||
path: ${{github.workspace}}/*.zip | ||
|
@@ -75,12 +72,11 @@ jobs: | |
permissions: | ||
actions: write | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
@@ -114,7 +110,7 @@ jobs: | |
run: | | ||
cpack --config ${{github.workspace}}/build/CPackConfig.cmake -C ${{matrix.build_type}} -G ZIP | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: macos-latest ${{matrix.build_type}} binaries | ||
path: ${{github.workspace}}/*.zip | ||
|
@@ -132,12 +128,11 @@ jobs: | |
permissions: | ||
actions: write | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
@@ -163,6 +158,7 @@ jobs: | |
run: python -m build | ||
|
||
- name: Upload wheel | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{matrix.platform}} wheel | ||
path: ${{github.workspace}}/dist/*.whl |
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ env: | |
|
||
jobs: | ||
windows-and-linux-build: | ||
name: Build on ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
platform: | ||
|
@@ -27,12 +28,11 @@ jobs: | |
permissions: | ||
actions: write | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
@@ -61,23 +61,23 @@ jobs: | |
cmake --build ${{github.workspace}}/pack --config Release | ||
cpack --config ${{github.workspace}}/pack/CPackConfig.cmake -C Release -G ZIP | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{matrix.platform}} binaries | ||
path: ${{github.workspace}}/*.zip | ||
|
||
mac-build: | ||
name: Build on macos-latest | ||
runs-on: "macos-latest" | ||
|
||
permissions: | ||
actions: write | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
@@ -115,7 +115,7 @@ jobs: | |
run: | | ||
cpack --config ${{github.workspace}}/build/CPackConfig.cmake -C Release -G ZIP | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: macos-latest binaries | ||
path: ${{github.workspace}}/*.zip | ||
|
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 |
---|---|---|
|
@@ -11,6 +11,10 @@ on: | |
env: | ||
BUILD_TYPE: Release | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
test: | ||
name: Test on ${{ matrix.platform }} | ||
|
@@ -34,11 +38,6 @@ jobs: | |
actions: write | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
@@ -78,11 +77,6 @@ jobs: | |
MINIO_SECRET_KEY: 12345678 | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
@@ -135,7 +129,7 @@ jobs: | |
run: ctest -C ${{env.BUILD_TYPE}} -L s3 --output-on-failure | ||
|
||
test_python: | ||
name: Test on ${{ matrix.platform }} | ||
name: Test Python on ${{ matrix.platform }} | ||
runs-on: ${{ matrix.platform }} | ||
timeout-minutes: 20 | ||
strategy: | ||
|
@@ -147,11 +141,6 @@ jobs: | |
- "macos-latest" | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
@@ -175,8 +164,7 @@ jobs: | |
run: python -m pip install -U pip "pybind11[global]" cmake build numpy pytest | ||
|
||
- name: Build and install Python bindings | ||
run: python -m pip install . | ||
run: python -m pip install ".[testing]" | ||
|
||
- name: Run tests | ||
run: python -m pytest -v | ||
|
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
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
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
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
import json | ||
from pathlib import Path | ||
|
||
import numpy as np | ||
import pytest | ||
|
||
import acquire_zarr | ||
|
Oops, something went wrong.