-
Notifications
You must be signed in to change notification settings - Fork 53
116 lines (104 loc) · 3.46 KB
/
build_workflow.yml
File metadata and controls
116 lines (104 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: CI/CD Build Workflow
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
env:
CANCEL_OTHERS: false
PATHS_IGNORE: '["**/README.md", "**/docs/**"]'
jobs:
build:
name: test mpas_analysis - python ${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
include:
- python-version: "3.10"
pixi-environment: py310
variant-file: ci/python3.10.yaml
- python-version: "3.11"
pixi-environment: py311
variant-file: ci/python3.11.yaml
- python-version: "3.12"
pixi-environment: py312
variant-file: ci/python3.12.yaml
- python-version: "3.13"
pixi-environment: py313
variant-file: ci/python3.13.yaml
- python-version: "3.14"
pixi-environment: py314
variant-file: ci/python3.14.yaml
fail-fast: false
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: ${{ env.CANCEL_OTHERS }}
paths_ignore: ${{ env.PATHS_IGNORE }}
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: actions/checkout@v6
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Set up Pixi
uses: prefix-dev/setup-pixi@v0.9.5
with:
environments: ${{ matrix.pixi-environment }}
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
name: Run Tests
env:
CHECK_IMAGES: "False"
run: |
set -e
pixi run -e ${{ matrix.pixi-environment }} python -m pip check
pixi run -e ${{ matrix.pixi-environment }} pytest --pyargs mpas_analysis
pixi run -e ${{ matrix.pixi-environment }} mpas_analysis --help
pixi run -e ${{ matrix.pixi-environment }} download_analysis_data --help
- if: ${{ steps.skip_check.outputs.should_skip != 'true' && matrix.python-version == '3.14' }}
name: Build Sphinx Docs
run: |
pixi run -e ${{ matrix.pixi-environment }} bash -lc '
cd docs
DOCS_VERSION=test make versioned-html
'
package:
name: build package - python ${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
include:
- python-version: "3.10"
pixi-environment: py310
variant-file: ci/python3.10.yaml
- python-version: "3.11"
pixi-environment: py311
variant-file: ci/python3.11.yaml
- python-version: "3.12"
pixi-environment: py312
variant-file: ci/python3.12.yaml
- python-version: "3.13"
pixi-environment: py313
variant-file: ci/python3.13.yaml
- python-version: "3.14"
pixi-environment: py314
variant-file: ci/python3.14.yaml
fail-fast: false
steps:
- uses: actions/checkout@v6
- name: Set up Pixi
uses: prefix-dev/setup-pixi@v0.9.5
with:
environments: ${{ matrix.pixi-environment }}
- name: Build Conda Package with rattler-build
run: |
pixi run -e ${{ matrix.pixi-environment }} \
rattler-build build \
-m ${{ matrix.variant-file }} \
-r ci/recipe/recipe.yaml \
--output-dir rattler-build-output