Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ updates:
schedule:
# Check for updates once a week
interval: "weekly"
cooldown:
default-days: 7
groups:
actions:
patterns:
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/benchmarks-last-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- main
workflow_dispatch:

permissions: {}

jobs:
benchmark:
name: Linux
Expand All @@ -17,12 +19,13 @@ jobs:
steps:
# We need the full repo to avoid this issue
# https://github.com/actions/checkout/issues/23
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- name: Set up conda environment
uses: mamba-org/setup-micromamba@v2
uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
with:
micromamba-version: "1.5.10-0"
environment-file: ${{env.CONDA_ENV_FILE}}
Expand All @@ -34,7 +37,7 @@ jobs:

- name: "Get Previous tag"
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v2"
uses: WyriHaximus/github-action-get-previous-tag@61819f33034117e6c686e6a31dba995a85afc9de # v2.0.0
# with:
# fallback: 1.0.0 # Optional fallback tag to use when no tag can be found

Expand All @@ -47,18 +50,19 @@ jobs:
OMP_NUM_THREADS: 1
ASV_FACTOR: 1.5
ASV_SKIP_SLOW: 1
GITHUB_TAG: ${{ steps.previoustag.outputs.tag }}
run: |
set -x
# ID this runner
asv machine --yes
echo "Baseline: ${{ steps.previoustag.outputs.tag }} "
echo "Baseline: $GITHUB_TAG"
echo "Contender: ${{ github.sha }}"
# Use mamba for env creation
# export CONDA_EXE=$(which mamba)
export CONDA_EXE=$(which conda)
# Run benchmarks for current commit against base
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
asv continuous $ASV_OPTIONS ${{ steps.previoustag.outputs.tag }} ${{ github.sha }} \
asv continuous $ASV_OPTIONS "$GITHUB_TAG" ${{ github.sha }} \
| sed "/Traceback \|failed$\|PERFORMANCE DECREASED/ s/^/::error::/" \
| tee benchmarks.log
# Report and export results for subsequent steps
Expand All @@ -73,7 +77,7 @@ jobs:
cp benchmarks/README_CI.md benchmarks.log .asv/results/
working-directory: ${{ env.ASV_DIR }}

- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: asv-benchmark-results-${{ runner.os }}
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
env:
PR_HEAD_LABEL: ${{ github.event.pull_request.head.label }}

permissions: {}

jobs:
benchmark:
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || contains( github.event.pull_request.labels.*.name, 'topic-performance') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
Expand All @@ -20,12 +22,13 @@ jobs:
steps:
# We need the full repo to avoid this issue
# https://github.com/actions/checkout/issues/23
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- name: Set up conda environment
uses: mamba-org/setup-micromamba@v2
uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
with:
micromamba-version: "1.5.10-0"
environment-file: ${{env.CONDA_ENV_FILE}}
Expand All @@ -47,11 +50,12 @@ jobs:
OMP_NUM_THREADS: 1
ASV_FACTOR: 1.5
ASV_SKIP_SLOW: 1
GITHUB_LABEL: ${{ github.event.pull_request.base.label }}
run: |
set -x
# ID this runner
asv machine --yes
echo "Baseline: ${{ github.event.pull_request.base.sha }} (${{ github.event.pull_request.base.label }})"
echo "Baseline: ${{ github.event.pull_request.base.sha }} ($GITHUB_LABEL)"
echo "Contender: ${GITHUB_SHA} ($PR_HEAD_LABEL)"
# Run benchmarks for current commit against base
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
Expand All @@ -70,7 +74,7 @@ jobs:
cp benchmarks/README_CI.md benchmarks.log .asv/results/
working-directory: ${{ env.ASV_DIR }}

- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: asv-benchmark-results-${{ runner.os }}
Expand Down
49 changes: 30 additions & 19 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ concurrency:
env:
FORCE_COLOR: 3

permissions: {}

jobs:
detect-ci-trigger:
name: detect ci trigger
Expand All @@ -26,10 +28,11 @@ jobs:
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1
persist-credentials: false
- uses: xarray-contrib/ci-trigger@10cd2bfec3484946a4058a421ddf9cfad101e715 # v1.2.1
id: detect-trigger
with:
keyword: "[skip-ci]"
Expand All @@ -44,10 +47,12 @@ jobs:
pixi-version: ${{ steps.pixi-lock.outputs.pixi-version }}

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: Parcels-code/pixi-lock/create-and-cache@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
id: pixi-lock
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: pixi-lock
path: pixi.lock
Expand All @@ -63,9 +68,10 @@ jobs:
env:
PIXI_ENV: "test-py313"
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
persist-credentials: false

- name: set environment variables
run: |
Expand All @@ -75,7 +81,7 @@ jobs:
uses: Parcels-code/pixi-lock/restore@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
with:
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
cache: true
Expand Down Expand Up @@ -106,14 +112,15 @@ jobs:
PIXI_ENV: test-py313-with-typing

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
persist-credentials: false
- name: Restore cached pixi lockfile
uses: Parcels-code/pixi-lock/restore@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
with:
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
cache: true
Expand All @@ -132,7 +139,7 @@ jobs:
pixi run -e ${{env.PIXI_ENV}} -- python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report

- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v6.0.0
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: mypy_report/cobertura.xml
flags: mypy
Expand All @@ -151,14 +158,15 @@ jobs:
PIXI_ENV: test-py311-with-typing

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
persist-credentials: false
- name: Restore cached pixi lockfile
uses: Parcels-code/pixi-lock/restore@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
with:
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
cache: true
Expand All @@ -177,7 +185,7 @@ jobs:
pixi run -e ${{env.PIXI_ENV}} -- python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report

- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v6.0.0
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: mypy_report/cobertura.xml
flags: mypy-min
Expand All @@ -199,15 +207,16 @@ jobs:
PIXI_ENV: test-py313-with-typing

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- name: Restore cached pixi lockfile
uses: Parcels-code/pixi-lock/restore@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
with:
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
cache: true
Expand Down Expand Up @@ -249,15 +258,16 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
persist-credentials: false

- name: Restore cached pixi lockfile
uses: Parcels-code/pixi-lock/restore@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
with:
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
cache: true
Expand All @@ -276,7 +286,7 @@ jobs:
pixi run -e ${{ matrix.pixi-env }} -- python -m pyright xarray/

- name: Upload pyright coverage to Codecov
uses: codecov/codecov-action@v6.0.0
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: pyright_report/cobertura.xml
flags: pyright
Expand All @@ -297,16 +307,17 @@ jobs:
COLUMNS: 120

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
persist-credentials: false

- name: Restore cached pixi lockfile
uses: Parcels-code/pixi-lock/restore@38495788b79a5ff26009aecc15daa9a8310b8832 # v0.1.0
with:
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}

- uses: prefix-dev/setup-pixi@v0.9.4
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
cache: true
Expand Down
Loading
Loading