Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
cb6e923
hacky way to address #3068
wwieder Apr 16, 2025
bb42294
remove extra comments
wwieder Apr 21, 2025
8ff529e
add namelist control over glacier
wwieder Apr 21, 2025
f65cdb4
including lake conductance methods
wwieder Apr 21, 2025
2dba8f0
namelist controls in main
wwieder Apr 21, 2025
dfd7108
define BFB namelist defaults
wwieder Apr 21, 2025
d90f2a5
Add GH workflow to test docs build. Failing.
samsrabin Apr 21, 2025
c43ee67
Resolve documentation build errors.
samsrabin Apr 21, 2025
b568a8f
ctsm_pylib now includes docs/requirements.txt.
samsrabin Apr 21, 2025
acef2b1
py_env_create: Add -u/--update option.
samsrabin Apr 21, 2025
dd14c24
Add and use ctsm-docs Docker image.
samsrabin Apr 21, 2025
f8ac559
doc/build_docs: Get doc-builder if not checked out.
samsrabin Apr 21, 2025
9dccb2e
doc/Makefile: Don't fail git lfs install if already done.
samsrabin Apr 21, 2025
797612f
rename to snow_thermal_cond_glc_method
wwieder Apr 22, 2025
008db3c
Merge remote-tracking branch 'escomp/b4b-dev' into JordanGlacier
ekluzek Apr 24, 2025
89d9dff
Fix version picker.
samsrabin Apr 24, 2025
82d0dd8
Add original docs documentation from the GitHub wiki.
samsrabin Apr 22, 2025
e8da24f
UG: Add new docs documentation
samsrabin Apr 22, 2025
c317061
gitignore _build*/
samsrabin Apr 24, 2025
f63b70e
add perl namelist
wwieder Apr 24, 2025
12cf573
Merge branch 'JordanGlacier' of https://github.com/wwieder/CTSM into …
wwieder Apr 24, 2025
65fc996
Merge tag 'ctsm5.3.041' into merge-master-20250424
samsrabin Apr 25, 2025
882e9e9
Merge pull request #3092 from samsrabin/merge-master-20250424
samsrabin Apr 25, 2025
065635a
Merge remote-tracking branch 'escomp/b4b-dev' into JordanGlacier
ekluzek Apr 26, 2025
0464df1
Add the needed add_default calls for the new snow_thermal_cond_* name…
ekluzek Apr 29, 2025
b0793c2
Merge branch 'master' of https://github.com/ESCOMP/CTSM into JordanGl…
wwieder Apr 29, 2025
e469029
error logs fail to build, removing
wwieder Apr 29, 2025
c077a43
Merge branch 'JordanGlacier' of https://github.com/wwieder/CTSM into …
wwieder Apr 29, 2025
715f256
Merge branch 'JordanGlacier' of github.com:wwieder/CTSM into JordanGl…
ekluzek Apr 29, 2025
81b2dfa
Revert "error logs fail to build, removing"
ekluzek Apr 29, 2025
f9ac7ac
Add in module use statements needed so the error checks will build
ekluzek Apr 29, 2025
bd5e550
Similar changes that I brought in for LakeFluxes and SoilTemperature …
ekluzek Apr 29, 2025
e4750c0
Merge pull request #3072 from wwieder/JordanGlacier
ekluzek May 1, 2025
ba37a5f
update mpi-serial
ekluzek May 4, 2025
0f9c333
Update submodules to cesm3_0_alpha06c, just before the answer change …
ekluzek May 4, 2025
ad24fdd
Move mpi-serial back as the next versions are dependent on ccs_config…
ekluzek May 4, 2025
6fd9ce2
Revert "Merge pull request #3067 from jedwards4b/st_arvchive_fix"
ekluzek May 1, 2025
b4009f0
Merge pull request #3106 from ekluzek/update_to_alpha06c
ekluzek May 5, 2025
316c7fe
Revert "py_env_create: Add -u/--update option."
samsrabin Apr 24, 2025
f981820
Update doc-builder to v2.0.0.
samsrabin Apr 25, 2025
7831b50
Fix second version in dropdown.
samsrabin May 9, 2025
e52fd23
Improve ctsm-docs_container/README.md.
samsrabin May 9, 2025
c99bfb6
Add date of last access to URLs in GitHub workflows.
samsrabin May 9, 2025
c09f568
Merge pull request #2809 from samsrabin/update-docs-builder-2
samsrabin May 9, 2025
1a8516b
Merge tag 'ctsm5.3.042' into merge-b4bdev-20250509
slevis-lmwg May 9, 2025
d971dfc
Draft ChangeLog/ChangeSum
slevis-lmwg May 9, 2025
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
83 changes: 83 additions & 0 deletions .github/workflows/docker-image-build-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Based on https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#publishing-a-package-using-an-action (last accessed 2025-05-09)
name: Build and publish ctsm-docs Docker image

on:
# Run this whenever something gets pushed to master
push:
branches: ['master']
paths:
- 'doc/ctsm-docs_container/Dockerfile'
- 'doc/ctsm-docs_container/requirements.txt'

# Run this whenever it's manually called
workflow_dispatch:

jobs:
# This first job checks that the container can be built, and that we can use it to build the docs without error.
build-image-and-test-docs:
name: Build image and test docs
uses: ./.github/workflows/docker-image-common.yml
secrets: inherit

# This second job actually builds and publishes the container.
push-and-attest:
name: Publish and attest
runs-on: ubuntu-latest

# Wait to run this job until after build-image-and-test-docs. If that job fails, something might be wrong with the container, so don't try this one. (It might also have failed because of something wrong with doc-builder or the documentation.)
needs: build-image-and-test-docs

# Variables output by the build-image-and-test-docs job.
env:
REGISTRY: ${{ needs.build-image-and-test-docs.outputs.REGISTRY }}
IMAGE_NAME: ${{ needs.build-image-and-test-docs.outputs.IMAGE_NAME }}
IMAGE_TAG: ${{ needs.build-image-and-test-docs.outputs.image_tag }}

# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# This step sets up Docker Buildx, which is needed for the multi-platform build in the next step
# https://docs.docker.com/build/ci/github-actions/multi-platform/
# v3.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2

# This step uses the `docker/build-push-action` action to build the image, based on the ctsm-docs `Dockerfile`.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see [Usage](https://github.com/docker/build-push-action#usage) in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
# v6.15.0
- name: Push Docker image
id: push
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
with:
context: doc/ctsm-docs_container
platforms: linux/amd64,linux/arm64
push: true
load: false
tags: ${{ env.IMAGE_TAG }}
labels: ""

# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [Using artifact attestations to establish provenance for builds](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

25 changes: 25 additions & 0 deletions .github/workflows/docker-image-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Modified from https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#publishing-a-package-using-an-action (last accessed 2025-05-09)
name: Test building ctsm-docs Docker image and using it to build the docs

# Configures this workflow to run every time a change in the Docker container setup is pushed to the master branch
on:
push:
paths:
- 'doc/ctsm-docs_container/**'
- '.github/workflows/docker-image-ctsm-docs-build.yml'
- '.github/workflows/docker-image-build-common.yml'

pull_request:
paths:
- 'doc/ctsm-docs_container/**'
- '.github/workflows/docker-image-ctsm-docs-build.yml'
- '.github/workflows/docker-image-build-common.yml'

workflow_dispatch:

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-image-and-test-docs:
name: Build image and test docs
uses: ./.github/workflows/docker-image-common.yml
secrets: inherit
83 changes: 83 additions & 0 deletions .github/workflows/docker-image-common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Workflow used by docker-image workflows

on:
workflow_call:
outputs:
REGISTRY:
description: "Container registry"
value: ${{ jobs.build-image-and-test-docs.outputs.REGISTRY }}
IMAGE_NAME:
description: "Docker image name"
value: ${{ jobs.build-image-and-test-docs.outputs.IMAGE_NAME }}
image_tag:
description: "First image tag"
value: ${{ jobs.build-image-and-test-docs.outputs.image_tag }}

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/ctsm-docs

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-image-and-test-docs:
runs-on: ubuntu-latest
# Variables that might be needed by the calling workflow
outputs:
REGISTRY: ${{ env.REGISTRY }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}
image_tag: ${{ steps.set-image-tag.outputs.IMAGE_TAG }}
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:

- name: Checkout repository
uses: actions/checkout@v4

# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# This step uses the `docker/build-push-action` action to build the image, based on the ctsm-docs `Dockerfile`.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see [Usage](https://github.com/docker/build-push-action#usage) in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
# v6.15.0
- name: Build Docker image
id: build-image
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
with:
context: doc/ctsm-docs_container
push: false
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# Try building our docs using the new container
- name: Checkout doc-builder external
run: |
bin/git-fleximod update doc-builder
- name: Set image tag for docs build
id: set-image-tag
run: |
echo "IMAGE_TAG=$(echo '${{ steps.meta.outputs.tags }}' | cut -d',' -f1)" >> $GITHUB_ENV
echo "IMAGE_TAG=$(echo '${{ steps.meta.outputs.tags }}' | cut -d',' -f1)" >> $GITHUB_OUTPUT
- name: Build docs using container
id: build-docs
run: |
cd doc && ./build_docs -b ${PWD}/_build -c -d -i $IMAGE_TAG
78 changes: 78 additions & 0 deletions .github/workflows/docs-common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Jobs shared by docs workflows

on:
workflow_call:
inputs:
use_conda:
required: false
type: boolean
default: false
conda_env_file:
required: false
type: string
default: ""
conda_env_name:
required: false
type: string
default: ""
secrets: {}

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

- name: Checkout doc-builder external
run: |
bin/git-fleximod update doc-builder

# Do this if not using conda
# Based on https://github.com/actions/cache/blob/main/examples.md#python---pip
- name: Install python
if: ${{ ! inputs.use_conda }}
uses: actions/setup-python@v2
with:
python-version: '3.13.2' # needs to be coordinated with version in python/conda_env_ctsm_py.txt
- name: Cache pip
if: ${{ ! inputs.use_conda }}
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('doc/ctsm-docs_container/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python requirements
if: ${{ ! inputs.use_conda }}
run: |
pip install -r doc/ctsm-docs_container/requirements.txt

# Do this if using conda
- name: Set up conda environment
if: ${{ inputs.use_conda }}
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: ${{ inputs.conda_env_name }}
environment-file: ${{ inputs.conda_env_file }}
channels: conda-forge
auto-activate-base: false

- name: Build Sphinx docs with makefile
run: |
if ${{ inputs.use_conda }}; then
conda run -n ${{ inputs.conda_env_name }} make SPHINXOPTS="-W --keep-going" BUILDDIR=${PWD}/_build -C doc/ html
else
make SPHINXOPTS="-W --keep-going" BUILDDIR=${PWD}/_build -C doc/ html
fi

- name: Build Sphinx docs with doc-builder
if: success() || failure()
run: |
if ${{ inputs.use_conda }}; then
cd doc && conda run -n ${{ inputs.conda_env_name }} ./build_docs -b ${PWD}/_build -c
else
cd doc && ./build_docs -b ${PWD}/_build -c
fi
6 changes: 6 additions & 0 deletions .github/workflows/docs-ctsm_pylib.issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Scheduled ctsm_pylib docs build test failed
assignees: samsrabin
labels: bug, next
---
{{ date }}: A failure occurred during the most recent run of the `test-build-docs-ctsm_pylib` job in `.github/workflows/docs-ctsm_pylib.yml`.
49 changes: 49 additions & 0 deletions .github/workflows/docs-ctsm_pylib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test building docs with ctsm_pylib

on:
push:
paths:
- 'python/conda_env_ctsm_py.txt'

pull_request:
paths:
- 'python/conda_env_ctsm_py.txt'

schedule:
# 8 am every Monday UTC
- cron: '0 8 * * 1'

workflow_dispatch:

permissions:
contents: read
jobs:
test-build-docs-ctsm_pylib:
if: ${{ always() }}
name: With ctsm_pylib
uses: ./.github/workflows/docs-common.yml
with:
use_conda: true
conda_env_file: python/conda_env_ctsm_py.yml
conda_env_name: ctsm_pylib

# File an issue if the docs build failed during a scheduled run
file-issue-on-failure:
if: |
failure() &&
github.event_name == 'schedule'
needs: test-build-docs-ctsm_pylib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Create issue
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/workflows/docs-ctsm_pylib.issue_template.md
update_existing: true
search_existing: open


42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test building docs when they're updated
# Does not include a test of building docs with ctsm_pylib; that's in a different Workflow because we only want it to run when ctsm_pylib is updated.

on:
push:
paths:
- 'doc/**'

pull_request:
paths:
- 'doc/**'

workflow_dispatch:

permissions:
contents: read
jobs:

test-build-docs:
if: ${{ always() }}
name: Without ctsm_pylib or container
uses: ./.github/workflows/docs-common.yml
with:
use_conda: false

test-build-docs-container:
if: ${{ always() }}
name: With container from registry
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout doc-builder external
run: |
bin/git-fleximod update doc-builder

- name: Build docs using container
id: build-docs
run: |
cd doc && ./build_docs -b ${PWD}/_build -c -d
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,7 @@ core.*
*.log !run.log
*.pyc
Depends

# Docs build output
_build*/

Loading
Loading