Skip to content

Commit 4ac5288

Browse files
Different strategy: get rid of Conda altogther
Conda was used to get GCC or Clang for compiling the C extensions. GitHub Actions runners come with C/C++ compilers pre-installed.
1 parent dc6cd1a commit 4ac5288

1 file changed

Lines changed: 18 additions & 77 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 18 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -27,56 +27,27 @@ jobs:
2727
submodules: recursive
2828
fetch-depth: 0 # required for version resolution
2929

30-
- name: Set up Conda
31-
uses: conda-incubator/setup-miniconda@v3.2.0
30+
- name: Set up Python
31+
uses: actions/setup-python@v6
3232
with:
33-
channels: conda-forge
34-
miniforge-version: latest
3533
python-version: ${{ matrix.python-version }}
36-
activate-environment: test
37-
auto-activate-base: false
38-
39-
- name: Install build dependencies and compilers
40-
run: |
41-
conda install -y python numpy cython meson meson-python ninja c-compiler cxx-compiler
42-
43-
- name: Install clang
44-
if: matrix.platform == 'macos-15-large'
45-
run: conda install -y 'clang>=12.0.1,<17'
46-
47-
- name: Show conda environment info
48-
run: |
49-
conda info
50-
conda config --show-sources
51-
conda list --show-channel-urls
52-
53-
- name: Meson args - prefer Conda over system Python (Ubuntu)
54-
if: startsWith(matrix.platform, 'ubuntu')
55-
run: |
56-
echo "MESONPY_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV
57-
PY_INC="$(python -c 'import sysconfig; print(sysconfig.get_path("include"))')"
58-
echo "CFLAGS=-I${PY_INC} -I${CONDA_PREFIX}/include ${CFLAGS:-}" >> $GITHUB_ENV
59-
echo "CPPFLAGS=-I${PY_INC} -I${CONDA_PREFIX}/include ${CPPFLAGS:-}" >> $GITHUB_ENV
60-
echo "LDFLAGS=-L${CONDA_PREFIX}/lib ${LDFLAGS:-}" >> $GITHUB_ENV
34+
cache: 'pip'
6135

6236
- name: Install numcodecs
6337
run: |
6438
# TODO: Remove this conditional when pcodec supports Python 3.14
6539
if [[ "${{ matrix.python-version }}" == "3.14" ]]; then
66-
python -m pip install -v \
67-
".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]" \
68-
pytest
40+
python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]"
6941
else
70-
python -m pip install -v \
71-
".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]" \
72-
pytest
42+
python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]"
7343
fi
7444
7545
- name: List installed packages
7646
run: python -m pip list
7747

7848
- name: Run tests
79-
run: python -m pytest -v
49+
shell: "bash -l {0}"
50+
run: pytest -v
8051

8152
- uses: codecov/codecov-action@v5
8253
with:
@@ -108,26 +79,11 @@ jobs:
10879
submodules: recursive
10980
fetch-depth: 0
11081

111-
- name: Set up Conda
112-
uses: conda-incubator/setup-miniconda@v3.2.0
82+
- name: Set up Python
83+
uses: actions/setup-python@v6
11384
with:
114-
channels: conda-forge
115-
miniforge-version: latest
116-
python-version: "3.13"
117-
activate-environment: test
118-
auto-activate-base: false
119-
120-
- name: Install build dependencies and compilers
121-
run: |
122-
conda install -y python numpy cython meson meson-python ninja c-compiler cxx-compiler
123-
124-
- name: Meson args - prefer Conda over system Python (Ubuntu)
125-
run: |
126-
echo "MESONPY_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV
127-
PY_INC="$(python -c 'import sysconfig; print(sysconfig.get_path("include"))')"
128-
echo "CFLAGS=-I${PY_INC} -I${CONDA_PREFIX}/include ${CFLAGS:-}" >> $GITHUB_ENV
129-
echo "CPPFLAGS=-I${PY_INC} -I${CONDA_PREFIX}/include ${CPPFLAGS:-}" >> $GITHUB_ENV
130-
echo "LDFLAGS=-L${CONDA_PREFIX}/lib ${LDFLAGS:-}" >> $GITHUB_ENV
85+
python-version: ${{ matrix.python-version }}
86+
cache: 'pip'
13187

13288
- name: Install numcodecs
13389
run: |
@@ -141,7 +97,7 @@ jobs:
14197
run: python -m pip list
14298

14399
- name: Run checksum tests
144-
run: python -m pytest -v tests/test_checksum32.py
100+
run: pytest -v tests/test_checksum32.py
145101

146102
- uses: codecov/codecov-action@v5
147103
with:
@@ -173,35 +129,20 @@ jobs:
173129
submodules: recursive
174130
fetch-depth: 0 # required for version resolution
175131

176-
- name: Set up Conda
177-
uses: conda-incubator/setup-miniconda@v3.2.0
132+
- name: Set up Python
133+
uses: actions/setup-python@v6
178134
with:
179-
channels: conda-forge
180-
miniforge-version: latest
181-
python-version: "3.13"
182-
activate-environment: test
183-
auto-activate-base: false
184-
185-
- name: Install build dependencies and compilers
186-
run: |
187-
conda install -y python numpy cython meson meson-python ninja c-compiler cxx-compiler
188-
189-
- name: Meson args - prefer Conda over system Python (Ubuntu)
190-
run: |
191-
echo "MESONPY_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV
192-
PY_INC="$(python -c 'import sysconfig; print(sysconfig.get_path("include"))')"
193-
echo "CFLAGS=-I${PY_INC} -I${CONDA_PREFIX}/include ${CFLAGS:-}" >> $GITHUB_ENV
194-
echo "CPPFLAGS=-I${PY_INC} -I${CONDA_PREFIX}/include ${CPPFLAGS:-}" >> $GITHUB_ENV
195-
echo "LDFLAGS=-L${CONDA_PREFIX}/lib ${LDFLAGS:-}" >> $GITHUB_ENV
135+
python-version: ${{ matrix.python-version }}
136+
cache: 'pip'
196137

197138
- name: Install numcodecs and Zarr
198139
run: |
199-
python -m pip install -v ".[test,test_extras]" "${{ matrix.zarr-pkg }}" crc32c
140+
python -m pip install -v ".[test,test_extras]" "${{ matrix.zarr-pkg }}" crc32c
200141
- name: List installed packages
201142
run: python -m pip list
202143

203144
- name: Run Zarr integration tests
204-
run: python -m pytest tests/test_zarr3.py tests/test_zarr3_import.py
145+
run: pytest tests/test_zarr3.py tests/test_zarr3_import.py
205146

206147
- uses: codecov/codecov-action@v5
207148
with:

0 commit comments

Comments
 (0)