Skip to content
Merged
Show file tree
Hide file tree
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
50 changes: 22 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: conda-incubator/setup-miniconda@v3
- uses: prefix-dev/setup-[email protected]
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniforge-version: latest
channels: conda-forge,anaconda
cache: false
pixi-version: v0.46.0
- name: Add .pixi/envs/default to the $PATH
run: echo "$(pwd)/.pixi/envs/default/bin" >> $GITHUB_PATH
shell: bash
- name: Install dependencies
run: |
conda install scipy numpy pytest 'setuptools<=60'
run: pixi add scipy numpy pip pytest meson meson-python openblas python==${{ matrix.python-version }}
- name: Test
run: |
python legacy_setup.py install --scs --openmp
pytest
pixi r python -m pip install -v . --no-build-isolation -Csetup-args=-Duse_openmp=true
pixi r pytest
rm -rf build/

build_mkl:
Expand All @@ -53,7 +53,7 @@ jobs:
matrix:
# macos-13 runners have intel chips. macos-14 and above
# runners have Apple silicon chips.
os: [ ubuntu-latest, macos-13, windows-latest ]
os: [ ubuntu-latest ]
python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13"]
link_mkl: [true]

Expand All @@ -70,39 +70,33 @@ jobs:
shell: bash
run: |
echo "PYTHON_SUBVERSION=$(echo $PYTHON_VERSION | cut -c 3-)" >> $GITHUB_ENV
- uses: conda-incubator/setup-miniconda@v3
- uses: prefix-dev/setup-[email protected]
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniforge-version: latest
channels: conda-forge,anaconda
cache: false
pixi-version: v0.46.0
- name: Add .pixi/envs/default to the $PATH
run: echo "$(pwd)/.pixi/envs/default/bin" >> $GITHUB_PATH
shell: bash
- name: Install dependencies
run: |
if [[ "$LINK_MKL" == "true" ]]; then
BLAS_PKGS="blas-devel=*=*mkl"
else
BLAS_PKGS="blas-devel=*=*openblas"
fi
if [[ "$PYTHON_VERSION" == "3.9" ]]; then
conda install scipy=1.5 numpy=1.19 pytest $BLAS_PKGS pkg-config
elif [[ "$PYTHON_VERSION" == "3.10" ]]; then
conda install scipy=1.7 numpy=1.21 pytest $BLAS_PKGS pkg-config
elif [[ "$PYTHON_VERSION" == "3.11" ]]; then
conda install scipy=1.9.3 numpy=1.23.4 pytest $BLAS_PKGS pkg-config
elif [[ "$PYTHON_VERSION" == "3.12" || "$PYTHON_VERSION" == "3.13" ]]; then
conda install scipy numpy pytest $BLAS_PKGS pkg-config
fi
pixi add $BLAS_PKGS pip scipy numpy pytest mkl mkl-devel pkg-config meson meson-python
- name: Build
run: |
python -c "import numpy as np; print('NUMPY BLAS INFOS'); print(np.show_config())"
pixi r python -c "import numpy as np;print(np.show_config())"
if [[ "$LINK_MKL" == "true" ]]; then
python -m pip install --verbose -Csetup-args=-Dlink_mkl=true .

pixi r python -m pip install --verbose --no-build-isolation -Csetup-args=-Dlink_mkl=true .
else
python -m pip install --verbose .
pixi r python -m pip install --verbose --no-build-isolation .
fi
- name: Test
run: |
pytest
pixi r pytest
rm -rf build/

# from here to end it's a copy-paste, with few changes, of
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ out
*.jar
*.egg-info
*.ipynb_checkpoints/

# pixi environments
.pixi
*.egg-info
Loading
Loading