Skip to content

Add Travis CI and skeleton COMPASS docs #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
54 changes: 54 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Based on https://github.com/NOAA-ORR-ERD/gridded/blob/master/.travis.yml
language: minimal

sudo: false

notifications:
email: false

# safelist
branches:
only:
- master
- develop
- ocean/develop
- ocean/coastal
- landice/devleop

jobs:
include:
- name: "docs"
- name: "compass"
# Add new jobs, along with the corresponding travis_ci/install_<name>.bash
# and travis_ci/test_<name>.bash
#- name: "atmosphere"
#- name: "landice"
#- name: "ocean"
#- name: "seaice"
Comment on lines +24 to +27
Copy link
Collaborator Author

@xylar xylar Mar 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add more CI in the future, uncomment one of these or add a new one, then add travis_ci/install_ocean.bash, travis_ci/test_ocean.bash, etc. to set up and run whatever tests are desired. It may be possible to set, compile and run MPAS itself in Travis if we don't make the tests too big.

# The following is not needed now but could be added as the "safelist" and
# job list evolves
# exclude:
# -
# name: "compass"
# if: branch == seaice/develop OR branch == e3sm/develop

env:
global:
secure: "Ckovv5psUv9pdBVaNjsgrk0hXGJbNTi5dzLSWsNQA3Ub4hUXvzgBvX1TgS+CZvq3fkJnxV6SYZIlOkrCqqxdlUzFewDiuzzYxEZObFZ8FceWiYs4K3LMS30MPLzIYaV9ORqXJ0/P/ii62KhGIraX7ryzZ5+IG5uDOd7gumD6GiCPURFQIGpWS7MasKmEQRnokrGO3B2JjGEB0vMTdMZGbj8XY+X4Q0zcdQnjrLtG7PiuED95CrfEI7HfJ/ifPRgI4EMey6YI89DUF6hdQ1N1QxyAnxlKBDkqCvy6uowej7xPwMMZsyykr6EoAcwk9kYluVRogKe1iBMq1P4WCOOUj3c3Q9Dp885TiXlsW1aDKT2RSkx/SV5cE73vrpUhmm2Nf/wWAZktOYJSGlmRqSnjkQhDJqQSOaIQbwBfUtuGMt0Go0Q/3/qlMc7I9AjG5yBuYcY8WN98qKABP3IKjSsIFUPyo1kXCHt++oV7z1p9oBdGS54e+9rEYWixvAwvw0GvrNrbQdiq2sq8BheI4ppzeSGoneHguNDn5QyVeMu4WZ0gsCwuVW0lXiuUSlYHG5ZctX1cQySCyL3IOcpYa1a1/DKINpkwr/Z7T8oOM+UHnXDK96UJfbaG5n5+JZOfWJ6N/Em7weKuwnRiobGQfDqlyEtc1hgcLfvMnkpikENKhss="
Comment on lines +35 to +37
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lets Travis log in as me to upload the documentation to the gh-pages branch (once we create it). This capability means that we need to be careful not to merge malicious code (e.g. "bug fixes" from an unknown contributor) that could use this ability to mess up the repo. Just want to make that risk known so we're vigilant, though I think it is very unlikely.


before_install:
- |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate base
conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
conda update conda
conda config --add channels conda-forge --force
conda config --set channel_priority strict

install:
- ./travis_ci/install_${TRAVIS_JOB_NAME}.bash

script:
- ./travis_ci/test_${TRAVIS_JOB_NAME}.bash
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = mpas_model
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
37 changes: 37 additions & 0 deletions docs/compass/clean_testcase.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.. _compass_clean_testcase:

clean\_testcase.py
==================

This script is used to clean one or more test cases that have already been
setup.

It will remove directories and driver scripts that were generated as part of
setting up a test case.

Command-line options::

$ ./clean_testcase.py -h
usage: clean_testcase.py [-h] [-o CORE] [-c CONFIG] [-r RES] [-t TEST]
[-n NUM] [-q] [-a] [--work_dir PATH]

This script is used to clean one or more test cases that have already been
setup.

It will remove directories / driver scripts that were generated as part of
setting up a test case.

optional arguments:
-h, --help show this help message and exit
-o CORE, --core CORE Core that contains configurations to clean
-c CONFIG, --configuration CONFIG
Configuration to clean
-r RES, --resolution RES
Resolution of configuration to clean
-t TEST, --test TEST Test name within a resolution to clean
-n NUM, --case_number NUM
Case number to clean, as listed from list_testcases.py. Can be a comma delimited list of case numbers.
-q, --quiet If set, script will not write a command_history file
-a, --all Is set, the script will clean all test cases in the work_dir.
--work_dir PATH If set, script will clean case directories in work_dir rather than the current directory.

Loading