|
20 | 20 | with: |
21 | 21 | python-version: '3.10' |
22 | 22 | - name: install clang-format |
23 | | - if: steps.clang_format.outputs.cache-hit != 'true' |
24 | 23 | run: | |
25 | 24 | sudo pip install clang-format==6.0.1 |
26 | 25 | sudo ln -s /usr/local/bin/clang-format /usr/local/bin/clang-format-6.0 |
@@ -48,70 +47,68 @@ jobs: |
48 | 47 | with: |
49 | 48 | submodules: true |
50 | 49 |
|
51 | | - - name: Cache conda and dependancies |
52 | | - id: cache |
53 | | - uses: actions/cache@v4.2.2 |
54 | | - with: |
55 | | - path: ${{ env.CONDA }}/envs |
56 | | - key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.python}}-conda-v5-${{ hashFiles('requirements/CI-tests-conda/requirements.txt')}} |
57 | | - |
58 | | - - name: Install Miniconda with Mamba |
| 50 | + - name: Install conda (needed for msprime on Windows) |
59 | 51 | uses: conda-incubator/setup-miniconda@v3.1.1 |
60 | | - if: steps.cache.outputs.cache-hit != 'true' |
61 | 52 | with: |
62 | 53 | activate-environment: anaconda-client-env |
63 | 54 | python-version: ${{ matrix.python }} |
64 | 55 | channels: conda-forge |
65 | | -# channel-priority: strict |
66 | 56 | auto-update-conda: true |
67 | | -# mamba-version: "*" |
68 | | -# use-mamba: true |
69 | 57 |
|
70 | 58 | - name: Fix windows .profile |
71 | | - if: steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest' |
| 59 | + if: matrix.os == 'windows-latest' |
72 | 60 | run: | |
73 | 61 | cp ~/.bash_profile ~/.profile |
74 | 62 |
|
75 | 63 | # Work around weird issues on OSX possibly caused by mixed compilers |
76 | 64 | # https://github.com/tskit-dev/tsinfer/issues/376 |
77 | 65 | - name: Install compiler from conda |
78 | | - if: steps.cache.outputs.cache-hit != 'true' |
79 | 66 | shell: bash -l {0} #We need a login shell to get conda |
80 | 67 | run: conda install --yes c-compiler |
81 | 68 |
|
82 | 69 | - name: Install conda deps |
83 | | - if: steps.cache.outputs.cache-hit != 'true' |
84 | 70 | shell: bash -l {0} #We need a login shell to get conda |
85 | | - run: conda install --yes --file=requirements/CI-tests-conda/requirements.txt |
| 71 | + run: conda install msprime |
| 72 | + |
| 73 | + - name: Install uv |
| 74 | + uses: astral-sh/setup-uv@v6 |
| 75 | + with: |
| 76 | + version: "0.8.15" |
86 | 77 |
|
87 | 78 | - name: Install cyvcf2 #Fails if done via conda due to no windows support. |
88 | | - if: steps.cache.outputs.cache-hit != 'true' && matrix.os != 'windows-latest' |
| 79 | + if: matrix.os != 'windows-latest' |
89 | 80 | run: | |
90 | 81 | source ~/.profile |
91 | 82 | conda activate anaconda-client-env |
92 | 83 | #Install these by pip so we don't pull in cbgen with conda as it isn't available on 3.12 |
93 | | - pip install sgkit==0.9.0 cyvcf2==0.31.1 yarl==1.9.4 aiohttp==3.9.5 requests==2.32.3 |
| 84 | + uv pip install sgkit==0.9.0 cyvcf2==0.31.1 yarl==1.9.4 aiohttp==3.9.5 requests==2.32.3 |
94 | 85 |
|
95 | 86 | - name: Install sgkit only on windows |
96 | | - if: steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest' |
| 87 | + if: matrix.os == 'windows-latest' |
97 | 88 | run: | |
98 | 89 | source ~/.profile |
99 | 90 | conda activate anaconda-client-env |
100 | 91 | #Install these by pip so we don't pull in cbgen with conda as it isn't available on 3.12 |
101 | | - pip install sgkit==0.9.0 |
| 92 | + uv pip install sgkit==0.9.0 |
| 93 | +
|
| 94 | + - name: Install pip deps |
| 95 | + run: | |
| 96 | + source ~/.profile |
| 97 | + conda activate anaconda-client-env |
| 98 | + uv pip install -r pyproject.toml --extra test |
102 | 99 |
|
103 | 100 | - name: Build module |
104 | 101 | run: | |
105 | 102 | source ~/.profile |
106 | 103 | conda activate anaconda-client-env |
107 | 104 | # Use numpy2 to build the module |
108 | | - pip install "numpy>=2" |
| 105 | + uv pip install "numpy>=2" |
109 | 106 | python setup.py build_ext --inplace |
110 | 107 |
|
111 | 108 | - name: Run tests |
112 | 109 | run: | |
113 | 110 | source ~/.profile |
114 | 111 | conda activate anaconda-client-env |
115 | 112 | # Test with numpy<2 for numba |
116 | | - pip install "numpy<2" |
| 113 | + uv pip install "numpy<2" |
117 | 114 | python -m pytest -xv |
0 commit comments