Skip to content

Commit

Permalink
ADd
Browse files Browse the repository at this point in the history
  • Loading branch information
allgandalf committed Jul 11, 2023
1 parent 76e252f commit 3a65406
Showing 1 changed file with 6 additions and 118 deletions.
124 changes: 6 additions & 118 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ on:
branches:
- master
- develop
- optimiseCI

tags:
- '*'

pull_request:

pull_request:

merge_group:

Expand Down Expand Up @@ -83,70 +84,14 @@ jobs:
# ----------------------------------------------------------------------
# R CHECK
# ----------------------------------------------------------------------
check_base:
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build')
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
R:
- "4.0"
- "4.1"

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
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
with:
set-safe-directory: false

# Forbid spaces in names. Yes, *we* know it's not 1980 anymore, but Make doesn't.
- name: check for filenames that would confuse Make
run: |
SPACENAMES=`find . -name '* *'`
if [ -n "$SPACENAMES" ]; then
echo "::error file=${SPACENAMES}::Spaces in filename(s): ${SPACENAMES}. Please rename these files by converting spaces to underscores."
exit 1
fi
# 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

# run PEcAn checks
- name: check
run: make -j1 check_base
env:
REBUILD_DOCS: "FALSE"
RUN_TESTS: "FALSE"

- name: check for out-of-date files
uses: infotroph/tree-is-clean@v1

check_modules:
check:
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build')
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
package: [check_base, check_modules, check_models]
R:
- "4.0"
- "4.1"
Expand Down Expand Up @@ -189,71 +134,14 @@ jobs:

# run PEcAn checks
- name: check
run: make -j1 check_modules
run: make -j1 ${{ matrix.package }}
env:
REBUILD_DOCS: "FALSE"
RUN_TESTS: "FALSE"

- name: check for out-of-date files
uses: infotroph/tree-is-clean@v1

check_models:
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build')
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
R:
- "4.0"
- "4.1"

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
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
with:
set-safe-directory: false

# Forbid spaces in names. Yes, *we* know it's not 1980 anymore, but Make doesn't.
- name: check for filenames that would confuse Make
run: |
SPACENAMES=`find . -name '* *'`
if [ -n "$SPACENAMES" ]; then
echo "::error file=${SPACENAMES}::Spaces in filename(s): ${SPACENAMES}. Please rename these files by converting spaces to underscores."
exit 1
fi
# 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

# run PEcAn checks
- name: check
run: make -j1 check_models
env:
REBUILD_DOCS: "FALSE"
RUN_TESTS: "FALSE"
- name: check for out-of-date files
uses: infotroph/tree-is-clean@v1


# ----------------------------------------------------------------------
# SIPNET TESTS
# ----------------------------------------------------------------------
Expand Down

0 comments on commit 3a65406

Please sign in to comment.