feat: use pyarrow for string functions #1201
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: | |
pull_request: | |
paths-ignore: | |
- README.md | |
- CONTRIBUTING.md | |
- CITATION.cff | |
- LICENSE | |
- .readthedocs.yml | |
- docs-img/** | |
- docs/** | |
- awkward-cpp/docs/** | |
- studies/** | |
schedule: | |
- cron: 0 12 1 * * | |
workflow_dispatch: | |
concurrency: | |
group: 'test-${{ github.head_ref || github.run_id }}' | |
cancel-in-progress: true | |
env: | |
# Leverage reproducible builds by setting a constant SOURCE_DATE_EPOCH | |
# This will ensure that the hash of the awkward-cpp directory remains | |
# constant for unchanged files, meaning that it can be used for caching | |
SOURCE_DATE_EPOCH: "1668811211" | |
jobs: | |
Windows: | |
strategy: | |
matrix: | |
python-version: | |
- '3.11' | |
- '3.10' | |
- '3.9' | |
- '3.8' | |
python-architecture: | |
- x64 | |
include: | |
- python-version: '3.9' | |
python-architecture: x86 | |
runs-on: windows-2019 | |
env: | |
PIP_ONLY_BINARY: cmake | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: 'Python ${{ matrix.python-version }}' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '${{ matrix.python-version }}' | |
architecture: '${{ matrix.python-architecture }}' | |
- name: Generate build files | |
run: pipx run nox -s prepare -- --headers --signatures --tests | |
- name: Cache awkward-cpp wheel | |
id: cache-awkward-cpp-wheel | |
uses: actions/cache@v3 | |
with: | |
path: awkward-cpp/dist | |
key: ${{ github.job }}-${{ matrix.python-version }}-${{ matrix.python-architecture }}-${{ hashFiles('awkward-cpp/**') }} | |
- name: Build awkward-cpp wheel | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: | | |
python -m pip install build | |
python -m build -w awkward-cpp | |
- name: Install awkward-cpp | |
run: python -m pip install -v @(get-childitem -path awkward-cpp/dist/*.whl) | |
- name: Build & install awkward | |
run: python -m pip install -v . | |
- name: Print versions | |
run: python -m pip list | |
- name: Check if kernel specification is sorted | |
run: pipx run nox -s diagnostics -- --check-spec-sorted | |
- name: Install test requirements | |
run: python -m pip install -v -r requirements-test.txt pytest-github-actions-annotate-failures | |
- name: Test specification | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: python -m pytest -vv -rs awkward-cpp/tests-spec | |
- name: Test specification with explicitly defined values | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: python -m pytest -vv -rs awkward-cpp/tests-spec-explicit | |
- name: Test CPU kernels | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: python -m pytest -vv -rs awkward-cpp/tests-cpu-kernels | |
- name: Test | |
run: python -m pytest -vv -rs tests | |
MacOS: | |
strategy: | |
matrix: | |
python-version: | |
- '3.11' | |
- '3.10' | |
- '3.9' | |
- '3.8' | |
runs-on: macOS-11 | |
env: | |
PIP_ONLY_BINARY: cmake | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: 'Python ${{ matrix.python-version }}' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '${{ matrix.python-version }}' | |
- name: Generate build files | |
run: pipx run nox -s prepare -- --headers --signatures --tests | |
- name: Cache awkward-cpp wheel | |
id: cache-awkward-cpp-wheel | |
uses: actions/cache@v3 | |
with: | |
path: ./awkward-cpp/dist | |
key: ${{ github.job }}-${{ matrix.python-version }}-${{ hashFiles('awkward-cpp/**') }} | |
- name: Build awkward-cpp wheel | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: | | |
python -m pip install build | |
python -m build -w ./awkward-cpp | |
- name: Install awkward-cpp | |
run: python -m pip install -v ./awkward-cpp/dist/*.whl | |
- name: Build & install awkward | |
run: python -m pip install -v . | |
- name: Print versions | |
run: python -m pip list | |
- name: Check if kernel specification is sorted | |
run: pipx run nox -s diagnostics -- --check-spec-sorted | |
- name: Install test requirements | |
run: python -m pip install -v -r requirements-test.txt pytest-github-actions-annotate-failures | |
- name: Test specification | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: python -m pytest -vv -rs awkward-cpp/tests-spec | |
- name: Test specification with explicitly defined values | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: python -m pytest -vv -rs awkward-cpp/tests-spec-explicit | |
- name: Test CPU kernels | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: python -m pytest -vv -rs awkward-cpp/tests-cpu-kernels | |
- name: Test | |
run: python -m pytest -vv -rs tests | |
Linux: | |
strategy: | |
matrix: | |
python-version: | |
- '3.11' | |
- '3.10' | |
- '3.9' | |
- '3.8' | |
numpy-package: | |
- "numpy" | |
include: | |
- python-version: '3.8' | |
numpy-package: "numpy==1.18.0" | |
runs-on: ubuntu-20.04 | |
env: | |
PIP_ONLY_BINARY: cmake | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: 'Python ${{ matrix.python-version }}' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '${{ matrix.python-version }}' | |
- name: Generate build files | |
run: pipx run nox -s prepare -- --headers --signatures --tests | |
- name: Cache awkward-cpp wheel | |
id: cache-awkward-cpp-wheel | |
uses: actions/cache@v3 | |
with: | |
path: ./awkward-cpp/dist | |
key: ${{ github.job }}-${{ matrix.python-version }}-${{ hashFiles('awkward-cpp/**') }} | |
- name: Build awkward-cpp wheel | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: | | |
python -m pip install build | |
python -m build -w ./awkward-cpp | |
- name: Install awkward-cpp | |
run: python -m pip install -v ./awkward-cpp/dist/*.whl "${{ matrix.numpy-package }}" | |
- name: Build & install awkward | |
run: python -m pip install -v . | |
- name: Print versions | |
run: python -m pip list | |
- name: Check if kernel specification is sorted | |
run: pipx run nox -s diagnostics -- --check-spec-sorted | |
- name: Install test requirements | |
run: python -m pip install -v -r requirements-test.txt pytest-github-actions-annotate-failures | |
- name: Test specification | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: python -m pytest -vv -rs awkward-cpp/tests-spec | |
- name: Test specification with explicitly defined values | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: python -m pytest -vv -rs awkward-cpp/tests-spec-explicit | |
- name: Test CPU kernels | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: python -m pytest -vv -rs awkward-cpp/tests-cpu-kernels | |
- name: Test | |
run: >- | |
python -m pytest -vv -rs tests --cov=awkward --cov-report=term | |
--cov-report=xml | |
- name: Upload Codecov results | |
uses: codecov/codecov-action@v3 | |
if: matrix.python-version == '3.9' | |
Linux-ROOT: | |
strategy: | |
matrix: | |
python-version: | |
- '3.8' | |
runs-on: ubuntu-20.04 | |
env: | |
PIP_ONLY_BINARY: cmake | |
timeout-minutes: 30 | |
# Required for miniconda to activate conda | |
defaults: | |
run: | |
shell: "bash -l {0}" | |
steps: | |
- uses: "actions/checkout@v3" | |
with: | |
submodules: true | |
- name: Setup Python via Conda | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
# Cache invalidates daily by default | |
cache-environment: true | |
environment-name: awkward | |
create-args: >- | |
python=${{ env.PYTHON_VERSION }} | |
numpy | |
root | |
- name: Generate build files | |
run: pipx run nox -s prepare -- --headers --signatures --tests | |
- name: Cache awkward-cpp wheel | |
id: cache-awkward-cpp-wheel | |
uses: actions/cache@v3 | |
with: | |
path: ./awkward-cpp/dist | |
key: ${{ github.job }}-${{ matrix.python-version }}-${{ hashFiles('awkward-cpp/**') }} | |
- name: Build awkward-cpp wheel | |
if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true' | |
run: | | |
python3 -m pip install build | |
python3 -m build -w ./awkward-cpp | |
- name: Install awkward-cpp | |
run: python3 -m pip install -v ./awkward-cpp/dist/*.whl | |
- name: Build & install awkward | |
run: python3 -m pip install -v . | |
- name: Print versions | |
run: python -m pip list | |
- name: Install test requirements | |
run: python -m pip install -v -r requirements-test.txt pytest-github-actions-annotate-failures | |
- name: Test | |
run: python -m pytest -vv -rs tests |