Skip to content

Commit 4430933

Browse files
Use miniconda setup for multiple versions of Python and pre-release/release NumPy for pip builds
1 parent acb18bd commit 4430933

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

.github/workflows/build_pip.yaml

+28-9
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,47 @@ env:
1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
shell: bash -el {0}
18+
1519
strategy:
1620
matrix:
1721
python: ['3.9', '3.10', '3.11', '3.12']
22+
use_pre: ["", "--pre"]
1823

1924
steps:
25+
- name: Install jq
26+
shell: bash -l {0}
27+
run: |
28+
sudo apt-get install jq
29+
2030
- uses: actions/checkout@v4
2131
with:
2232
fetch-depth: 0
2333

24-
- name: Set pkgs_dirs
25-
run: |
26-
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
27-
28-
- name: Add conda to system path
29-
run: echo $CONDA/bin >> $GITHUB_PATH
34+
- uses: conda-incubator/setup-miniconda@v3
35+
with:
36+
use-mamba: true
37+
mamba-version: "*"
38+
channels: conda-forge
39+
activate-environment: test
40+
python-version: ${{ matrix.python }}
3041

3142
- name: Install MKL
32-
run: conda install -c conda-forge mkl-devel mkl-service --override-channels
43+
run: |
44+
conda install -c conda-forge mkl-devel mkl-service --override-channels
45+
conda activate test
46+
python -c "import sys; print(sys.executable)"
47+
which python
48+
python -c "import mkl; print(mkl.__file__)"
3349
3450
- name: Build conda package
3551
run: |
52+
conda activate test
3653
pip install --no-cache-dir cython pytest hypothesis
37-
pip install --no-cache-dir numpy --pre
38-
pip install -e . --no-build-isolation
54+
pip install --no-cache-dir numpy ${{ matrix.use_pre }}
55+
echo "CONDA_PREFFIX is '${CONDA_PREFIX}'"
56+
export MKLROOT=${CONDA_PREFIX}
57+
pip install -e . --no-build-isolation --verbose --no-deps
3958
python -m pytest -v mkl_fft/tests

0 commit comments

Comments
 (0)