4
4
pull_request :
5
5
push :
6
6
branches : [main]
7
- tags :
8
7
9
8
jobs :
10
9
pre-commit :
11
10
name : Lint
12
11
runs-on : ubuntu-latest
13
12
steps :
14
13
- name : Cancel Previous Runs
15
- uses : styfle/cancel-workflow-action@0.11.0
14
+ uses : styfle/cancel-workflow-action@0.12.1
16
15
with :
17
16
access_token : ${{ github.token }}
18
- - uses : actions/checkout@v3
19
- - uses : actions/setup-python@v4
17
+ - uses : actions/checkout@v4
18
+ - uses : actions/setup-python@v5
20
19
with :
21
- python-version : " 3.10"
20
+ python-version : ' 3.10'
22
21
- name : install clang-format
22
+ if : steps.clang_format.outputs.cache-hit != 'true'
23
23
run : |
24
- pip install clang-format==6.0.1
24
+ sudo pip install clang-format==6.0.1
25
+ sudo ln -s /usr/local/bin/clang-format /usr/local/bin/clang-format-6.0
25
26
-
uses :
pre-commit/[email protected]
26
27
27
28
test :
28
29
name : Python
29
30
runs-on : ${{ matrix.os }}
30
31
strategy :
32
+ fail-fast : false
31
33
matrix :
32
- python : [ 3.7 , "3.10 " ]
34
+ python : [ 3.9 , "3.12 " ]
33
35
os : [ macos-latest, ubuntu-latest, windows-latest ]
34
36
defaults :
35
37
run :
36
38
shell : bash
37
39
steps :
38
40
- name : Cancel Previous Runs
39
- uses : styfle/cancel-workflow-action@0.11.0
41
+ uses : styfle/cancel-workflow-action@0.12.1
40
42
with :
41
43
access_token : ${{ github.token }}
42
44
43
45
- name : Checkout
44
- uses : actions/checkout@v3
46
+ uses : actions/checkout@v4
45
47
with :
46
48
submodules : true
47
49
48
50
- name : Cache conda and dependancies
49
51
id : cache
50
- uses : actions/cache@v3
52
+ uses : actions/cache@v4
51
53
with :
52
- path : |
53
- c:\Miniconda\envs\anaconda-client-env
54
- /usr/share/miniconda/envs/anaconda-client-env
55
- ~/osx-conda
56
- ~/.profile
57
- key : ${{ runner.os }}-${{ matrix.python}}-conda-v11-${{ hashFiles('requirements/CI-tests-conda/requirements.txt') }}-${{ hashFiles('requirements/CI-tests-pip/requirements.txt') }}
54
+ path : ${{ env.CONDA }}/envs
55
+ key : ${{ runner.os }}-${{ runner.arch }}-${{ matrix.python}}-conda-v5-${{ hashFiles('requirements/CI-tests-conda/requirements.txt')}}
58
56
59
- - name : Install Conda
60
- uses : conda-incubator/setup-miniconda@v2
57
+ - name : Install Miniconda with Mamba
58
+ uses : conda-incubator/setup-miniconda@v3
61
59
if : steps.cache.outputs.cache-hit != 'true'
62
60
with :
63
61
activate-environment : anaconda-client-env
64
62
python-version : ${{ matrix.python }}
65
63
channels : conda-forge
66
- channel-priority : strict
64
+ # channel-priority: strict
67
65
auto-update-conda : true
66
+ # mamba-version: "*"
67
+ # use-mamba: true
68
68
69
69
- name : Fix windows .profile
70
70
if : steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest'
@@ -83,25 +83,34 @@ jobs:
83
83
shell : bash -l {0} # We need a login shell to get conda
84
84
run : conda install --yes --file=requirements/CI-tests-conda/requirements.txt
85
85
86
- - name : Install pip deps
87
- if : steps.cache.outputs.cache-hit != 'true' && matrix.python != 3.7
88
- shell : bash -l {0}
89
- run : pip install -r requirements/CI-tests-pip/requirements.txt
90
-
91
- - name : Fix pandas on 3.7
92
- if : steps.cache.outputs.cache-hit != 'true' && matrix.python == 3.7
93
- shell : bash -l {0}
94
- run : pip install -r requirements/CI-tests-pip/requirements3.7.txt
86
+ - name : Install cyvcf2 # Fails if done via conda due to no windows support.
87
+ if : steps.cache.outputs.cache-hit != 'true' && matrix.os != 'windows-latest'
88
+ run : |
89
+ source ~/.profile
90
+ conda activate anaconda-client-env
91
+ #Install these by pip so we don't pull in cbgen with conda as it isn't available on 3.12
92
+ pip install sgkit==0.9.0 cyvcf2==0.31.1 yarl==1.9.4 aiohttp==3.9.5 requests==2.32.3
95
93
94
+ - name : Install sgkit only on windows
95
+ if : steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest'
96
+ run : |
97
+ source ~/.profile
98
+ conda activate anaconda-client-env
99
+ #Install these by pip so we don't pull in cbgen with conda as it isn't available on 3.12
100
+ pip install sgkit==0.9.0
96
101
97
102
- name : Build module
98
103
run : |
99
104
source ~/.profile
100
105
conda activate anaconda-client-env
106
+ # Use numpy2 to build the module
107
+ pip install "numpy>=2"
101
108
python setup.py build_ext --inplace
102
109
103
110
- name : Run tests
104
111
run : |
105
112
source ~/.profile
106
113
conda activate anaconda-client-env
107
- python -m pytest -xv -n2
114
+ # Test with numpy<2 for numba
115
+ pip install "numpy<2"
116
+ python -m pytest -xv
0 commit comments