Skip to content

Merge pull request #1148 from xylar/update-to-1.15.0 #371

Merge pull request #1148 from xylar/update-to-1.15.0

Merge pull request #1148 from xylar/update-to-1.15.0 #371

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