From c8f6eda6af0c4d8b77fe88ff06378571335d0ae1 Mon Sep 17 00:00:00 2001 From: Gertjan van Zwieten Date: Thu, 1 Sep 2022 10:56:42 +0200 Subject: [PATCH] update test workflow to follow version constraints --- .github/workflows/test.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0da951fbf..f9a6f1ecc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,17 +14,21 @@ jobs: build-python-package: name: Build Python package runs-on: ubuntu-20.04 + outputs: + wheel: ${{ steps.build.outputs.wheel }} steps: - name: Checkout uses: actions/checkout@v2 - name: Install build dependencies run: python3 -m pip install setuptools wheel - name: Build package + id: build run: | # To make the wheels reproducible, set the timestamp of the (files in # the) generated wheels to the date of the commit. export SOURCE_DATE_EPOCH=`git show -s --format=%ct` python3 setup.py sdist bdist_wheel + printf "::set-output name=wheel::%s" dist/*.whl - name: Upload package artifacts uses: actions/upload-artifact@v2 with: @@ -52,6 +56,7 @@ jobs: - {name: "tensorial", os: ubuntu-latest, python-version: "3.10", matrix-backend: numpy, nprocs: 1, tensorial: test} fail-fast: false env: + _wheel: ${{ needs.build-python-package.outputs.wheel }} NUTILS_MATRIX: ${{ matrix.matrix-backend }} NUTILS_NPROCS: ${{ matrix.nprocs }} NUTILS_DEBUG: all @@ -84,9 +89,9 @@ jobs: _numpy_version: ${{ matrix.numpy-version }} run: | python -um pip install --upgrade --upgrade-strategy eager wheel - python -um pip install --upgrade --upgrade-strategy eager coverage treelog stringly meshio numpy$_numpy_version + python -um pip install --upgrade --upgrade-strategy eager coverage numpy$_numpy_version # Install Nutils from `dist` dir created in job `build-python-package`. - python -um pip install --no-index --find-links ./dist nutils + python -um pip install "$_wheel[import_gmsh]" - name: Install Scipy if: ${{ matrix.matrix-backend == 'scipy' }} run: python -um pip install --upgrade --upgrade-strategy eager scipy @@ -110,6 +115,7 @@ jobs: os: [ubuntu, macos, windows] fail-fast: false env: + _wheel: ${{ needs.build-python-package.outputs.wheel }} NUTILS_MATRIX: scipy NUTILS_NPROCS: 1 NUTILS_DEBUG: all @@ -132,9 +138,9 @@ jobs: id: install run: | python -um pip install --upgrade --upgrade-strategy eager wheel - python -um pip install --upgrade --upgrade-strategy eager treelog stringly matplotlib scipy pillow numpy git+https://github.com/evalf/nutils-SI.git + python -um pip install --upgrade --upgrade-strategy eager git+https://github.com/evalf/nutils-SI.git # Install Nutils from `dist` dir created in job `build-python-package`. - python -um pip install --no-index --find-links ./dist nutils + python -um pip install "$_wheel[matrix_scipy,export_mpl]" - name: Test run: python -um unittest discover -b -q -t . -s examples test-sphinx: