|
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,39 @@ 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 |
| 50 | + - name: Install uv and set the python version |
| 51 | + uses: astral-sh/setup-uv@v6 |
54 | 52 | 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 |
59 | | - uses: conda-incubator/setup-miniconda@v3.1.1 |
60 | | - if: steps.cache.outputs.cache-hit != 'true' |
61 | | - with: |
62 | | - activate-environment: anaconda-client-env |
63 | 53 | python-version: ${{ matrix.python }} |
64 | | - channels: conda-forge |
65 | | -# channel-priority: strict |
66 | | - auto-update-conda: true |
67 | | -# mamba-version: "*" |
68 | | -# use-mamba: true |
| 54 | + version: "0.8.15" |
69 | 55 |
|
70 | | - - name: Fix windows .profile |
71 | | - if: steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest' |
| 56 | + - name: Setup venv |
72 | 57 | run: | |
73 | | - cp ~/.bash_profile ~/.profile |
74 | | -
|
75 | | - # Work around weird issues on OSX possibly caused by mixed compilers |
76 | | - # https://github.com/tskit-dev/tsinfer/issues/376 |
77 | | - - name: Install compiler from conda |
78 | | - if: steps.cache.outputs.cache-hit != 'true' |
79 | | - shell: bash -l {0} #We need a login shell to get conda |
80 | | - run: conda install --yes c-compiler |
81 | | - |
82 | | - - name: Install conda deps |
83 | | - if: steps.cache.outputs.cache-hit != 'true' |
84 | | - shell: bash -l {0} #We need a login shell to get conda |
85 | | - run: conda install --yes --file=requirements/CI-tests-conda/requirements.txt |
| 58 | + uv venv |
86 | 59 |
|
87 | 60 | - 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' |
| 61 | + if: matrix.os != 'windows-latest' |
89 | 62 | run: | |
90 | | - source ~/.profile |
91 | | - conda activate anaconda-client-env |
92 | 63 | #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 |
| 64 | + uv pip install sgkit==0.9.0 cyvcf2==0.31.1 yarl==1.9.4 aiohttp==3.9.5 requests==2.32.3 |
94 | 65 |
|
95 | 66 | - name: Install sgkit only on windows |
96 | | - if: steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest' |
| 67 | + if: matrix.os == 'windows-latest' |
97 | 68 | run: | |
98 | | - source ~/.profile |
99 | | - conda activate anaconda-client-env |
100 | | - #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 |
| 69 | + uv pip install sgkit==0.9.0 |
| 70 | +
|
| 71 | + - name: Install pip deps |
| 72 | + run: | |
| 73 | + uv pip install -r pyproject.toml --extra test |
102 | 74 |
|
103 | 75 | - name: Build module |
104 | 76 | run: | |
105 | | - source ~/.profile |
106 | | - conda activate anaconda-client-env |
107 | 77 | # Use numpy2 to build the module |
108 | | - pip install "numpy>=2" |
109 | | - python setup.py build_ext --inplace |
| 78 | + uv pip install "numpy>=2" |
| 79 | + uv run python setup.py build_ext --inplace |
110 | 80 |
|
111 | 81 | - name: Run tests |
112 | 82 | run: | |
113 | | - source ~/.profile |
114 | | - conda activate anaconda-client-env |
115 | 83 | # Test with numpy<2 for numba |
116 | | - pip install "numpy<2" |
117 | | - python -m pytest -xv |
| 84 | + uv pip install "numpy<2" |
| 85 | + uv run python -m pytest -xv |
0 commit comments