Merge pull request #1061 from ericvw/ci-linux-ubuntu-latest

ci: Use ubuntu-latest for CI on Linux
This commit is contained in:
Takatoshi Kondo
2023-04-12 12:03:25 +09:00
committed by GitHub
2 changed files with 12 additions and 26 deletions

View File

@@ -66,7 +66,7 @@ jobs:
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}" GTEST_ROOT="${BASE}/usr" CFLAGS="-Werror -g -fsanitize=undefined -fno-sanitize-recover=all" CXXFLAGS="-Werror -g -ggdb3 -fsanitize=undefined -fno-sanitize-recover=all" ${ACTION}
linux: linux:
runs-on: ubuntu-18.04 runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -76,7 +76,7 @@ jobs:
- name: install build depends - name: install build depends
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install g++-multilib clang-8 valgrind sudo apt-get install g++-multilib clang valgrind
- name: build and test - name: build and test
shell: bash shell: bash
run: | run: |
@@ -161,17 +161,12 @@ jobs:
fi fi
# install gtest # install gtest
wget https://github.com/google/googletest/archive/release-1.7.0.zip -O googletest-release-1.7.0.zip wget https://github.com/google/googletest/archive/v1.13.0.zip -O googletest-1.13.0.zip
unzip -q googletest-release-1.7.0.zip unzip -q googletest-1.13.0.zip
cd googletest-release-1.7.0 cd googletest-1.13.0
$CXX -m${ARCH} src/gtest-all.cc -I. -Iinclude -c -fPIC cmake -S . -DCMAKE_CXX_FLAGS="-m$ARCH" --install-prefix="$BASE/usr"
$CXX -m${ARCH} src/gtest_main.cc -I. -Iinclude -c -fPIC cmake --build . --verbose
ar -rv libgtest.a gtest-all.o cmake --install . --verbose
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 .. cd ..
# install zlib # install zlib
@@ -180,7 +175,7 @@ jobs:
fi fi
# build and test # 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}" GTEST_ROOT="${BASE}/usr" CFLAGS="-Werror -g -gdwarf-4 -fsanitize=undefined -fno-sanitize-recover=all" CXXFLAGS="-Werror -g -ggdb3 -gdwarf-4 -fsanitize=undefined -fno-sanitize-recover=all" ${ACTION}
windows: windows:
runs-on: windows-2019 runs-on: windows-2019

View File

@@ -33,7 +33,7 @@ then
exit $ret exit $ret
fi fi
make make VERBOSE=1
ret=$? ret=$?
if [ $ret -ne 0 ] if [ $ret -ne 0 ]
@@ -60,17 +60,8 @@ fi
if [ "${ARCH}" != "32" ] && [ `uname` = "Linux" ] if [ "${ARCH}" != "32" ] && [ `uname` = "Linux" ]
then then
ctest -T memcheck | tee memcheck.log if ! ctest -T memcheck; then
find Testing/Temporary -name "MemoryChecker.*.log" -exec cat {} +
ret=${PIPESTATUS[0]}
if [ $ret -ne 0 ]
then
exit $ret
fi
cat memcheck.log | grep "Memory Leak" > /dev/null
ret=$?
if [ $ret -eq 0 ]
then
exit 1 exit 1
fi fi
fi fi