X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=.github%2Fworkflows%2Fcmake-build-ci.gen;h=24df2d8b036d7a3436a05649bf9cd30491b166cf;hb=4fb1e0004ec9410c65bc5b6e8a8d9089b6e2f01f;hp=3598db19fa91179dc0d3d63ed51691f76db73a76;hpb=a1ee4cf8c5fa2119359b40eb2e7933135bcb7700;p=awesomized%2Flibmemcached diff --git a/.github/workflows/cmake-build-ci.gen b/.github/workflows/cmake-build-ci.gen index 3598db19..24df2d8b 100755 --- a/.github/workflows/cmake-build-ci.gen +++ b/.github/workflows/cmake-build-ci.gen @@ -29,6 +29,14 @@ const APT = [ "CXX" => "g++-10", ] ] + ], + "ubuntu-18.04" => [ + "clang" => [ + "old" => [ + "CC" => "clang-7", + "CXX" => "clang-7" + ] + ] ] ]; const MAP = [ @@ -64,7 +72,7 @@ const MAP = [ 'env.CC_VER' => [ "new" => "-9", "cur" => "-8", - // old => "-6.0" ### skip + "old" => "-7" ] ] ] @@ -75,7 +83,7 @@ const MAP = [ /** * @var bool $splat_map false = no splat map, null = default splat map, true = full splat map */ -function steps($splat_map = null) { +function steps_setenv($splat_map = null) { if ($splat_map !== false) { foreach (MAP as $os_is => $os_vers) { foreach ($os_vers as $os_ver => $cc_vnds_) { @@ -107,13 +115,21 @@ function steps($splat_map = null) { } } } +} + +function steps_getdeps() { ?> - name: Install dependencies if: runner.os == 'Linux' run: sudo apt-get install libevent-dev libsasl2-dev ${INSTALL_MEMCACHED} ${INSTALL_CC} ${INSTALL_CXX} - - name: Generate build tree (${CMAKE_CONFIG_TYPE}) + + - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }}) run: cmake -S . -B build - - name: Build all with ${CXX} ${CXXFLAGS} + - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }} run: make -C build -j2 all - name: Test run: make -C build -j2 test @@ -121,31 +137,37 @@ function steps($splat_map = null) { run: make -C build -j2 install DESTDIR=. - name: Failed tests log if: ${{ failure() }} - run: cat Testing/Temporary/LastTest.log + run: cat build/Testing/Temporary/LastTest.log name: cmake-build-ci -on: +on: push: - paths-ignore: + paths-ignore: - "docs/**" - branches-ignore: + branches-ignore: - gh-pages - v1.x pull_request: - branches: + branches: - master - v1.x env: # defaults INSTALL_MEMCACHED: memcached - CMAKE_CONFIG_TYPE: Debug + CMAKE_BUILD_TYPE: Debug BUILD_TESTING: "ON" - ENABLE_SASL: "ON" + ENABLE_SASL: "OFF" ENABLE_HASH_HSIEH: "ON" - ENABLE_DTRACE: "ON" + ENABLE_DTRACE: "OFF" VERBOSE: "ON" OS_VND: # OS_VER: # @@ -156,18 +178,19 @@ jobs: # release builds ci-rel: strategy: + fail-fast: false matrix: - os: [ubuntu-20.04, ubuntu-18.04] - compiler_vendor: [gnu, clang] - compiler_version: [new, cur, old] - runs-on: ${{ matrix.os }} - if: ${{ matrix.os }} != 'ubuntu-18.04' || ${{ matrix.compiler_vendor }} != 'clang' || ${{ matrix.compiler_version }} != 'old' + os_ver: [ubuntu-20.04, ubuntu-18.04] + cc_vnd: [gnu, clang] + cc_ver: [new, cur, old] + runs-on: ${{ matrix.os_ver }} + continue-on-error: ${{ matrix.cc_vnd == 'clang' }} env: - CMAKE_CONFIG_TYPE: Release + CMAKE_BUILD_TYPE: Release OS_VND: Linux - OS_VER: ${{ matrix.os }} - CC_VND: ${{ matrix.compiler_vendor }} - CC_VER: ${{ matrix.compiler_version }} + OS_VER: ${{ matrix.os_ver }} + CC_VND: ${{ matrix.cc_vnd }} + CC_VER: ${{ matrix.cc_ver }} steps: - uses: actions/checkout@v2 @@ -177,7 +200,7 @@ jobs: runs-on: # env: ENABLE_SANITIZERS: "address;undefined" - steps: + steps: - uses: actions/checkout@v2 @@ -185,9 +208,9 @@ jobs: ci-cov: runs-on: # env: - CFLAGS: --coverage - CXXFLAGS: --coverage - steps: + CFLAGS: -O0 --coverage + CXXFLAGS: -O0 --coverage + steps: - uses: actions/checkout@v2 - uses: codecov/codecov-action@v1.0.13 @@ -199,11 +222,7 @@ jobs: INSTALL_MEMCACHED: MEMCACHED_PREFIX: /tmp MEMCACHED_BINARY: /tmp/bin/memcached - enable_sasl: yes - enable_sasl_pwdb: yes - enable_docs: no - enable_coverage: no - enable_dependency_tracking: no + ENABLE_SASL: "ON" steps: - uses: actions/checkout@v2 - uses: actions/checkout@v2 @@ -211,13 +230,20 @@ jobs: repository: memcached/memcached path: memcached ref: 1.6.7 + + - name: Build memcached run: | cd memcached ./autogen.sh - ./configure CFLAGS="-O2 -pipe" --prefix=${MEMCACHED_PREFIX} + ./configure CFLAGS="-O2 -pipe" \ + --prefix=${MEMCACHED_PREFIX} \ + --enable-sasl \ + --enable-sasl-pwdb \ + --disable-docs \ + --disable-coverage \ + --disable-dependency-tracking make -j2 make install cd .. - - +