Skip to content

Commit

Permalink
Updated gtest install methond on macos.
Browse files Browse the repository at this point in the history
  • Loading branch information
redboltz committed Apr 26, 2024
1 parent f2c1991 commit e5180bd
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/gha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
pattern: [0, 1, 2, 3]
steps:
- uses: actions/checkout@v1
- name: install gtest
run: |
brew install --force gtest
- name: build and test
env:
CC: clang
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e5180bd

Please sign in to comment.