Skip to content

Commit

Permalink
Update github actions for build and readthedocs config (#418)
Browse files Browse the repository at this point in the history
This PR removes mamba with conda-incubator/setup-miniconda@v3, remove the github cache action (seems broken), and updates the readthedocs configuration. This was causing broken CI workflows

Co-authored-by: Evan Goetz <[email protected]>
  • Loading branch information
eagoetz and Evan Goetz authored Dec 13, 2024
1 parent fdc0a4b commit 41c4049
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,39 +53,42 @@ jobs:
with:
fetch-depth: 0

- name: Cache conda packages
uses: actions/cache@v4
env:
# increment to reset cache
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}
restore-keys: ${{ runner.os }}-conda-${{ matrix.python-version }}-
# EG 13 Dec 2024: commenting out broken cache
# - name: Cache conda packages
# uses: actions/cache@v4
# env:
# # increment to reset cache
# CACHE_NUMBER: 0
# with:
# path: ~/conda_pkgs_dir
# key: ${{ runner.os }}-conda-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}
# restore-keys: ${{ runner.os }}-conda-${{ matrix.python-version }}-

- name: Configure conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
miniforge-variant: Mambaforge
auto-update-conda: true
channels: conda-forge
python-version: ${{ matrix.python-version }}
use-mamba: true
# this is needed for caching to work properly:
# EG 13 Dec 2024: commenting out broken cache
# use-only-tar-bz2: true

- name: Conda info
run: conda info --all

- name: Install dependencies
run: |
# parse requirements to install as much as possible with conda
mamba create --name pip2conda pip2conda
mamba run -n pip2conda pip2conda \
conda create --name pip2conda pip2conda
conda run -n pip2conda pip2conda \
--all \
--output environment.txt \
--python-version ${{ matrix.python-version }}
echo "-----------------"
cat environment.txt
echo "-----------------"
mamba install --quiet --yes --name test --file environment.txt
conda install --quiet --yes --name test --file environment.txt
- name: Install GWSumm
run: python -m pip install . --no-build-isolation -vv
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ version: 2

# Set the OS, Python version and other tools you might need
build:
os: "ubuntu-22.04"
os: "ubuntu-24.04"
tools:
python: "mambaforge-22.9"
python: "miniconda-latest"

conda:
environment: docs/environment.yml
Expand Down

0 comments on commit 41c4049

Please sign in to comment.