From f2c1991ede1d34b04e2b2096f1755ffd7038da0c Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Fri, 26 Apr 2024 12:19:06 +0900 Subject: [PATCH 1/2] Removed invalid ctest option `r`. --- ci/build_cmake.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build_cmake.sh b/ci/build_cmake.sh index dc6b8f72..fea3d448 100755 --- a/ci/build_cmake.sh +++ b/ci/build_cmake.sh @@ -42,7 +42,7 @@ then exit $ret fi -ctest -VVr +ctest -VV ret=$? if [ $ret -ne 0 ] From b8b54a2fef48687d8391118376662df4ec6633b1 Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Fri, 26 Apr 2024 12:27:22 +0900 Subject: [PATCH 2/2] Updated gtest install methond on macos. --- .github/workflows/gha.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/gha.yml b/.github/workflows/gha.yml index a8706b1f..c13a8729 100644 --- a/.github/workflows/gha.yml +++ b/.github/workflows/gha.yml @@ -18,6 +18,9 @@ jobs: pattern: [0, 1, 2, 3] steps: - uses: actions/checkout@v1 + - name: install gtest + run: | + brew install --force googletest - name: build and test env: CC: clang @@ -48,22 +51,8 @@ jobs: export CHAR_SIGN="unsigned" fi - # install gtest - wget https://github.com/google/googletest/archive/release-1.7.0.zip -O googletest-release-1.7.0.zip - unzip -q googletest-release-1.7.0.zip - cd googletest-release-1.7.0 - $CXX -m${ARCH} src/gtest-all.cc -I. -Iinclude -c - $CXX -m${ARCH} src/gtest_main.cc -I. -Iinclude -c - ar -rv libgtest.a gtest-all.o - ar -rv libgtest_main.a gtest_main.o - mkdir -p ${BASE}/usr/include - cp -r include/gtest ${BASE}/usr/include - mkdir -p ${BASE}/usr/lib - mv *.a ${BASE}/usr/lib - cd .. - # build and test - CMAKE_CXX_COMPILER="${CXX}" CMAKE_C_COMPILER="${CC}" GTEST_ROOT="${BASE}/usr" CFLAGS="-Werror -g -fsanitize=undefined -fno-sanitize-recover=all" CXXFLAGS="-Werror -g -ggdb3 -fsanitize=undefined -fno-sanitize-recover=all" ${ACTION} + CMAKE_CXX_COMPILER="${CXX}" CMAKE_C_COMPILER="${CC}" CFLAGS="-Werror -g -fsanitize=undefined -fno-sanitize-recover=all" CXXFLAGS="-Werror -g -ggdb3 -fsanitize=undefined -fno-sanitize-recover=all" ${ACTION} linux: runs-on: ubuntu-latest