Skip to content

Commit d2678e3

Browse files
authored
Use conda-incubator/[email protected] (and use Conda on Linux) (#398)
Update to the recent `conda-incubator/setup-miniconda` and pin that release. Also update Linux CI to also use Conda (just like on macOS & Windows). Drop Fortran compiler from CI as it is unused. Additionally drop `ACTIONS_ALLOW_UNSECURE_COMMANDS` as it is no longer needed. Some other small tidying.
1 parent 922ab23 commit d2678e3

File tree

4 files changed

+72
-28
lines changed

4 files changed

+72
-28
lines changed

.github/workflows/ci-linux.yaml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,67 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
runs-on: ${{ matrix.os }}
7+
runs-on: ubuntu-latest
88
strategy:
99
fail-fast: false
1010
matrix:
1111
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
12-
os: [ubuntu-latest]
1312

1413
steps:
1514
- name: Checkout source
1615
uses: actions/checkout@v3
1716
with:
1817
submodules: recursive
1918

20-
- name: Set up Python
21-
uses: actions/setup-python@v4
19+
- name: Set up Conda
20+
uses: conda-incubator/setup-[email protected]
2221
with:
23-
python-version: ${{ matrix.python-version }}
22+
channels: conda-forge
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Show info about `base` environment
26+
shell: "bash -l {0}"
27+
run: |
28+
conda info
29+
conda config --show-sources
30+
conda list --show-channel-urls
31+
32+
- name: Set up `env`
33+
shell: "bash -l {0}"
34+
run: >
35+
conda create -n env
36+
c-compiler cxx-compiler
37+
python=${{matrix.python-version}} wheel pip
38+
39+
- name: Show info about `env` environment
40+
shell: "bash -l {0}"
41+
run: |
42+
conda list --show-channel-urls -n env
2443
2544
- name: Install numcodecs
45+
shell: "bash -l {0}"
2646
run: |
47+
conda activate env
48+
export DISABLE_NUMCODECS_AVX2=""
2749
python -m pip install -v -e .[test,msgpack,zfpy]
2850
2951
- name: List installed packages
30-
run: python -m pip list
52+
shell: "bash -l {0}"
53+
run: |
54+
conda activate env
55+
python -m pip list
3156
3257
- name: Flake8
33-
run: flake8
58+
shell: "bash -l {0}"
59+
run: |
60+
conda activate env
61+
flake8
3462
3563
- name: Run tests
36-
run: pytest -v
64+
shell: "bash -l {0}"
65+
run: |
66+
conda activate env
67+
pytest -v
3768
3869
- uses: codecov/codecov-action@v3
3970
with:

.github/workflows/ci-osx.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ jobs:
1616
with:
1717
submodules: recursive
1818

19-
- name: Set up Python
20-
uses: conda-incubator/setup-miniconda@master
19+
- name: Set up Conda
20+
uses: conda-incubator/setup-miniconda@v2.2.0
2121
with:
2222
channels: conda-forge
2323
python-version: ${{ matrix.python-version }}
24-
env:
25-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
2624

2725
- name: Show info about `base` environment
2826
shell: "bash -l {0}"
@@ -31,13 +29,12 @@ jobs:
3129
conda config --show-sources
3230
conda list --show-channel-urls
3331
34-
- name: Set up env
32+
- name: Set up `env`
3533
shell: "bash -l {0}"
36-
run: |
37-
conda create -n env python=${{matrix.python-version}} wheel pip compilers 'clang>=12.0.1'
38-
conda activate env
39-
which pip
40-
conda env export
34+
run: >
35+
conda create -n env
36+
c-compiler cxx-compiler 'clang>=12.0.1'
37+
python=${{matrix.python-version}} wheel pip
4138
4239
- name: Show info about `env` environment
4340
shell: "bash -l {0}"
@@ -51,6 +48,12 @@ jobs:
5148
export CC=clang
5249
python -m pip install -v -e .[test,msgpack,zfpy]
5350
51+
- name: List installed packages
52+
shell: "bash -l {0}"
53+
run: |
54+
conda activate env
55+
python -m pip list
56+
5457
- name: Run tests
5558
shell: "bash -l {0}"
5659
run: |

.github/workflows/ci-windows.yaml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,36 @@ jobs:
1616
with:
1717
submodules: recursive
1818

19-
- name: Set up Python
20-
uses: conda-incubator/setup-miniconda@master
19+
- name: Set up Conda
20+
uses: conda-incubator/setup-miniconda@v2.2.0
2121
with:
2222
channels: conda-forge
2323
python-version: ${{ matrix.python-version }}
24-
env:
25-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
2624

27-
- name: Set up env
25+
- name: Set up `env`
26+
shell: "bash -l {0}"
27+
run: >
28+
conda create -n env
29+
c-compiler cxx-compiler
30+
python=${{matrix.python-version}} wheel pip
31+
32+
- name: Show info about `env` environment
2833
shell: "bash -l {0}"
2934
run: |
30-
conda create -n env python=${{matrix.python-version}} wheel pip compilers
31-
conda activate env
32-
which pip
33-
conda env export
35+
conda list --show-channel-urls -n env
3436
3537
- name: Install numcodecs
3638
shell: "bash -l {0}"
3739
run: |
3840
conda activate env
39-
export CC=clang
4041
python -m pip install -v -e .[test,msgpack,zfpy]
4142
43+
- name: List installed packages
44+
shell: "bash -l {0}"
45+
run: |
46+
conda activate env
47+
python -m pip list
48+
4249
- name: Run tests
4350
shell: "bash -l {0}"
4451
run: |

docs/release.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ Maintenance
6565
* Update ReadTheDocs.
6666
By :user:`John Kirkham <jakirkham>`, :issue:`383`.
6767

68+
* Use `conda-incubator/[email protected]` (and use Conda on Linux).
69+
By :user:`John Kirkham <jakirkham>` :issue:`398`.
70+
6871
* Bring coverage back up to 100%.
6972
By :user:`John Kirkham <jakirkham>` and :user:`Martin Durant <martindurant>`,
7073
:issue:`392` and :issue:`393`.

0 commit comments

Comments
 (0)