-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2867 from robkooper/release/1.7.2
Release/1.7.2
- Loading branch information
Showing
1,440 changed files
with
68,934 additions
and
22,439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: renderbook | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
tags: | ||
- '*' | ||
|
||
pull_request: | ||
|
||
jobs: | ||
bookdown: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
container: | ||
image: pecan/depends:R4.0.3 | ||
|
||
steps: | ||
# checkout source code | ||
- uses: actions/checkout@v2 | ||
# install rmarkdown | ||
- name: Install rmarkdown | ||
run: | | ||
Rscript -e 'install.packages(c("rmarkdown","bookdown"))' | ||
# copy files | ||
- name: copy extfiles | ||
run: | | ||
mkdir -p book_source/extfiles | ||
cp -f documentation/tutorials/01_Demo_Basic_Run/extfiles/* book_source/extfiles | ||
# compile PEcAn code | ||
- name: build | ||
run: make -j1 | ||
# render book | ||
- name: Render Book | ||
run: | | ||
cd book_source | ||
Rscript -e 'options(bookdown.render.file_scope=FALSE); bookdown::render_book("index.Rmd", "bookdown::gitbook")' | ||
# save artifact | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: pecan-documentation | ||
path: book_source/_book/ | ||
# download documentation repo | ||
- name: Checkout documentation repo | ||
if: github.event_name != 'pull_request' | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository_owner }}/pecan-documentation | ||
path: pecan-documentation | ||
token: ${{ secrets.GH_PAT }} | ||
# upload new documentation | ||
- name: publish to github | ||
if: github.event_name != 'pull_request' | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Documentation Robot" | ||
export VERSION=${GITHUB_REF##*/} | ||
cd pecan-documentation | ||
mkdir -p $VERSION | ||
rsync -a --delete ../book_source/_book/ ${VERSION}/ | ||
git add --all * | ||
git commit -m "Build book from pecan revision ${GITHUB_SHA}" || true | ||
git push -q origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,223 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
tags: | ||
- '*' | ||
|
||
pull_request: | ||
|
||
issue_comment: | ||
types: | ||
- created | ||
|
||
env: | ||
R_LIBS_USER: /usr/local/lib/R/site-library | ||
LC_ALL: en_US.UTF-8 | ||
NCPUS: 2 | ||
PGHOST: postgres | ||
CI: true | ||
|
||
jobs: | ||
|
||
# ---------------------------------------------------------------------- | ||
# R BUILD | ||
# ---------------------------------------------------------------------- | ||
build: | ||
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build') | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
R: | ||
- "4.0.3" | ||
- "4.0.4" | ||
|
||
container: | ||
image: pecan/depends:R${{ matrix.R }} | ||
|
||
steps: | ||
# checkout source code | ||
- uses: actions/checkout@v2 | ||
|
||
# install additional tools needed | ||
- name: install utils | ||
run: apt-get update && apt-get install -y postgresql-client qpdf curl | ||
|
||
# check dependencies | ||
- name: update dependency lists | ||
run: Rscript scripts/generate_dependencies.R | ||
- name: check for out-of-date dependencies files | ||
uses: infotroph/tree-is-clean@v1 | ||
- name: install newly-added dependencies | ||
run: Rscript docker/depends/pecan.depends.R | ||
|
||
# compile PEcAn code | ||
- name: build | ||
run: make -j1 | ||
- name: check for out-of-date files | ||
uses: infotroph/tree-is-clean@v1 | ||
|
||
# ---------------------------------------------------------------------- | ||
# R TEST | ||
# ---------------------------------------------------------------------- | ||
test: | ||
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build') | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
R: | ||
- "4.0.3" | ||
- "4.0.4" | ||
|
||
services: | ||
postgres: | ||
image: mdillon/postgis:9.5 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
container: | ||
image: pecan/depends:R${{ matrix.R }} | ||
|
||
steps: | ||
# checkout source code | ||
- uses: actions/checkout@v2 | ||
|
||
# install additional tools needed | ||
- name: install utils | ||
run: apt-get update && apt-get install -y postgresql-client qpdf | ||
- name: install new dependencies | ||
run: Rscript scripts/generate_dependencies.R && Rscript docker/depends/pecan.depends.R | ||
|
||
# initialize database | ||
- name: db setup | ||
uses: docker://pecan/db:ci | ||
- name: add models to db | ||
run: ./scripts/add.models.sh | ||
|
||
# run PEcAn tests | ||
- name: test | ||
run: make -j1 test | ||
- name: check for out-of-date files | ||
uses: infotroph/tree-is-clean@v1 | ||
|
||
# ---------------------------------------------------------------------- | ||
# R CHECK | ||
# ---------------------------------------------------------------------- | ||
check: | ||
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build') | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
R: | ||
- "4.0.3" | ||
- "4.0.4" | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
_R_CHECK_LENGTH_1_CONDITION_: true | ||
_R_CHECK_LENGTH_1_LOGIC2_: true | ||
# Avoid compilation check warnings that come from the system Makevars | ||
# See https://stat.ethz.ch/pipermail/r-package-devel/2019q2/003898.html | ||
_R_CHECK_COMPILATION_FLAGS_KNOWN_: -Wformat -Werror=format-security -Wdate-time | ||
# Keep R checks from trying to consult the very flaky worldclockapi.com | ||
_R_CHECK_SYSTEM_CLOCK_: 0 | ||
|
||
container: | ||
image: pecan/depends:R${{ matrix.R }} | ||
|
||
steps: | ||
# checkout source code | ||
- uses: actions/checkout@v2 | ||
|
||
# install additional tools needed | ||
- name: install utils | ||
run: apt-get update && apt-get install -y postgresql-client qpdf | ||
- name: install new dependencies | ||
run: Rscript scripts/generate_dependencies.R && Rscript docker/depends/pecan.depends.R | ||
# need processx > 3.5.2 to avoid cryptic errors from | ||
# https://github.com/r-lib/rcmdcheck/issues/140 | ||
# Remove when https://github.com/r-lib/processx/pull/299 reaches CRAN | ||
- name: update processx | ||
run: Rscript -e 'devtools::install_github("r-lib/processx")' | ||
|
||
# run PEcAn checks | ||
- name: check | ||
run: make -j1 check | ||
env: | ||
REBUILD_DOCS: "FALSE" | ||
RUN_TESTS: "FALSE" | ||
- name: check for out-of-date files | ||
uses: infotroph/tree-is-clean@v1 | ||
|
||
|
||
# ---------------------------------------------------------------------- | ||
# SIPNET TESTS | ||
# ---------------------------------------------------------------------- | ||
sipnet: | ||
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build') | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
R: | ||
- "4.0.3" | ||
- "4.0.4" | ||
|
||
services: | ||
postgres: | ||
image: mdillon/postgis:9.5 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
container: | ||
image: pecan/depends:R${{ matrix.R }} | ||
|
||
steps: | ||
# checkout source code | ||
- uses: actions/checkout@v2 | ||
|
||
# install additional tools needed | ||
- name: install utils | ||
run: apt-get update && apt-get install -y postgresql-client qpdf | ||
- name: install new dependencies | ||
run: Rscript scripts/generate_dependencies.R && Rscript docker/depends/pecan.depends.R | ||
|
||
# initialize database | ||
- name: db setup | ||
uses: docker://pecan/db:ci | ||
- name: add models to db | ||
run: ./scripts/add.models.sh | ||
|
||
# install sipnet | ||
- name: Check out SIPNET | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: PecanProject/sipnet | ||
path: sipnet | ||
- name: install sipnet | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/sipnet | ||
make | ||
# compile PEcAn code | ||
- name: build | ||
run: make -j1 | ||
|
||
# run SIPNET test | ||
- name: integration test | ||
run: ./tests/integration.sh ghaction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Docker Depends Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
|
||
# this runs on the develop branch | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
env: | ||
# official supported version of R | ||
SUPPORTED: 4.0.3 | ||
DOCKERHUB_ORG: pecan | ||
|
||
jobs: | ||
depends: | ||
if: github.repository == 'PecanProject/pecan' | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
R: | ||
- "4.0.3" | ||
- "4.0.4" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# calculate some variables that are used later | ||
- name: github branch | ||
run: | | ||
BRANCH=${GITHUB_REF##*/} | ||
echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV | ||
tags="R${{ matrix.R }}" | ||
if [ "${{ matrix.R }}" == "${{ env.SUPPORTED }}" ]; then | ||
if [ "$BRANCH" == "master" ]; then | ||
tags="${tags},latest" | ||
elif [ "$BRANCH" == "develop" ]; then | ||
tags="${tags},develop" | ||
fi | ||
fi | ||
echo "TAG=${tags}" >> $GITHUB_ENV | ||
# this will publish to the actor (person) github packages | ||
- name: Publish to GitHub | ||
uses: elgohr/[email protected] | ||
env: | ||
R_VERSION: ${{ matrix.R }} | ||
with: | ||
name: ${{ github.repository_owner }}/pecan/depends | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
context: docker/depends | ||
tags: "${{ env.TAG }}" | ||
registry: docker.pkg.github.com | ||
buildargs: R_VERSION | ||
|
||
# this will publish to the clowder dockerhub repo | ||
- name: Publish to Docker Hub | ||
uses: elgohr/[email protected] | ||
env: | ||
R_VERSION: ${{ matrix.R }} | ||
with: | ||
name: ${{ env.DOCKERHUB_ORG }}/depends | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
context: docker/depends | ||
tags: "${{ env.TAG }}" | ||
buildargs: R_VERSION |
Oops, something went wrong.