@@ -22,12 +22,24 @@ jobs:
2222 name : test mpas_analysis - python ${{ matrix.python-version }}
2323 runs-on : ubuntu-latest
2424 timeout-minutes : 20
25- defaults :
26- run :
27- shell : bash -l {0}
2825 strategy :
2926 matrix :
30- python-version : ["3.10", "3.11", "3.12", "3.13"]
27+ include :
28+ - python-version : " 3.10"
29+ pixi-environment : py310
30+ variant-file : ci/python3.10.yaml
31+ - python-version : " 3.11"
32+ pixi-environment : py311
33+ variant-file : ci/python3.11.yaml
34+ - python-version : " 3.12"
35+ pixi-environment : py312
36+ variant-file : ci/python3.12.yaml
37+ - python-version : " 3.13"
38+ pixi-environment : py313
39+ variant-file : ci/python3.13.yaml
40+ - python-version : " 3.14"
41+ pixi-environment : py314
42+ variant-file : ci/python3.14.yaml
3143 fail-fast : false
3244 steps :
3345 - id : skip_check
@@ -37,53 +49,68 @@ jobs:
3749 paths_ignore : ${{ env.PATHS_IGNORE }}
3850
3951 - if : ${{ steps.skip_check.outputs.should_skip != 'true' }}
40- uses : actions/checkout@v5
52+ uses : actions/checkout@v6
4153
4254 - if : ${{ steps.skip_check.outputs.should_skip != 'true' }}
43- name : Cache Conda
44- uses : actions/cache@v4
45- env :
46- # Increase this value to reset cache if conda-dev-spec.template has not changed in the workflow
47- CACHE_NUMBER : 0
55+ name : Set up Pixi
56+ uses : prefix-dev/setup-pixi@v0.9.5
4857 with :
49- path : ~/conda_pkgs_dir_py${{ matrix.python-version }}
50- key :
51- ${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{
52- hashFiles('dev-spec.txt,pyproject.toml') }}
53-
54- - if : ${{ steps.skip_check.outputs.should_skip != 'true' }}
55- name : Set up Conda Environment
56- uses : mamba-org/setup-micromamba@v2
57- with :
58- environment-name : mpas_analysis_dev
59- init-shell : bash
60- condarc : |
61- channel_priority: strict
62- channels:
63- - conda-forge
64- create-args : >-
65- python=${{ matrix.python-version }}
66-
67- - if : ${{ steps.skip_check.outputs.should_skip != 'true' }}
68- name : Install mpas_analysis
69- run : |
70- conda install -y --file dev-spec.txt \
71- python=${{ matrix.python-version }}
72- python -m pip install --no-deps --no-build-isolation -vv -e .
58+ environments : ${{ matrix.pixi-environment }}
7359
7460 - if : ${{ steps.skip_check.outputs.should_skip != 'true' }}
7561 name : Run Tests
7662 env :
77- CHECK_IMAGES : False
63+ CHECK_IMAGES : " False"
7864 run : |
7965 set -e
80- pip check
81- pytest --pyargs mpas_analysis
82- mpas_analysis --help
83- download_analysis_data --help
66+ pixi run -e ${{ matrix.pixi-environment }} python -m pip check
67+ pixi run -e ${{ matrix.pixi-environment }} pytest --pyargs mpas_analysis
68+ pixi run -e ${{ matrix.pixi-environment }} mpas_analysis --help
69+ pixi run -e ${{ matrix.pixi-environment }} download_analysis_data --help
8470
85- - if : ${{ steps.skip_check.outputs.should_skip != 'true' }}
71+ - if : ${{ steps.skip_check.outputs.should_skip != 'true' && matrix.python-version == '3.14' }}
8672 name : Build Sphinx Docs
8773 run : |
88- cd docs
89- DOCS_VERSION=test make versioned-html
74+ pixi run -e ${{ matrix.pixi-environment }} bash -lc '
75+ cd docs
76+ DOCS_VERSION=test make versioned-html
77+ '
78+
79+ package :
80+ name : build package - python ${{ matrix.python-version }}
81+ runs-on : ubuntu-latest
82+ timeout-minutes : 30
83+ strategy :
84+ matrix :
85+ include :
86+ - python-version : " 3.10"
87+ pixi-environment : py310
88+ variant-file : ci/python3.10.yaml
89+ - python-version : " 3.11"
90+ pixi-environment : py311
91+ variant-file : ci/python3.11.yaml
92+ - python-version : " 3.12"
93+ pixi-environment : py312
94+ variant-file : ci/python3.12.yaml
95+ - python-version : " 3.13"
96+ pixi-environment : py313
97+ variant-file : ci/python3.13.yaml
98+ - python-version : " 3.14"
99+ pixi-environment : py314
100+ variant-file : ci/python3.14.yaml
101+ fail-fast : false
102+ steps :
103+ - uses : actions/checkout@v6
104+
105+ - name : Set up Pixi
106+ uses : prefix-dev/setup-pixi@v0.9.5
107+ with :
108+ environments : ${{ matrix.pixi-environment }}
109+
110+ - name : Build Conda Package with rattler-build
111+ run : |
112+ pixi run -e ${{ matrix.pixi-environment }} \
113+ rattler-build build \
114+ -m ${{ matrix.variant-file }} \
115+ -r ci/recipe/recipe.yaml \
116+ --output-dir rattler-build-output
0 commit comments