From 6dc6011dd9f8c5ac6e3e7d342251fda1781c36c7 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 2 Oct 2020 21:49:58 +0200 Subject: [PATCH] reorder jobs --- .github/workflows/cmake-build-ci.gen | 86 +++++------ .github/workflows/cmake-build-ci.yml | 212 ++++++++++++++------------- 2 files changed, 153 insertions(+), 145 deletions(-) diff --git a/.github/workflows/cmake-build-ci.gen b/.github/workflows/cmake-build-ci.gen index 24df2d8b..feaa0f6e 100755 --- a/.github/workflows/cmake-build-ci.gen +++ b/.github/workflows/cmake-build-ci.gen @@ -137,7 +137,7 @@ function steps_build() { 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 # jobs: - # release builds - ci-rel: - strategy: - fail-fast: false - matrix: - 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_BUILD_TYPE: Release - OS_VND: Linux - OS_VER: ${{ matrix.os_ver }} - CC_VND: ${{ matrix.cc_vnd }} - CC_VER: ${{ matrix.cc_ver }} - steps: - - uses: actions/checkout@v2 - - - # sanitizer build - ci-san: - runs-on: # - env: - ENABLE_SANITIZERS: "address;undefined" - steps: - - uses: actions/checkout@v2 - - - # coverage build - ci-cov: - runs-on: # - env: - CFLAGS: -O0 --coverage - CXXFLAGS: -O0 --coverage - steps: - - uses: actions/checkout@v2 - - - uses: codecov/codecov-action@v1.0.13 - # memcached new + # new memcached ci-new: + name: ci-dbg ( ${{ env.CC_VND }} ${{ env.CC_VER }} memcached-1.6) runs-on: # env: INSTALL_MEMCACHED: @@ -247,3 +209,45 @@ jobs: make install cd .. + + # sanitizer build + ci-san: + name: ci-dbg ( ${{ env.CC_VND }} ${{ env.CC_VER }} sanitizers) + runs-on: # + env: + ENABLE_SANITIZERS: "address;undefined" + steps: + - uses: actions/checkout@v2 + + + # coverage build + ci-cov: + name: ci-dbg ( ${{ env.CC_VND }} ${{ env.CC_VER }} coverage) + runs-on: # + env: + CFLAGS: -O0 --coverage + CXXFLAGS: -O0 --coverage + steps: + - uses: actions/checkout@v2 + + - uses: codecov/codecov-action@v1.0.13 + + # release builds + ci-rel: + strategy: + fail-fast: false + matrix: + 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_BUILD_TYPE: Release + OS_VND: Linux + OS_VER: ${{ matrix.os_ver }} + CC_VND: ${{ matrix.cc_vnd }} + CC_VER: ${{ matrix.cc_ver }} + steps: + - uses: actions/checkout@v2 + diff --git a/.github/workflows/cmake-build-ci.yml b/.github/workflows/cmake-build-ci.yml index 601cf247..a8ed2174 100644 --- a/.github/workflows/cmake-build-ci.yml +++ b/.github/workflows/cmake-build-ci.yml @@ -26,91 +26,45 @@ env: CC_VER: cur # jobs: - # release builds - ci-rel: - strategy: - fail-fast: false - matrix: - 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' }} + + # new memcached + ci-new: + name: ci-dbg (ubuntu-20.04 ${{ env.CC_VND }} ${{ env.CC_VER }} memcached-1.6) + runs-on: ubuntu-20.04 # env: - CMAKE_BUILD_TYPE: Release - OS_VND: Linux - OS_VER: ${{ matrix.os_ver }} - CC_VND: ${{ matrix.cc_vnd }} - CC_VER: ${{ matrix.cc_ver }} + INSTALL_MEMCACHED: + MEMCACHED_PREFIX: /tmp + MEMCACHED_BINARY: /tmp/bin/memcached + ENABLE_SASL: "ON" steps: - uses: actions/checkout@v2 - - 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} + - 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: 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} - - 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} - - 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} - - 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} - - 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} - - 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} - - 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} - - 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} - - 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} - - 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} - 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 + 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 }} @@ -121,10 +75,11 @@ 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 # sanitizer build ci-san: + name: ci-dbg (ubuntu-20.04 ${{ env.CC_VND }} ${{ env.CC_VER }} sanitizers) runs-on: ubuntu-20.04 # env: ENABLE_SANITIZERS: "address;undefined" @@ -148,10 +103,11 @@ 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 # coverage build ci-cov: + name: ci-dbg (ubuntu-20.04 ${{ env.CC_VND }} ${{ env.CC_VER }} coverage) runs-on: ubuntu-20.04 # env: CFLAGS: -O0 --coverage @@ -176,46 +132,94 @@ 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 - uses: codecov/codecov-action@v1.0.13 - # memcached new - ci-new: - runs-on: ubuntu-20.04 # + # release builds + ci-rel: + strategy: + fail-fast: false + matrix: + 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: - INSTALL_MEMCACHED: - MEMCACHED_PREFIX: /tmp - MEMCACHED_BINARY: /tmp/bin/memcached - ENABLE_SASL: "ON" + CMAKE_BUILD_TYPE: Release + OS_VND: Linux + OS_VER: ${{ matrix.os_ver }} + CC_VND: ${{ matrix.cc_vnd }} + CC_VER: ${{ matrix.cc_ver }} steps: - uses: actions/checkout@v2 - - uses: actions/checkout@v2 - with: - repository: memcached/memcached - path: memcached - ref: 1.6.7 + - 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} - 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: 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} + - 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} + - 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} + - 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} + - 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} + - 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} + - 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} + - 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} + - 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} + - 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} - 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 - 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 }} @@ -226,4 +230,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 -- 2.30.2