Skip to content

Commit

Permalink
Try to add a gcc build.
Browse files Browse the repository at this point in the history
  • Loading branch information
KineticTheory committed Jun 15, 2021
1 parent 581dea1 commit 00f8c4c
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 18 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/ci.yml → .github/workflows/ci-gcc-scalar.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI-Style-Check
name: CI gcc scalar

#
# Documentation:
Expand Down Expand Up @@ -40,19 +40,17 @@ jobs:
uses: docker://kinetictheory/draco-ci-2020nov:style-checks
# entrypoint: '/home/runner/work/Draco/Draco/tools/travis-run-tests.sh'

- name: Style Checker
- name: Gcc-scalar
env:
STYLE: ON
DOCKER_TAG: spack-gcc
COMPILER: GCC
DOCKER_TAG: style-checks
COVERAGE: ON
DRACO_C4: SCALAR
WERROR: ON
run: |
echo "docker run -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=GCC -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e CI=${CI} kinetictheory/draco-ci-2020nov:style-checks /bin/bash -l -c /home/travis/Draco/tools/travis-run-tests.sh"
docker run -v ${GITHUB_WORKSPACE}:/home/travis/Draco -e COMPILER=GCC -e VENDOR_DIR=/vendors -e BUILD_DIR=/home/travis/Draco/build -e SOURCE_DIR=/home/travis/Draco -e STYLE=${STYLE} -e CI=${CI} kinetictheory/draco-ci-2020nov:style-checks /bin/bash -l -c '/home/travis/Draco/tools/travis-run-tests.sh'
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'
# env:
# DEFAULT_BRANCH: develop
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 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}}
65 changes: 65 additions & 0 deletions .github/workflows/ci-style-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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'
- name: Gcc-scalar
env:
DOCKER_TAG: spack-gcc
COMPILER: GCC
COVERAGE: ON
DRACO_C4: SCALAR
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}}
8 changes: 1 addition & 7 deletions tools/check_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,6 @@ patchfile_c=$(mktemp /tmp/gcf.patch.XXXXXXXX)
#echo "TRAVIS_BRANCH = $TRAVIS_BRANCH"
#echo "CI_MERGE_REQUEST_TARGET_BRANCH_NAME = $CI_MERGE_REQUEST_TARGET_BRANCH_NAME"
target_branch=develop

echo "TRAVIS_BRANCH = ${TRAVIS_BRANCH}"
echo "CI_MERGE_REQUEST_TARGET_BRANCH_NAME = ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}"
echo "GITHUB_BASE_REF = ${GITHUB_BASE_REF}"
echo "GITHUB_SHA = ${GITHUB_SHA}"

if [[ -n ${TRAVIS_BRANCH} ]]; then
target_branch=${TRAVIS_BRANCH}
elif [[ -n ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} ]]; then
Expand Down Expand Up @@ -329,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 "\nChecking modified F90 code for style conformance (indentation).\n"

patchfile_f90=$(mktemp /tmp/emf90.patch.XXXXXXXX)

Expand Down
1 change: 0 additions & 1 deletion tools/travis-run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ if [[ ${STYLE} ]]; then
# that are modified when compared to the 'develop' branch, the develop branch must be available
# locally.
num_dev_branches_found=$(find_dev_branch)
echo "num_dev_branches_found = ${num_dev_branches_found}"
if [[ $num_dev_branches_found == 0 ]]; then
echo "no develop branches found."
# Register the develop branch in draco/.git/config
Expand Down

0 comments on commit 00f8c4c

Please sign in to comment.