Skip to content

Commit

Permalink
Update build workflow
Browse files Browse the repository at this point in the history
- Replace mamba with miniforge and conda
- Add Python 3.12 to testing matrix
- Update `CANCEL_OTHERS` to `false` to test each Python version individually for potential Python-specific issues
- Update `setup-miniconda` to v3
  • Loading branch information
tomvothecoder committed Sep 23, 2024
1 parent 753a046 commit eb252ca
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
workflow_dispatch:

env:
CANCEL_OTHERS: true
CANCEL_OTHERS: False
PATHS_IGNORE: '["**/README.rst", "**/AUTHORS.rst", "**/CODE_OF_CONDUCT.rst", "**/HISTORY.rst", "**/CONTRIBUTING.rst", "**/docs/**", "**/ISSUE_TEMPLATE/**", "**/pull_request_template.md", "**/.vscode/**"]'

jobs:
Expand All @@ -31,7 +31,7 @@ jobs:
needs: skip-duplicate-actions
if: needs.skip-duplicate-actions.outputs.should_skip != 'true'
runs-on: ubuntu-latest
timeout-minutes: 3
timeout-minutes: 5
steps:
- name: Checkout Code Repository
uses: actions/checkout@v3
Expand All @@ -55,18 +55,16 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3

- name: Set up Conda Environment
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: "xcdat_ci"
use-mamba: true
mamba-version: "*"
channel-priority: strict
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand All @@ -93,10 +91,10 @@ jobs:
- if: steps.cache.outputs.cache-hit != 'true'
name: Update environment
run: |
mamba env update -n xcdat_ci -f conda-env/ci.yml
conda env update -n xcdat_ci -f conda-env/ci.yml
# Make sure the Python version in the env matches the current matrix version.
# Make sure numpy is not > 2.0.
mamba install -c conda-forge python=${{ matrix.python-version }} "numpy>=1.23.0,<2.0"
conda install -c conda-forge python=${{ matrix.python-version }} "numpy>=1.23.0,<2.0"
- name: Install xcdat
# Source: https://github.com/conda/conda-build/issues/4251#issuecomment-1053460542
Expand Down

0 comments on commit eb252ca

Please sign in to comment.