From 0587fa801801d9174cebf562f05b76e7b5277946 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 14 Jun 2021 21:10:36 -0600 Subject: [PATCH] Create github action CI to replace travis CI. + Add workflows for autodoc, gcc+mpi, gcc+scalar, style checker, llvm+mpi, and clang-tidy. + Continue using existing Docker containers. + Add codecov instructions. + Remove travis yaml file. --- .github/workflows/ci-autodoc.yml | 56 ++++++++++++++ .github/workflows/ci-clang-tidy.yml | 56 ++++++++++++++ .github/workflows/ci-gcc-mpi.yml | 57 ++++++++++++++ .github/workflows/ci-gcc-scalar.yml | 57 ++++++++++++++ .github/workflows/ci-llvm-mpi.yml | 55 +++++++++++++ .github/workflows/ci-style-check.yml | 50 ++++++++++++ .travis.yml | 112 --------------------------- tools/check_style.sh | 6 +- tools/travis-run-tests.sh | 4 +- 9 files changed, 337 insertions(+), 116 deletions(-) create mode 100644 .github/workflows/ci-autodoc.yml create mode 100644 .github/workflows/ci-clang-tidy.yml create mode 100644 .github/workflows/ci-gcc-mpi.yml create mode 100644 .github/workflows/ci-gcc-scalar.yml create mode 100644 .github/workflows/ci-llvm-mpi.yml create mode 100644 .github/workflows/ci-style-check.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci-autodoc.yml b/.github/workflows/ci-autodoc.yml new file mode 100644 index 0000000000..a14fac6f0a --- /dev/null +++ b/.github/workflows/ci-autodoc.yml @@ -0,0 +1,56 @@ +name: CI autodoc + +# +# Documentation: +# - https://help.github.com/en/articles/workflow-syntax-for-github-actions +# - https://github.com/lanl/Draco/new/develop?filename=.github%2Fworkflows%2Fmain.yml&workflow_template=blank +# + +############################# +# Start the job on all push # +############################# +on: + # Triggers the workflow on push or pull request events but only for the develop branch + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + PYTHONPATH: /home/runner/work/Draco/Draco/config + +############### +# Set the Job # +############### +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + # submodules: true + + - name: Fetch Docker image for CI + uses: docker://kinetictheory/draco-ci-2020nov:style-checks +# entrypoint: '/home/runner/work/Draco/Draco/tools/travis-run-tests.sh' + + - name: Autodoc + env: + DOCKER_TAG: autodoc + AUTODOC: ON + COMPILER: GCC + DRACO_C4: MPI + WERROR: ON + run: | + echo "docker run -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c /home/travis/Draco/tools/travis-run-tests.sh" + docker run -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c '/home/travis/Draco/tools/travis-run-tests.sh' + +# cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} +# cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} +# ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/ci-clang-tidy.yml b/.github/workflows/ci-clang-tidy.yml new file mode 100644 index 0000000000..61bc9194ea --- /dev/null +++ b/.github/workflows/ci-clang-tidy.yml @@ -0,0 +1,56 @@ +name: CI clang-tidy + +# +# Documentation: +# - https://help.github.com/en/articles/workflow-syntax-for-github-actions +# - https://github.com/lanl/Draco/new/develop?filename=.github%2Fworkflows%2Fmain.yml&workflow_template=blank +# + +############################# +# Start the job on all push # +############################# +on: + # Triggers the workflow on push or pull request events but only for the develop branch + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + PYTHONPATH: /home/runner/work/Draco/Draco/config + +############### +# Set the Job # +############### +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + # submodules: true + + - name: Fetch Docker image for CI + uses: docker://kinetictheory/draco-ci-2020nov:style-checks +# entrypoint: '/home/runner/work/Draco/Draco/tools/travis-run-tests.sh' + + - name: clang-tidy + env: + DOCKER_TAG: spack-llvm + CLANGTIDY: ON + COMPILER: LLVM + DRACO_C4: MPI + WERROR: ON + run: | + echo "docker run -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c /home/travis/Draco/tools/travis-run-tests.sh" + docker run -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c '/home/travis/Draco/tools/travis-run-tests.sh' + +# cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} +# cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} +# ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/ci-gcc-mpi.yml b/.github/workflows/ci-gcc-mpi.yml new file mode 100644 index 0000000000..8ce242cce0 --- /dev/null +++ b/.github/workflows/ci-gcc-mpi.yml @@ -0,0 +1,57 @@ +name: CI gcc mpi + +# +# Documentation: +# - https://help.github.com/en/articles/workflow-syntax-for-github-actions +# - https://github.com/lanl/Draco/new/develop?filename=.github%2Fworkflows%2Fmain.yml&workflow_template=blank +# + +############################# +# Start the job on all push # +############################# +on: + # Triggers the workflow on push or pull request events but only for the develop branch + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + PYTHONPATH: /home/runner/work/Draco/Draco/config + +############### +# Set the Job # +############### +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + # submodules: true + + - name: Fetch Docker image for CI + uses: docker://kinetictheory/draco-ci-2020nov:style-checks +# entrypoint: '/home/runner/work/Draco/Draco/tools/travis-run-tests.sh' + + - name: Gcc-mpi + env: + DOCKER_TAG: spack-gcc + COMPILER: GCC + COVERAGE: ON + DRACO_C4: MPI + WERROR: ON + run: | + if [[ ${COVERAGE:-OFF} == "ON" ]]; then ci_env=`/bin/bash <(curl -s https://codecov.io/env)`; fi + echo "docker run ${ci_env} -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c /home/travis/Draco/tools/travis-run-tests.sh" + docker run ${ci_env} -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c '/home/travis/Draco/tools/travis-run-tests.sh' + +# cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} +# cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} +# ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/ci-gcc-scalar.yml b/.github/workflows/ci-gcc-scalar.yml new file mode 100644 index 0000000000..25a6758181 --- /dev/null +++ b/.github/workflows/ci-gcc-scalar.yml @@ -0,0 +1,57 @@ +name: CI gcc scalar + +# +# Documentation: +# - https://help.github.com/en/articles/workflow-syntax-for-github-actions +# - https://github.com/lanl/Draco/new/develop?filename=.github%2Fworkflows%2Fmain.yml&workflow_template=blank +# + +############################# +# Start the job on all push # +############################# +on: + # Triggers the workflow on push or pull request events but only for the develop branch + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + PYTHONPATH: /home/runner/work/Draco/Draco/config + +############### +# Set the Job # +############### +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + # submodules: true + + - name: Fetch Docker image for CI + uses: docker://kinetictheory/draco-ci-2020nov:style-checks +# entrypoint: '/home/runner/work/Draco/Draco/tools/travis-run-tests.sh' + + - name: Gcc-scalar + env: + DOCKER_TAG: spack-gcc + COMPILER: GCC + COVERAGE: ON + DRACO_C4: SCALAR + WERROR: ON + run: | + if [[ ${COVERAGE:-OFF} == "ON" ]]; then ci_env=`/bin/bash <(curl -s https://codecov.io/env)`; fi + echo "docker run ${ci_env} -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c /home/travis/Draco/tools/travis-run-tests.sh" + docker run ${ci_env} -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c '/home/travis/Draco/tools/travis-run-tests.sh' + +# cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} +# cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} +# ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/ci-llvm-mpi.yml b/.github/workflows/ci-llvm-mpi.yml new file mode 100644 index 0000000000..c4f9b9e47b --- /dev/null +++ b/.github/workflows/ci-llvm-mpi.yml @@ -0,0 +1,55 @@ +name: CI llvm mpi + +# +# Documentation: +# - https://help.github.com/en/articles/workflow-syntax-for-github-actions +# - https://github.com/lanl/Draco/new/develop?filename=.github%2Fworkflows%2Fmain.yml&workflow_template=blank +# + +############################# +# Start the job on all push # +############################# +on: + # Triggers the workflow on push or pull request events but only for the develop branch + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + PYTHONPATH: /home/runner/work/Draco/Draco/config + +############### +# Set the Job # +############### +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + # submodules: true + + - name: Fetch Docker image for CI + uses: docker://kinetictheory/draco-ci-2020nov:style-checks +# entrypoint: '/home/runner/work/Draco/Draco/tools/travis-run-tests.sh' + + - name: llvm-mpi + env: + DOCKER_TAG: spack-llvm + COMPILER: LLVM + DRACO_C4: MPI + WERROR: ON + run: | + echo "docker run -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c /home/travis/Draco/tools/travis-run-tests.sh" + docker run -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c '/home/travis/Draco/tools/travis-run-tests.sh' + +# cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} +# cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} +# ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/ci-style-check.yml b/.github/workflows/ci-style-check.yml new file mode 100644 index 0000000000..fdb2b399ca --- /dev/null +++ b/.github/workflows/ci-style-check.yml @@ -0,0 +1,50 @@ +name: CI Style Check + +# +# Documentation: +# - https://help.github.com/en/articles/workflow-syntax-for-github-actions +# - https://github.com/lanl/Draco/new/develop?filename=.github%2Fworkflows%2Fmain.yml&workflow_template=blank +# + +############################# +# Start the job on all push # +############################# +on: + # Triggers the workflow on push or pull request events but only for the develop branch + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + PYTHONPATH: /home/runner/work/Draco/Draco/config + +############### +# Set the Job # +############### +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + # submodules: true + + - name: Fetch Docker image for CI + uses: docker://kinetictheory/draco-ci-2020nov:style-checks +# entrypoint: '/home/runner/work/Draco/Draco/tools/travis-run-tests.sh' + + - name: Style Checker + env: + DOCKER_TAG: style-checks + COMPILER: GCC + STYLE: ON + run: | + echo "docker run -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c /home/travis/Draco/tools/travis-run-tests.sh" + docker run -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=${COMPILER} -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c '/home/travis/Draco/tools/travis-run-tests.sh' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index be59aecbe4..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,112 +0,0 @@ -#--------------------------------------------------------------------------------------------------# -# File: .travis.yml -# Author: Kelly Thompson -# Date: Friday, Jul 13, 2018, 07:41 am -# Purpose: Instructions for Travis continuous integration testing on GitHub. This script wil be run -# to test pull requests -# Note: Copyright (C) 2018-2020 Triad National Security, LLC., All rights reserved. -#--------------------------------------------------------------------------------------------------# - -language: cpp -sudo: required -services: - - docker - -#--------------------------------------------------------------------------------------------------# -# Notes: Build docker container before running this script: -# -# 1. cd to directory contataining Dockerfile. -# 2. Build the docker container. This can take an hour or more. If you are starting from scratch, -# you will need to change the first line of the Dockerfile so that it starts from 'ubuntu' -# instead of 'draco-travis-ci' -# -# docker build --rm --pull --tag draco-travis-ci:latest . -# -# 3. Commit and upload the updated container. See more detailed notes in tools/Dockerfile. -#--------------------------------------------------------------------------------------------------# - -#--------------------------------------------------------------------------------------------------# -# Travis Environment: -# -# HOME=/home/travis -# PWD=/home/travis/build/lanl/Draco -# (starting directory for Travis, sources are here) -# -# Docker Environment: -# -# - The docker image mounts the PR sources (/home/travis/build/lanl/Draco) as /home/travis/Draco -# - The vendors are at /vendors/spack -# - Spack is already in the environment -#--------------------------------------------------------------------------------------------------# - -#branches: -# only: -# - master - -# stages: -# - name: style -# if: type = pull_request -# - name: test - -# jobs: -# fast_finish: true -# include:: -# - stage: style -# env: STYLE=ON DOCKER_TAG=style-checks -# compiler: gcc -# - stage: test -# env: WERROR=ON COVERAGE=ON DRACO_C4=SCALAR DOCKER_TAG=spack-gcc -# compiler: gcc -# - stage: test -# env: WERROR=ON COVERAGE=ON DRACO_C4=MPI DOCKER_TAG=spack-gcc -# compiler: gcc -# - stage: test -# env: WERROR=ON DRACO_C4=MPI AUTODOC=ON DOCKER_TAG=autdoc -# compiler: gcc - -# compiler: -# - gcc -# - clang - -env: - global: - - BUILD_DIR=/home/travis/Draco/build - - SOURCE_DIR=/home/travis/Draco - - T_SOURCE_DIR=/home/travis/build/lanl/Draco - - VENDOR_DIR=/vendors - matrix: - - STYLE=ON COMPILER=GCC DOCKER_TAG=style-checks - - WERROR=ON COVERAGE=ON DRACO_C4=SCALAR COMPILER=GCC DOCKER_TAG=spack-gcc - - WERROR=ON COVERAGE=ON DRACO_C4=MPI COMPILER=GCC DOCKER_TAG=spack-gcc - - WERROR=ON DRACO_C4=MPI AUTODOC=ON COMPILER=GCC DOCKER_TAG=autodoc - - WERROR=ON DRACO_C4=MPI COMPILER=LLVM DOCKER_TAG=spack-llvm - - WERROR=ON DRACO_C4=MPI COMPILER=LLVM CLANGTIDY=ON DOCKER_TAG=spack-llvm - -# matrix: -# allow_failures: -# - compiler: gcc -# env: DISTRO=ubuntu DRACO_C4=SCALAR WERROR=yes -# - compiler: gcc -# env: DISTRO=ubuntu STYLE=ON - -# Coverage with Docker - https://docs.codecov.io/docs/testing-with-docker - -#before_install: -# - pip install --upgrade --user pip -# - if [[ ${COVERAGE} ]]; then pip install --user codecov; fi - -#install: -# - travis_retry timeout 540 docker pull kinetictheory/draco-ci-2020may:${DOCKER_TAG} - -jobs: - fast_finish: true - -script: - - travis_retry timeout 540 docker pull kinetictheory/draco-ci-2020nov:${DOCKER_TAG} - - if [[ ${COVERAGE:-OFF} == "ON" ]]; then ci_env=`/bin/bash <(curl -s https://codecov.io/env)`; fi - - docker run ${ci_env} -v ${T_SOURCE_DIR}:${SOURCE_DIR} -e COMPILER=${COMPILER} -e VENDOR_DIR=${VENDOR_DIR} -e BUILD_DIR=${BUILD_DIR} -e SOURCE_DIR=${SOURCE_DIR} -e STYLE=${STYLE} -e COVERAGE=${COVERAGE} -e WERROR=${WERROR} -e DRACO_C4=${DRACO_C4} -e AUTODOC=${AUTODOC} -e CLANGTIDY=${CLANGTIDY} -e CI=${CI} -e TRAVIS=${TRAVIS} -e TRAVIS_BRANCH=${TRAVIS_BRANCH} -e CI_MERGE_REQUEST_TARGET_BRANCH_NAME=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} kinetictheory/draco-ci-2020nov:${DOCKER_TAG} /bin/bash -l -c "${SOURCE_DIR}/tools/travis-run-tests.sh" - -#--------------------------------------------------------------------------------------------------# -# See also: -# - Advanced used: https://github.com/laristra/flecsi/blob/master/.travis.yml -#--------------------------------------------------------------------------------------------------# diff --git a/tools/check_style.sh b/tools/check_style.sh index 75d7a0ee74..0df21e8e01 100755 --- a/tools/check_style.sh +++ b/tools/check_style.sh @@ -161,7 +161,7 @@ else cat "${patchfile_c}" else echo -ne " run clang-formt -i < file> to fix files, or" - echo -e " run ${0##*/} with option -f to automatically apply this patch.\n" + echo -e " run ${0##*/} with option -f to automatically apply this patch.\n" cat "${patchfile_c}" fi fi @@ -323,7 +323,7 @@ fi if [[ -x "$EMACS" ]]; then echo -ne "\n--------------------------------------------------------------------------------\n" - echo -e "Checking modified F90 code for style conformance (indentation)..\n" + echo -e "Checking modified F90 code for style conformance (indentation).\n" patchfile_f90=$(mktemp /tmp/emf90.patch.XXXXXXXX) @@ -376,7 +376,7 @@ fi #--------------------------------------------------------------------------------------------------# echo -ne "\n--------------------------------------------------------------------------------" -echo -e "Checking modified F90 code for style conformance (line length)..\n" +echo -e "\nChecking modified F90 code for style conformance (line length)..\n" tmpfile2=$(mktemp /tmp/f90-format-line-len.XXXXXXXX) diff --git a/tools/travis-run-tests.sh b/tools/travis-run-tests.sh index e87cb81fdb..03c3515c70 100755 --- a/tools/travis-run-tests.sh +++ b/tools/travis-run-tests.sh @@ -20,11 +20,13 @@ source tools/common.sh if [[ ${STYLE} ]]; then echo "checking style conformance..." + run "git branch -a" + # Return integer > 0 if 'develop' branch is found. function find_dev_branch { set -f - git branch -a | grep -c develop + git branch -a | grep -v origin | grep -c develop set +f }