Skip to content

Commit 5426073

Browse files
committed
Build and test in separate environments
The build environment can use python 3.13, while the test environment uses the python in the matrix.
1 parent 9462346 commit 5426073

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

.github/workflows/build_workflow.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727
CANCEL_OTHERS: false
2828
PATHS_IGNORE: '["**/README.md", "**/docs/**"]'
2929
PYTHON_VERSION: "3.14"
30+
BUILD_PYTHON_VERSION: "3.13"
3031

3132
jobs:
3233
pre-commit-hooks:
@@ -69,33 +70,38 @@ jobs:
6970
- name: Create Build Environment
7071
uses: mamba-org/setup-micromamba@v2
7172
with:
72-
environment-name: mpas_tools_dev
73+
environment-name: mpas_tools_build
7374
init-shell: bash
7475
condarc: |
7576
channel_priority: strict
7677
channels:
7778
- conda-forge
7879
create-args: >-
79-
python=${{ matrix.python-version }}
80+
python=${{ env.BUILD_PYTHON_VERSION }}
8081
8182
- name: Finalize Build Environment
8283
run: |
8384
conda install conda conda-build
8485
conda build -m "conda_package/ci/linux_64_python${{ matrix.python-version }}.____cpython.yaml" "conda_package/recipe"
8586
86-
- name: Install mpas_tools
87-
run: |
88-
conda install -y -c ${CONDA_PREFIX}/conda-bld/ \
89-
mpas_tools python=${{ matrix.python-version }} \
90-
sphinx mock sphinx_rtd_theme
91-
92-
- name: Build Sphinx Docs
93-
run: |
94-
cd conda_package/docs
95-
DOCS_VERSION=test make versioned-html
87+
- name: Create Test Environment
88+
uses: mamba-org/setup-micromamba@v2
89+
with:
90+
environment-name: mpas_tools_test
91+
init-shell: bash
9692
condarc: |
9793
channel_priority: strict
9894
channels:
9995
- conda-forge
10096
create-args: >-
101-
python=${{ matrix.python-version }}
97+
--use-local
98+
python=${{ env.BUILD_PYTHON_VERSION }}
99+
mpas_tools
100+
sphinx
101+
mock
102+
sphinx_rtd_theme
103+
104+
- name: Build Sphinx Docs
105+
run: |
106+
cd conda_package/docs
107+
DOCS_VERSION=test make versioned-html

0 commit comments

Comments
 (0)