Skip to content

Update conda-package workflow #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ permissions: read-all

env:
PACKAGE_NAME: mkl_umath
MODULE_NAME: mkl_umath
VER_SCRIPT1: "import json; f = open('ver.json', 'r'); j = json.load(f); f.close(); d = j['mkl_umath'][0];"
VER_SCRIPT2: "print('='.join((d[s] for s in ('version', 'build'))))"

Expand All @@ -15,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.10', '3.11', '3.12']
python: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/[email protected]
with:
Expand Down Expand Up @@ -68,7 +67,7 @@ jobs:

strategy:
matrix:
python: ['3.10', '3.11', '3.12']
python: ["3.9", "3.10", "3.11", "3.12"]
experimental: [false]
runner: [ubuntu-latest]
continue-on-error: ${{ matrix.experimental }}
Expand Down Expand Up @@ -122,18 +121,24 @@ jobs:
# Test installed packages
conda list -n test_mkl_umath

- name: Run tests
- name: Smoke test
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate test_mkl_umath
python -c "import mkl_umath, numpy as np; mkl_umath.use_in_numpy(); np.sin(np.linspace(0, 1, num=10**6));"

- name: Run tests
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate test_mkl_umath
pytest -v --pyargs ${{ env.PACKAGE_NAME }}

build_windows:
runs-on: windows-2019

strategy:
matrix:
python: ['3.10', '3.11', '3.12']
python: ["3.9", "3.10", "3.11", "3.12"]
env:
conda-bld: C:\Miniconda\conda-bld\win-64\
steps:
Expand All @@ -147,7 +152,7 @@ jobs:
miniforge-version: latest
activate-environment: build
channels: conda-forge
conda-remove-defaults: true
conda-remove-defaults: "true"
python-version: ${{ matrix.python }}

- name: Cache conda packages
Expand Down Expand Up @@ -192,7 +197,7 @@ jobs:
shell: cmd /C CALL {0}
strategy:
matrix:
python: ['3.10', '3.11', '3.12']
python: ["3.9", "3.10", "3.11", "3.12"]
experimental: [false]
runner: [windows-2019]
continue-on-error: ${{ matrix.experimental }}
Expand All @@ -212,7 +217,7 @@ jobs:
miniforge-version: latest
activate-environment: mkl_umath_test
channels: conda-forge
conda-remove-defaults: true
conda-remove-defaults: "true"
python-version: ${{ matrix.python }}

- name: Install conda-index
Expand Down Expand Up @@ -306,7 +311,12 @@ jobs:
echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX%
conda info && conda list -n mkl_umath_test

- name: Run tests
- name: Smoke test
shell: cmd /C CALL {0}
run: >-
conda activate mkl_umath_test && python -c "import mkl_umath, numpy as np; mkl_umath.use_in_numpy(); np.sin(np.linspace(0, 1, num=10**6));"
conda activate mkl_umath_test && python -c "import mkl_umath, numpy as np; mkl_umath.use_in_numpy(); np.sin(np.linspace(0, 1, num=10**6));"

- name: Run tests
shell: cmd /C CALL {0}
run: |
conda activate mkl_umath_test && python -m pytest -v -s --pyargs ${{ env.PACKAGE_NAME }}
Loading