From 5d1cb30e40210ec382db41922f25b254ab6e6d31 Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Sat, 10 Oct 2020 10:29:19 -0500 Subject: [PATCH 1/3] clang-format --- .travis_scripts/run-clang-format.py | 2 +- reformat.sh | 1 + src/test_lib_json/main.cpp | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 reformat.sh diff --git a/.travis_scripts/run-clang-format.py b/.travis_scripts/run-clang-format.py index 68179aa..605b5aa 100755 --- a/.travis_scripts/run-clang-format.py +++ b/.travis_scripts/run-clang-format.py @@ -353,4 +353,4 @@ def main(): if __name__ == '__main__': - sys.exit(main()) \ No newline at end of file + sys.exit(main()) diff --git a/reformat.sh b/reformat.sh new file mode 100644 index 0000000..cdc03b1 --- /dev/null +++ b/reformat.sh @@ -0,0 +1 @@ +find src -name '*.cpp' -or -name '*.h' | xargs clang-format -i diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 540e66b..f296923 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -3920,8 +3920,7 @@ class VersionTest : public JsonTest::TestCase {}; JSONTEST_FIXTURE_LOCAL(VersionTest, VersionNumbersMatch) { std::ostringstream vstr; - vstr << JSONCPP_VERSION_MAJOR << '.' - << JSONCPP_VERSION_MINOR << '.' + vstr << JSONCPP_VERSION_MAJOR << '.' << JSONCPP_VERSION_MINOR << '.' << JSONCPP_VERSION_PATCH; JSONTEST_ASSERT_EQUAL(vstr.str(), std::string(JSONCPP_VERSION_STRING)); } From 1664b6bbf848ef13b330ced6f0c7ba63d70805d5 Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Sat, 10 Oct 2020 09:06:43 -0500 Subject: [PATCH 2/3] Try meson/ninja from pypi This lets us simplify linux a little. However, we still want to test cmake, so there is only so much we can simplify. For OSX, we still need `clang-format` from homebrew. * Add PYTHONUSERBASE/bin to PATH for linux --- .travis.yml | 2 ++ .travis_scripts/travis.before_install.osx.sh | 1 - .travis_scripts/travis.install.linux.sh | 11 +++-------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0554dc9..1e1e179 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,6 +44,8 @@ matrix: CC="clang" LIB_TYPE=static BUILD_TYPE=release + PYTHONUSERBASE="$(pwd)/LOCAL" + PATH="$PYTHONUSERBASE/bin:$PATH" # before_install and install steps only needed for linux meson builds before_install: - source ./.travis_scripts/travis.before_install.${TRAVIS_OS_NAME}.sh diff --git a/.travis_scripts/travis.before_install.osx.sh b/.travis_scripts/travis.before_install.osx.sh index 5d83c0c..e69de29 100644 --- a/.travis_scripts/travis.before_install.osx.sh +++ b/.travis_scripts/travis.before_install.osx.sh @@ -1 +0,0 @@ -# NOTHING TO DO HERE diff --git a/.travis_scripts/travis.install.linux.sh b/.travis_scripts/travis.install.linux.sh index 7c5846f..6495fef 100644 --- a/.travis_scripts/travis.install.linux.sh +++ b/.travis_scripts/travis.install.linux.sh @@ -1,10 +1,5 @@ set -vex -wget https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip -unzip -q ninja-linux.zip -d build - -pip3 install meson -echo ${PATH} -ls /usr/local -ls /usr/local/bin -export PATH="${PWD}"/build:/usr/local/bin:/usr/bin:${PATH} +pip3 install --user meson ninja +which meson +which ninja From bb9db78fe27591afacd0df7a9b6b69bdfeec20ea Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Sat, 10 Oct 2020 11:20:19 -0500 Subject: [PATCH 3/3] Do not allow failures on osx --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1e1e179..6d7ccde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,8 +22,6 @@ addons: - clang-8 - valgrind matrix: - allow_failures: - - os: osx include: - name: Mac clang meson static release testing os: osx