X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=.github%2Fworkflows%2Fcmake-build-ci.yml;h=c2e704e9581dd85a8f6f77dedc8f66b75d545930;hb=0454069ef422ce2b0056e5741ac7ce20eccef90c;hp=1c2d355e6495900dd708d5dfd2bf66306ae27f89;hpb=bde5648bce7d87e7ac22b403db49186d3a7a15e6;p=m6w6%2Flibmemcached diff --git a/.github/workflows/cmake-build-ci.yml b/.github/workflows/cmake-build-ci.yml index 1c2d355e..c2e704e9 100644 --- a/.github/workflows/cmake-build-ci.yml +++ b/.github/workflows/cmake-build-ci.yml @@ -1,14 +1,14 @@ # Generated file; do not edit! 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: @@ -26,6 +26,183 @@ env: CC_VER: cur # jobs: + + # new memcached + ci-new: + name: ci-dbg (ubuntu-20.04, gnu, cur, memcached-1.6) + runs-on: ubuntu-20.04 # + env: + INSTALL_MEMCACHED: + MEMCACHED_PREFIX: /tmp + MEMCACHED_BINARY: /tmp/bin/memcached + ENABLE_SASL: "ON" + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: memcached/memcached + path: memcached + ref: 1.6.7 + - 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} + - 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: 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 }}) + 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 + + # sanitizer build + ci-san: + name: ci-dbg (ubuntu-20.04, gnu, cur, sanitizers) + runs-on: ubuntu-20.04 # + env: + ENABLE_SANITIZERS: "address;undefined" + steps: + - uses: actions/checkout@v2 + - 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} + - 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: 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 + + # coverage build + ci-cov: + name: ci-dbg (ubuntu-20.04, gnu, cur, coverage) + runs-on: ubuntu-20.04 # + env: + CFLAGS: -O0 --coverage + CXXFLAGS: -O0 --coverage + steps: + - uses: actions/checkout@v2 + - 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} + - 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: 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 + - uses: codecov/codecov-action@v1.0.13 + + # mac build + ci-mac: + 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) + 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: 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 + # release builds ci-rel: strategy: @@ -108,114 +285,20 @@ jobs: echo CXX=clang++-7 >> ${GITHUB_ENV} echo INSTALL_CC='clang-7' >> ${GITHUB_ENV} echo INSTALL_CXX='clang-7' >> ${GITHUB_ENV} - - 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 (${{ 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 - - # sanitizer build - ci-san: - runs-on: ubuntu-20.04 # - env: - ENABLE_SANITIZERS: "address;undefined" - steps: - - uses: actions/checkout@v2 - - 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} - - 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 (${{ 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 - - # coverage build - ci-cov: - runs-on: ubuntu-20.04 # - env: - CFLAGS: --coverage - CXXFLAGS: --coverage - steps: - - uses: actions/checkout@v2 - - 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} - - name: Install dependencies + - name: Install dependencies (Linux) if: runner.os == 'Linux' - run: sudo apt-get install libevent-dev libsasl2-dev ${INSTALL_MEMCACHED} ${INSTALL_CC} ${INSTALL_CXX} - - 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 - - uses: codecov/codecov-action@v1.0.13 - with: - directory: build/src - - # memcached new - ci-new: - runs-on: ubuntu-20.04 # - env: - 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 - steps: - - uses: actions/checkout@v2 - - uses: actions/checkout@v2 - with: - repository: memcached/memcached - path: memcached - ref: 1.6.7 - - 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} - - name: Install dependencies - if: runner.os == 'Linux' - run: sudo apt-get install libevent-dev libsasl2-dev ${INSTALL_MEMCACHED} ${INSTALL_CC} ${INSTALL_CXX} - - name: Build memcached + 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: | - cd memcached - ./autogen.sh - ./configure CFLAGS="-O2 -pipe" --prefix=${MEMCACHED_PREFIX} - make -j2 - make install - cd .. + brew install bison flex ${INSTALL_MEMCACHED} + brew services stop memcached || true - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }}) run: cmake -S . -B build - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }} @@ -226,5 +309,4 @@ jobs: run: make -C build -j2 install DESTDIR=. - name: Failed tests log if: ${{ failure() }} - run: cat build/Testing/Temporary/LastTest.log - + run: cat build/Testing/Temporary/LastTest.log || true