Skip to content

Commit

Permalink
ci: perform installs in single pass
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Oct 28, 2023
1 parent 3f623ee commit 414f69a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 49 deletions.
78 changes: 31 additions & 47 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,19 @@ jobs:
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: Install awkward, awkward-cpp, and dependencies
run: >-
python -m pip install --only-binary "numpy,pandas,pyarrow,numexpr,numexpr"
-v . @(get-childitem -path awkward-cpp/dist/*.whl)
pytest-github-actions-annotate-failures
-r requirements-test.txt
- 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
Expand Down Expand Up @@ -156,21 +154,20 @@ jobs:
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: Install awkward, awkward-cpp, dask-awkward, and dependencies
run: >-
python -m pip install --only-binary "numpy,pandas,pyarrow,numexpr"
-v . ./awkward-cpp/dist/*.whl
pytest-github-actions-annotate-failures
dask-awkward
-r requirements-test.txt
- 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
Expand All @@ -190,24 +187,17 @@ jobs:
strategy:
matrix:
python-version:
# This case is covered by our "include" test for 3.12
- '3.12'
- '3.11'
- '3.10'
- '3.9'
- '3.8'
numpy-package:
- "numpy"
pyarrow-package:
- "pyarrow"
extra-pip-constraints:
- "-r requirements-test.txt"
include:
- python-version: '3.8'
numpy-package: "numpy==1.18.0"
pyarrow-package: "pyarrow"
- python-version: '3.8'
numpy-package: "numpy"
pyarrow-package: "pyarrow==7.0.0"
- python-version: '3.12'
numpy-package: "numpy>=1.26.0b1"
pyarrow-package: "pyarrow;python_version<'3.12'"
extra-pip-constraints: "-r requirements-test-minimal.txt"

runs-on: ubuntu-22.04

Expand Down Expand Up @@ -246,21 +236,19 @@ jobs:
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 }}" "${{ matrix.pyarrow-package }}"

- name: Build & install awkward
run: python -m pip install -v .
- name: Install awkward, awkward-cpp, and dependencies
run: >-
python -m pip install --only-binary "numpy,pandas,pyarrow,numexpr"
-v . ./awkward-cpp/dist/*.whl
pytest-github-actions-annotate-failures
${{ matrix.extra-pip-constraints }}
- 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
Expand Down Expand Up @@ -332,20 +320,16 @@ jobs:
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: Also install dask-awkward
run: python3 -m pip install dask-awkward
- name: Install awkward, awkward-cpp, dask-awkward, and dependencies
run: >-
python -m pip install --only-binary "numpy,pandas,pyarrow,numexpr"
-v . ./awkward-cpp/dist/*.whl
pytest-github-actions-annotate-failures
dask-awkward
-r requirements-test.txt
- 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
5 changes: 5 additions & 0 deletions requirements-test-minimal.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
numpy==1.18.0
pyarrow==7.0.0
pytest>=6
pytest-cov
pytest-xdist
4 changes: 2 additions & 2 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
fsspec;sys_platform != "win32"
jax[cpu]>=0.2.15;sys_platform != "win32" and python_version < "3.12"
numba>=0.50.0,!=0.58.0rc1;python_version < "3.12"
numexpr; python_version < "3.12"
numexpr>=2.7; python_version < "3.12"
pandas>=0.24.0;sys_platform != "win32" and python_version < "3.12"
pyarrow>=7.0.0;sys_platform != "win32" and python_version < "3.12"
pytest>=6
pytest-cov
pytest-xdist
uproot
uproot>=5

0 comments on commit 414f69a

Please sign in to comment.