From: Michael Wallner Date: Mon, 5 Oct 2020 09:05:46 +0000 (+0200) Subject: testing: try clang-6.0 again, but with libc++ X-Git-Tag: 1.1.0-beta1~236^2~22^2~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=14a02f8618cb7862b9586b9b83cca22709362a17;p=m6w6%2Flibmemcached testing: try clang-6.0 again, but with libc++ --- diff --git a/.github/workflows/cmake-build-ci.gen b/.github/workflows/cmake-build-ci.gen index 310d1eda..489230fb 100755 --- a/.github/workflows/cmake-build-ci.gen +++ b/.github/workflows/cmake-build-ci.gen @@ -3,7 +3,6 @@ echo "# Generated file; do not edit!\n"; -const PRE = " "; const DEF = [ "os" => "Linux", "Linux" => "ubuntu-20.04", @@ -21,20 +20,19 @@ const DEF = [ "CXX" => "clang++", ], ]; -const APT = [ +const ENV = [ "ubuntu-20.04" => [ "gnu" => [ "new" => [ - "CC" => "gcc-10", - "CXX" => "g++-10", + "INSTALL_CC" => "gcc-10", + "INSTALL_CXX" => "g++-10", ] ] ], "ubuntu-18.04" => [ "clang" => [ "old" => [ - "CC" => "clang-7", - "CXX" => "clang-7" + "CXXFLAGS" => "-stdlib=libc++" ] ] ] @@ -72,7 +70,7 @@ const MAP = [ 'env.CC_VER' => [ "new" => "-9", "cur" => "-8", - "old" => "-7" + "old" => "-6.0" ] ] ] @@ -95,18 +93,18 @@ function steps_setenv($splat_map = null) { foreach ($cc_vers as $cc_ver => $ver) { if (!$splat_map && DEF[DEF[DEF[DEF["os"]]]]["ver"] != $cc_ver) continue; ?> - - name: Prepare environment () - if: () - run: | - echo CC= >> ${GITHUB_ENV} - echo CXX= >> ${GITHUB_ENV} + - name: Prepare environment () + if: () + run: | + echo "CC=''" >> ${GITHUB_ENV} + echo "CXX=''" >> ${GITHUB_ENV} $val) { ?> - echo INSTALL_CC='' >> ${GITHUB_ENV} - echo INSTALL_CXX='' >> ${GITHUB_ENV} + echo "=''" >> ${GITHUB_ENV}} - - name: Install dependencies (Linux) - if: runner.os == 'Linux' - run: | - sudo apt-get install \ - libevent-dev \ - libsasl2-dev \ - ${INSTALL_MEMCACHED} \ - ${INSTALL_CC} ${INSTALL_CXX} - sudo systemctl stop memcached || true - - name: Install dependencies (Mac) - if: runner.os == 'macOS' - run: | - brew install bison flex ${INSTALL_MEMCACHED} - brew services stop memcached || true + - name: Install dependencies (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get install \ + libevent-dev \ + libsasl2-dev \ + ${INSTALL_MEMCACHED} \ + ${INSTALL_CC} ${INSTALL_CXX} + sudo systemctl stop memcached || true + - name: Install dependencies (Mac) + if: runner.os == 'macOS' + run: | + brew install bison flex ${INSTALL_MEMCACHED} + brew services stop memcached || true + echo "MEMCACHED_BINARY='/usr/local/bin/memcached'" >> ${GITHUB_ENV} + - name: Build memcached + run: | + if test -d memcached + then + cd memcached + ./autogen.sh + ./configure CFLAGS="-O2 -pipe" \ + --prefix=${MEMCACHED_PREFIX} \ + --enable-sasl \ + --enable-sasl-pwdb \ + --disable-coverage \ + --disable-dependency-tracking \ + --disable-docs \ + --disable-extstore \ + --disable-option-checking \ + ; + make -j2 + make install + cd .. + echo "MEMCACHED_BINARY='${MEMCACHED_PREFIX}/bin/memcached'" >> ${GITHUB_ENV} + fi - - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }}) - run: cmake -S . -B build - - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }} - run: make -C build -j2 all - - name: Test - run: make -C build -j2 test - - name: Install - run: make -C build -j2 install DESTDIR=. - - name: Failed tests log - if: ${{ failure() }} - run: cat build/Testing/Temporary/LastTest.log || true + - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }}) + run: cmake -S . -B build + - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }} + run: make -C build -j2 all + - name: Test + run: make -C build -j2 test + - name: Install + run: make -C build -j2 install DESTDIR=. + - name: Failed tests log + if: ${{ failure() }} + run: cat build/Testing/Temporary/LastTest.log || true - - - name: Build memcached - run: | - cd memcached - ./autogen.sh - ./configure CFLAGS="-O2 -pipe" \ - --prefix=${MEMCACHED_PREFIX} \ - --enable-sasl \ - --enable-sasl-pwdb \ - --disable-docs \ - --disable-coverage \ - --disable-dependency-tracking - make -j2 - make install - cd .. - + # sanitizer build ci-san: @@ -254,8 +257,6 @@ jobs: name: ci-dbg (, , ) runs-on: # continue-on-error: true - env: - MEMCACHED_BINARY: /usr/local/bin/memcached steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/cmake-build-ci.yml b/.github/workflows/cmake-build-ci.yml index c2e704e9..32bfd997 100644 --- a/.github/workflows/cmake-build-ci.yml +++ b/.github/workflows/cmake-build-ci.yml @@ -34,7 +34,6 @@ jobs: env: INSTALL_MEMCACHED: MEMCACHED_PREFIX: /tmp - MEMCACHED_BINARY: /tmp/bin/memcached ENABLE_SASL: "ON" steps: - uses: actions/checkout@v2 @@ -46,8 +45,8 @@ jobs: - name: Prepare environment (for cur gnu on ubuntu-20.04) if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur') run: | - echo CC=gcc-9 >> ${GITHUB_ENV} - echo CXX=g++-9 >> ${GITHUB_ENV} + echo "CC='gcc-9'" >> ${GITHUB_ENV} + echo "CXX='g++-9'" >> ${GITHUB_ENV} - name: Install dependencies (Linux) if: runner.os == 'Linux' run: | @@ -62,21 +61,29 @@ jobs: run: | brew install bison flex ${INSTALL_MEMCACHED} brew services stop memcached || true + echo "MEMCACHED_BINARY='/usr/local/bin/memcached'" >> ${GITHUB_ENV} - name: Build memcached run: | - cd memcached - ./autogen.sh - ./configure CFLAGS="-O2 -pipe" \ - --prefix=${MEMCACHED_PREFIX} \ - --enable-sasl \ - --enable-sasl-pwdb \ - --disable-docs \ - --disable-coverage \ - --disable-dependency-tracking - make -j2 - make install - cd .. - - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }}) + if test -d memcached + then + cd memcached + ./autogen.sh + ./configure CFLAGS="-O2 -pipe" \ + --prefix=${MEMCACHED_PREFIX} \ + --enable-sasl \ + --enable-sasl-pwdb \ + --disable-coverage \ + --disable-dependency-tracking \ + --disable-docs \ + --disable-extstore \ + --disable-option-checking \ + ; + make -j2 + make install + cd .. + echo "MEMCACHED_BINARY='${MEMCACHED_PREFIX}/bin/memcached'" >> ${GITHUB_ENV} + fi + - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }}) run: cmake -S . -B build - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }} run: make -C build -j2 all @@ -99,8 +106,8 @@ jobs: - name: Prepare environment (for cur gnu on ubuntu-20.04) if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur') run: | - echo CC=gcc-9 >> ${GITHUB_ENV} - echo CXX=g++-9 >> ${GITHUB_ENV} + echo "CC='gcc-9'" >> ${GITHUB_ENV} + echo "CXX='g++-9'" >> ${GITHUB_ENV} - name: Install dependencies (Linux) if: runner.os == 'Linux' run: | @@ -115,7 +122,29 @@ jobs: run: | brew install bison flex ${INSTALL_MEMCACHED} brew services stop memcached || true - - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }}) + echo "MEMCACHED_BINARY='/usr/local/bin/memcached'" >> ${GITHUB_ENV} + - name: Build memcached + run: | + if test -d memcached + then + cd memcached + ./autogen.sh + ./configure CFLAGS="-O2 -pipe" \ + --prefix=${MEMCACHED_PREFIX} \ + --enable-sasl \ + --enable-sasl-pwdb \ + --disable-coverage \ + --disable-dependency-tracking \ + --disable-docs \ + --disable-extstore \ + --disable-option-checking \ + ; + make -j2 + make install + cd .. + echo "MEMCACHED_BINARY='${MEMCACHED_PREFIX}/bin/memcached'" >> ${GITHUB_ENV} + fi + - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }}) run: cmake -S . -B build - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }} run: make -C build -j2 all @@ -139,8 +168,8 @@ jobs: - name: Prepare environment (for cur gnu on ubuntu-20.04) if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur') run: | - echo CC=gcc-9 >> ${GITHUB_ENV} - echo CXX=g++-9 >> ${GITHUB_ENV} + echo "CC='gcc-9'" >> ${GITHUB_ENV} + echo "CXX='g++-9'" >> ${GITHUB_ENV} - name: Install dependencies (Linux) if: runner.os == 'Linux' run: | @@ -155,7 +184,29 @@ jobs: run: | brew install bison flex ${INSTALL_MEMCACHED} brew services stop memcached || true - - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }}) + echo "MEMCACHED_BINARY='/usr/local/bin/memcached'" >> ${GITHUB_ENV} + - name: Build memcached + run: | + if test -d memcached + then + cd memcached + ./autogen.sh + ./configure CFLAGS="-O2 -pipe" \ + --prefix=${MEMCACHED_PREFIX} \ + --enable-sasl \ + --enable-sasl-pwdb \ + --disable-coverage \ + --disable-dependency-tracking \ + --disable-docs \ + --disable-extstore \ + --disable-option-checking \ + ; + make -j2 + make install + cd .. + echo "MEMCACHED_BINARY='${MEMCACHED_PREFIX}/bin/memcached'" >> ${GITHUB_ENV} + fi + - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }}) run: cmake -S . -B build - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }} run: make -C build -j2 all @@ -173,8 +224,6 @@ jobs: name: ci-dbg (macos-10.15, clang, apple) runs-on: macos-10.15 # continue-on-error: true - env: - MEMCACHED_BINARY: /usr/local/bin/memcached steps: - uses: actions/checkout@v2 - name: Install dependencies (Linux) @@ -191,7 +240,29 @@ jobs: run: | brew install bison flex ${INSTALL_MEMCACHED} brew services stop memcached || true - - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }}) + echo "MEMCACHED_BINARY='/usr/local/bin/memcached'" >> ${GITHUB_ENV} + - name: Build memcached + run: | + if test -d memcached + then + cd memcached + ./autogen.sh + ./configure CFLAGS="-O2 -pipe" \ + --prefix=${MEMCACHED_PREFIX} \ + --enable-sasl \ + --enable-sasl-pwdb \ + --disable-coverage \ + --disable-dependency-tracking \ + --disable-docs \ + --disable-extstore \ + --disable-option-checking \ + ; + make -j2 + make install + cd .. + echo "MEMCACHED_BINARY='${MEMCACHED_PREFIX}/bin/memcached'" >> ${GITHUB_ENV} + fi + - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }}) run: cmake -S . -B build - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }} run: make -C build -j2 all @@ -224,67 +295,66 @@ jobs: - name: Prepare environment (for new gnu on ubuntu-20.04) if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='gnu') && (env.CC_VER=='new') run: | - echo CC=gcc-10 >> ${GITHUB_ENV} - echo CXX=g++-10 >> ${GITHUB_ENV} - echo INSTALL_CC='gcc-10' >> ${GITHUB_ENV} - echo INSTALL_CXX='g++-10' >> ${GITHUB_ENV} + echo "CC='gcc-10'" >> ${GITHUB_ENV} + echo "CXX='g++-10'" >> ${GITHUB_ENV} + echo "INSTALL_CC='gcc-10'" >> ${GITHUB_ENV}} + echo "INSTALL_CXX='g++-10'" >> ${GITHUB_ENV}} - name: Prepare environment (for cur gnu on ubuntu-20.04) if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur') run: | - echo CC=gcc-9 >> ${GITHUB_ENV} - echo CXX=g++-9 >> ${GITHUB_ENV} + echo "CC='gcc-9'" >> ${GITHUB_ENV} + echo "CXX='g++-9'" >> ${GITHUB_ENV} - name: Prepare environment (for old gnu on ubuntu-20.04) if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='gnu') && (env.CC_VER=='old') run: | - echo CC=gcc-8 >> ${GITHUB_ENV} - echo CXX=g++-8 >> ${GITHUB_ENV} + echo "CC='gcc-8'" >> ${GITHUB_ENV} + echo "CXX='g++-8'" >> ${GITHUB_ENV} - name: Prepare environment (for new clang on ubuntu-20.04) if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='clang') && (env.CC_VER=='new') run: | - echo CC=clang-10 >> ${GITHUB_ENV} - echo CXX=clang++-10 >> ${GITHUB_ENV} + echo "CC='clang-10'" >> ${GITHUB_ENV} + echo "CXX='clang++-10'" >> ${GITHUB_ENV} - name: Prepare environment (for cur clang on ubuntu-20.04) if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='clang') && (env.CC_VER=='cur') run: | - echo CC=clang-9 >> ${GITHUB_ENV} - echo CXX=clang++-9 >> ${GITHUB_ENV} + echo "CC='clang-9'" >> ${GITHUB_ENV} + echo "CXX='clang++-9'" >> ${GITHUB_ENV} - name: Prepare environment (for old clang on ubuntu-20.04) if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='clang') && (env.CC_VER=='old') run: | - echo CC=clang-8 >> ${GITHUB_ENV} - echo CXX=clang++-8 >> ${GITHUB_ENV} + echo "CC='clang-8'" >> ${GITHUB_ENV} + echo "CXX='clang++-8'" >> ${GITHUB_ENV} - name: Prepare environment (for new gnu on ubuntu-18.04) if: (env.OS_VER=='ubuntu-18.04') && (env.CC_VND=='gnu') && (env.CC_VER=='new') run: | - echo CC=gcc-9 >> ${GITHUB_ENV} - echo CXX=g++-9 >> ${GITHUB_ENV} + echo "CC='gcc-9'" >> ${GITHUB_ENV} + echo "CXX='g++-9'" >> ${GITHUB_ENV} - name: Prepare environment (for cur gnu on ubuntu-18.04) if: (env.OS_VER=='ubuntu-18.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur') run: | - echo CC=gcc-8 >> ${GITHUB_ENV} - echo CXX=g++-8 >> ${GITHUB_ENV} + echo "CC='gcc-8'" >> ${GITHUB_ENV} + echo "CXX='g++-8'" >> ${GITHUB_ENV} - name: Prepare environment (for old gnu on ubuntu-18.04) if: (env.OS_VER=='ubuntu-18.04') && (env.CC_VND=='gnu') && (env.CC_VER=='old') run: | - echo CC=gcc-7 >> ${GITHUB_ENV} - echo CXX=g++-7 >> ${GITHUB_ENV} + echo "CC='gcc-7'" >> ${GITHUB_ENV} + echo "CXX='g++-7'" >> ${GITHUB_ENV} - name: Prepare environment (for new clang on ubuntu-18.04) if: (env.OS_VER=='ubuntu-18.04') && (env.CC_VND=='clang') && (env.CC_VER=='new') run: | - echo CC=clang-9 >> ${GITHUB_ENV} - echo CXX=clang++-9 >> ${GITHUB_ENV} + echo "CC='clang-9'" >> ${GITHUB_ENV} + echo "CXX='clang++-9'" >> ${GITHUB_ENV} - name: Prepare environment (for cur clang on ubuntu-18.04) if: (env.OS_VER=='ubuntu-18.04') && (env.CC_VND=='clang') && (env.CC_VER=='cur') run: | - echo CC=clang-8 >> ${GITHUB_ENV} - echo CXX=clang++-8 >> ${GITHUB_ENV} + echo "CC='clang-8'" >> ${GITHUB_ENV} + echo "CXX='clang++-8'" >> ${GITHUB_ENV} - name: Prepare environment (for old clang on ubuntu-18.04) if: (env.OS_VER=='ubuntu-18.04') && (env.CC_VND=='clang') && (env.CC_VER=='old') run: | - echo CC=clang-7 >> ${GITHUB_ENV} - echo CXX=clang++-7 >> ${GITHUB_ENV} - echo INSTALL_CC='clang-7' >> ${GITHUB_ENV} - echo INSTALL_CXX='clang-7' >> ${GITHUB_ENV} + echo "CC='clang-6.0'" >> ${GITHUB_ENV} + echo "CXX='clang++-6.0'" >> ${GITHUB_ENV} + echo "CXXFLAGS='-stdlib=libc++'" >> ${GITHUB_ENV}} - name: Install dependencies (Linux) if: runner.os == 'Linux' run: | @@ -299,7 +369,29 @@ jobs: run: | brew install bison flex ${INSTALL_MEMCACHED} brew services stop memcached || true - - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }}) + echo "MEMCACHED_BINARY='/usr/local/bin/memcached'" >> ${GITHUB_ENV} + - name: Build memcached + run: | + if test -d memcached + then + cd memcached + ./autogen.sh + ./configure CFLAGS="-O2 -pipe" \ + --prefix=${MEMCACHED_PREFIX} \ + --enable-sasl \ + --enable-sasl-pwdb \ + --disable-coverage \ + --disable-dependency-tracking \ + --disable-docs \ + --disable-extstore \ + --disable-option-checking \ + ; + make -j2 + make install + cd .. + echo "MEMCACHED_BINARY='${MEMCACHED_PREFIX}/bin/memcached'" >> ${GITHUB_ENV} + fi + - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }}) run: cmake -S . -B build - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }} run: make -C build -j2 all diff --git a/test/lib/Server.hpp b/test/lib/Server.hpp index bfbab812..f37c79a5 100644 --- a/test/lib/Server.hpp +++ b/test/lib/Server.hpp @@ -33,12 +33,7 @@ public: pipe = exchange(s.pipe, -1); status = exchange(s.status, 0); signalled = exchange(s.signalled, {}); -#if __clang__ && __clang_major__ <= 7 - socket_or_port = s.socket_or_port; - s.socket_or_port = 11211; -#else - socket_or_port = exchange(s.socket_or_port, 11211); -#endif + socket_or_port = exchange(s.socket_or_port, {}); output = exchange(s.output, {}); return *this; };