Skip to content

Commit 0e36e09

Browse files
committed
CI: Rework
1 parent 575137f commit 0e36e09

File tree

4 files changed

+40
-29
lines changed

4 files changed

+40
-29
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ jobs:
2828
- uses: actions/checkout@v4
2929
with:
3030
submodules: recursive
31-
- uses: conda-incubator/setup-miniconda@v3
31+
- uses: prefix-dev/setup-[email protected]
3232
with:
33-
auto-update-conda: true
34-
python-version: ${{ matrix.python-version }}
35-
miniforge-version: latest
36-
channels: conda-forge,anaconda
33+
cache: false
34+
pixi-version: v0.46.0
35+
- name: Add .pixi/envs/default to the $PATH
36+
run: echo "$(pwd)/.pixi/envs/default/bin" >> $GITHUB_PATH
37+
shell: bash
3738
- name: Install dependencies
38-
run: |
39-
conda install scipy numpy pytest meson meson-python openblas
39+
run: pixi add scipy numpy pytest meson meson-python openblas python==${{ matrix.python-version }}
4040
- name: Test
4141
run: |
42-
python -m pip install -v . --no-build-isolation -Csetup-args=-Duse_openmp=true
43-
pytest test
42+
pixi r python -m pip install -v . --no-build-isolation -Csetup-args=-Duse_openmp=true
43+
pixi r pytest test
4444
rm -rf build/
4545
4646
build_mkl:
@@ -53,7 +53,7 @@ jobs:
5353
matrix:
5454
# macos-13 runners have intel chips. macos-14 and above
5555
# runners have Apple silicon chips.
56-
os: [ ubuntu-latest, macos-13, windows-latest ]
56+
os: [ ubuntu-latest ]
5757
python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13"]
5858
link_mkl: [true]
5959

@@ -70,39 +70,33 @@ jobs:
7070
shell: bash
7171
run: |
7272
echo "PYTHON_SUBVERSION=$(echo $PYTHON_VERSION | cut -c 3-)" >> $GITHUB_ENV
73-
- uses: conda-incubator/setup-miniconda@v3
73+
- uses: prefix-dev/setup-[email protected]
7474
with:
75-
auto-update-conda: true
76-
python-version: ${{ matrix.python-version }}
77-
miniforge-version: latest
78-
channels: conda-forge,anaconda
75+
cache: false
76+
pixi-version: v0.46.0
77+
- name: Add .pixi/envs/default to the $PATH
78+
run: echo "$(pwd)/.pixi/envs/default/bin" >> $GITHUB_PATH
79+
shell: bash
7980
- name: Install dependencies
8081
run: |
8182
if [[ "$LINK_MKL" == "true" ]]; then
8283
BLAS_PKGS="blas-devel=*=*mkl"
8384
else
8485
BLAS_PKGS="blas-devel=*=*openblas"
8586
fi
86-
if [[ "$PYTHON_VERSION" == "3.9" ]]; then
87-
conda install scipy=1.5 numpy=1.19 pytest mkl mkl-devel $BLAS_PKGS pkg-config
88-
elif [[ "$PYTHON_VERSION" == "3.10" ]]; then
89-
conda install scipy=1.7 numpy=1.21 pytest mkl mkl-devel $BLAS_PKGS pkg-config
90-
elif [[ "$PYTHON_VERSION" == "3.11" ]]; then
91-
conda install scipy=1.9.3 numpy=1.23.4 pytest mkl mkl-devel $BLAS_PKGS pkg-config
92-
elif [[ "$PYTHON_VERSION" == "3.12" || "$PYTHON_VERSION" == "3.13" ]]; then
93-
conda install scipy numpy pytest mkl mkl-devel $BLAS_PKGS pkg-config
94-
fi
87+
pixi add $BLAS_PKGS scipy numpy pytest mkl mkl-devel pkg-config meson meson-python
9588
- name: Build
9689
run: |
97-
python -c "import numpy as np; print('NUMPY BLAS INFOS'); print(np.show_config())"
90+
pixi r python -c "import numpy as np;print(np.show_config())"
9891
if [[ "$LINK_MKL" == "true" ]]; then
99-
python -m pip install --verbose -Csetup-args=-Dlink_mkl=true .
92+
93+
pixi r python -m pip install --verbose --no-build-isolation -Csetup-args=-Dlink_mkl=true .
10094
else
101-
python -m pip install --verbose .
95+
pixi r python -m pip install --verbose --no-build-isolation .
10296
fi
10397
- name: Test
10498
run: |
105-
pytest
99+
pixi r pytest test
106100
rm -rf build/
107101
108102
# from here to end it's a copy-paste, with few changes, of

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ out
4848
*.jar
4949
*.egg-info
5050
*.ipynb_checkpoints/
51+
52+
# pixi environments
53+
.pixi
54+
*.egg-info

meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ if get_option('link_mkl')
2626
blas_deps = [cc.find_library('mkl_rt', required : false)]
2727
if not blas_deps[0].found()
2828
blas_deps = [dependency('mkl-sdl', required : false)]
29-
else
29+
endif
30+
if not blas_deps[0].found()
3031
blas_deps = [ dependency('mkl-dynamic-ilp64-iomp', required: false) ]
3132
endif
3233
else

pixi.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[workspace]
2+
channels = ["conda-forge"]
3+
name = "scs-python"
4+
platforms = ["linux-64"]
5+
version = "0.1.0"
6+
7+
[tasks]
8+
9+
[dependencies]
10+
pkg-config = ">=0.29.2,<0.30"
11+
meson = ">=1.8.1,<2"
12+
meson-python = ">=0.18.0,<0.19"

0 commit comments

Comments
 (0)