Skip to content

Commit 7cff0a7

Browse files
authored
Merge pull request #245 from altheaden/ci-switch-to-micromamba
Switch CI from miniconda to micromamba
2 parents fa49d30 + 2809d8f commit 7cff0a7

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

.github/workflows/build_workflow.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,22 @@ jobs:
7373

7474
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
7575
name: Set up Conda Environment
76-
uses: conda-incubator/setup-miniconda@v3
76+
uses: mamba-org/setup-micromamba@v2
7777
with:
78-
activate-environment: "mache_ci"
79-
miniforge-version: latest
80-
channels: conda-forge
81-
channel-priority: strict
82-
auto-update-conda: true
83-
python-version: ${{ matrix.python-version }}
78+
environment-name: mache_dev
79+
init-shell: bash
80+
condarc: |
81+
channel_priority: strict
82+
channels:
83+
- conda-forge
84+
create-args: >-
85+
python=${{ matrix.python-version }}
8486
8587
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
8688
name: Install mache
8789
run: |
88-
conda create -n mache_dev --file spec-file.txt \
89-
python=${{ matrix.python-version }}
90-
conda activate mache_dev
90+
conda install -y --file spec-file.txt \
91+
python=${{ matrix.python-version }}
9192
python -m pip install --no-deps --no-build-isolation -vv -e .
9293
9394
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
@@ -96,15 +97,13 @@ jobs:
9697
CHECK_IMAGES: False
9798
run: |
9899
set -e
99-
conda activate mache_dev
100100
pip check
101101
mache sync diags --help
102102
pytest tests
103103
104104
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
105105
name: Build Sphinx Docs
106106
run: |
107-
conda activate mache_dev
108107
# sphinx-multiversion expects at least a "main" branch
109108
git branch main || echo "branch main already exists."
110109
cd docs

.github/workflows/docs_workflow.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,33 @@ jobs:
2525

2626
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
2727
name: Set up Conda Environment
28-
uses: conda-incubator/setup-miniconda@v3
28+
uses: mamba-org/setup-micromamba@v2
2929
with:
30-
activate-environment: "mache_ci"
31-
miniforge-version: latest
32-
channels: conda-forge
33-
channel-priority: strict
34-
auto-update-conda: true
35-
python-version: ${{ env.PYTHON_VERSION }}
30+
environment-name: mache_dev
31+
init-shell: bash
32+
condarc: |
33+
channel_priority: strict
34+
channels:
35+
- conda-forge
36+
create-args: >-
37+
python=${{ env.PYTHON_VERSION }}
3638
3739
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
3840
name: Install mache
3941
run: |
4042
git config --global url."https://github.com/".insteadOf "[email protected]:"
41-
conda create -n mache_dev --file spec-file.txt \
43+
conda install -y --file spec-file.txt \
4244
python=${{ env.PYTHON_VERSION }}
43-
conda activate mache_dev
4445
python -m pip install -vv --no-deps --no-build-isolation -e .
4546
4647
- name: Build Sphinx Docs
4748
run: |
4849
set -e
49-
conda activate mache_dev
5050
cd docs
5151
sphinx-multiversion . _build/html
5252
- name: Copy Docs and Commit
5353
run: |
5454
set -e
55-
conda activate mache_dev
5655
cd docs
5756
# gh-pages branch must already exist
5857
git clone https://github.com/E3SM-Project/mache.git --branch gh-pages --single-branch gh-pages

0 commit comments

Comments
 (0)