Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADIOS2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Podhorszki, Norbert
ADIOS2
Commits
fd940b2e
Commit
fd940b2e
authored
8 years ago
by
Atkins, Charles Vernon
Browse files
Options
Downloads
Patches
Plain Diff
Prepare the travis run to use a matrix of options
parent
03af3d68
No related branches found
No related tags found
1 merge request
!5
Prepare the travis run to use a matrix of options
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.travis.yml
+3
-3
3 additions, 3 deletions
.travis.yml
scripts/travis/run-format.sh
+35
-0
35 additions, 0 deletions
scripts/travis/run-format.sh
scripts/travis/run.sh
+19
-0
19 additions, 0 deletions
scripts/travis/run.sh
with
57 additions
and
3 deletions
.travis.yml
+
3
−
3
View file @
fd940b2e
...
...
@@ -14,8 +14,8 @@ install:
-
tar -xf cmake-3.7.1-Linux-x86_64.tar.gz
-
export PATH="${PWD}/cmake-3.7.1-Linux-x86_64/bin:${PATH}"
-
pip install --user flake8
env
:
-
BUILD_MATRIX_ENTRY=format
script
:
-
cd ${TRAVIS_BUILD_DIR}
-
scripts/travis/run-clang-format.sh
-
~/.local/bin/flake8 --config=flake8.cfg .
-
${TRAVIS_BUILD_DIR}/scripts/travis/run.sh
This diff is collapsed.
Click to expand it.
scripts/travis/run-
clang-
format.sh
→
scripts/travis/run-format.sh
+
35
−
0
View file @
fd940b2e
#!/usr/bin/env bash
if
[
-z
"
${
TRAVIS_PULL_REQUEST_BRANCH
}
"
]
if
[
-z
"
${
SOURCE_DIR
}
"
]
then
echo
"
This is only designed to run on Pull Requests
"
echo
"
Error: SOURCE_DIR is empty or undefined
"
exit
1
else
COMMIT_RANGE
=
"
${
TRAVIS_COMMIT_RANGE
/.../
}
"
fi
if
[
-z
"
${
COMMIT_RANGE
}
"
]
then
echo
"Error: COMMIT_RANGE is empty or undefined"
exit
1
fi
cd
${
SOURCE_DIR
}
#
Run
clang-format
DIFF
=
"
$(
${
TRAVIS_BUILD_DIR
}
/scripts/developer/git/git-clang-format
--diff
${
COMMIT_RANGE
}
)
"
#
Check C and C++ code with
clang-format
DIFF
=
"
$(
.
/scripts/developer/git/git-clang-format
--diff
${
COMMIT_RANGE
}
)
"
if
[
"
${
DIFF
}
"
!=
"no modified files to format"
]
then
echo
"clang-format:"
...
...
@@ -21,4 +26,10 @@ then
exit
1
fi
# Check python code with flake8
if
!
~/.local/bin/flake8
--config
=
flake8.cfg
.
then
exit
3
fi
exit
0
This diff is collapsed.
Click to expand it.
scripts/travis/run.sh
0 → 100755
+
19
−
0
View file @
fd940b2e
#!/usr/bin/env bash
export
SOURCE_DIR
=
${
TRAVIS_BUILD_DIR
}
export
BUILD_DIR
=
$(
readlink
-f
${
SOURCE_DIR
}
/..
)
export
COMMIT_RANGE
=
"
${
TRAVIS_COMMIT_RANGE
/.../
}
"
case
${
BUILD_MATRIX_ENTRY
}
in
format
)
echo
"Running formatting tests"
if
!
${
SOURCE_DIR
}
/scripts/travis/run-format.sh
;
then
exit
1
;
fi
;;
*
)
echo
"Error: BUILD_MATRIX_ENTRY is undefined or set to an unknown value"
exit
1
;
;;
esac
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment