-
Notifications
You must be signed in to change notification settings - Fork 2
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 #34 from ess-dmsc/33_flush_log_messages
Flush log messages and other improvements
- Loading branch information
Showing
46 changed files
with
1,189 additions
and
415 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 |
---|---|---|
|
@@ -58,7 +58,7 @@ builders = pipeline_builder.createBuilders { container -> | |
container.sh """ | ||
cd build | ||
. ./activate_run.sh | ||
make VERBOSE=1 all > ${container.key}-build.log | ||
make all unit_tests > ${container.key}-build.log | ||
""" | ||
container.copyFrom("build/${container.key}-build.log", "${container.key}-build.log") | ||
archiveArtifacts "${container.key}-build.log" | ||
|
@@ -78,14 +78,50 @@ builders = pipeline_builder.createBuilders { container -> | |
} // if | ||
|
||
if (container.key == clangformat_os) { | ||
pipeline_builder.stage("${container.key}: check formatting") { | ||
container.sh """ | ||
clang-format -version | ||
cd ${pipeline_builder.project} | ||
find . \\\\( -name '*.cpp' -or -name '*.cxx' -or -name '*.h' -or -name '*.hpp' \\\\) \\ | ||
-exec clangformatdiff.sh {} + | ||
""" | ||
} // stage | ||
pipeline_builder.stage("${container.key}: Formatting") { | ||
if (!env.CHANGE_ID) { | ||
// Ignore non-PRs | ||
return | ||
} | ||
try { | ||
// Do clang-format of C++ files | ||
container.sh """ | ||
clang-format -version | ||
cd ${project} | ||
find . \\\\( -name '*.cpp' -or -name '*.cxx' -or -name '*.h' -or -name '*.hpp' \\\\) \\ | ||
-exec clang-format -i {} + | ||
git config user.email '[email protected]' | ||
git config user.name 'cow-bot' | ||
git status -s | ||
git add -u | ||
git commit -m 'GO FORMAT YOURSELF (clang-format)' | ||
""" | ||
} catch (e) { | ||
// Okay to fail as there could be no badly formatted files to commit | ||
} finally { | ||
// Clean up | ||
} | ||
|
||
// Push any changes resulting from formatting | ||
try { | ||
withCredentials([ | ||
usernamePassword( | ||
credentialsId: 'cow-bot-username', | ||
usernameVariable: 'USERNAME', | ||
passwordVariable: 'PASSWORD' | ||
) | ||
]) { | ||
container.sh """ | ||
cd ${project} | ||
git push https://${USERNAME}:${PASSWORD}@github.com/ess-dmsc/${pipeline_builder.project}.git HEAD:${CHANGE_BRANCH} | ||
""" | ||
} // withCredentials | ||
} catch (e) { | ||
// Okay to fail; there may be nothing to push | ||
} finally { | ||
// Clean up | ||
} | ||
} // stage | ||
|
||
pipeline_builder.stage("${container.key}: cppcheck") { | ||
def test_output = "cppcheck.txt" | ||
|
@@ -160,7 +196,7 @@ def get_macos_pipeline() | |
} | ||
|
||
try { | ||
sh "source activate_run.sh && make all" | ||
sh "source activate_run.sh && make all unit_tests" | ||
sh "source activate_run.sh && ./unit_tests/unit_tests" | ||
} catch (e) { | ||
failure_function(e, 'MacOSX / build+test failed') | ||
|
@@ -201,7 +237,7 @@ def get_win10_pipeline() { | |
stage("win10: Build") { | ||
bat """cd _build | ||
cmake .. -G \"Visual Studio 15 2017 Win64\" -DCMAKE_BUILD_TYPE=Release -DCONAN=MANUAL -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE | ||
cmake --build . --config Release | ||
cmake --build . --target unit_tests --config Release | ||
""" | ||
} // stage | ||
|
||
|
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 |
---|---|---|
@@ -1,10 +1,7 @@ | ||
# To do | ||
The items in the following list is in no particular order. Suggestions and/or patches are welcome. | ||
|
||
* Improved threading model | ||
* Performance testing and improvements | ||
* Version number from git tag | ||
* Log file rotation | ||
* UDP Messages | ||
* Integrate the fmt library? | ||
* Add example logging macros |
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,24 @@ | ||
find_path(ConcurrentQueue_INCLUDE_DIR | ||
NAMES concurrentqueue/concurrentqueue.h | ||
PATHS /usr/local/include/ /opt/local/include/ | ||
) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(ConcurrentQueue FOUND_VAR ConcurrentQueue_FOUND REQUIRED_VARS | ||
ConcurrentQueue_INCLUDE_DIR | ||
) | ||
|
||
mark_as_advanced( | ||
ConcurrentQueue_INCLUDE_DIR | ||
) | ||
|
||
if(ConcurrentQueue_FOUND) | ||
set(ConcurrentQueue_INCLUDE_DIRS ${ConcurrentQueue_INCLUDE_DIR}) | ||
endif() | ||
|
||
if(ConcurrentQueue_FOUND AND NOT TARGET ConcurrentQueue::ConcurrentQueue) | ||
add_library(ConcurrentQueue::ConcurrentQueue INTERFACE IMPORTED) | ||
set_target_properties(ConcurrentQueue::ConcurrentQueue PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${ConcurrentQueue_INCLUDE_DIR}" | ||
) | ||
endif() |
Oops, something went wrong.