Documentation improvements (issues #334, #324, #343) (#358) #705
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Verify Build" | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| # The branches below must be a subset of the branches above | |
| branches: [master] | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| jobs: | |
| verify: | |
| name: Verify | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| DEBUG: ${{ matrix.debug }} | |
| COVERAGE: ${{ matrix.coverage }} | |
| LINKING: ${{ matrix.linking }} | |
| BUILD_TYPE: ${{ matrix.build-type }} | |
| CC: ${{ matrix.c-compiler }} | |
| CXX: ${{ matrix.cc-compiler }} | |
| defaults: | |
| run: | |
| shell: ${{ matrix.shell }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| os-type: [ubuntu, mac] | |
| test-group: [basic] | |
| compiler-family: [none] | |
| c-compiler: [gcc, clang] | |
| cc-compiler: [g++, clang++] | |
| debug: [debug, nodebug] | |
| coverage: [coverage, nocoverage] | |
| linking: [dynamic, static] | |
| build-type: [classic] | |
| shell: [bash] | |
| exclude: | |
| - os: ubuntu-latest | |
| os-type: mac | |
| - os: macos-latest | |
| os-type: ubuntu | |
| - c-compiler: gcc | |
| cc-compiler: clang++ | |
| - c-compiler: clang | |
| cc-compiler: g++ | |
| - c-compiler: clang | |
| debug: debug | |
| - debug: debug | |
| coverage: nocoverage | |
| - debug: nodebug | |
| coverage: coverage | |
| - linking: static | |
| debug: debug | |
| - linking: static | |
| coverage: coverage | |
| include: | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: asan | |
| compiler-family: clang | |
| c-compiler: clang-18 | |
| cc-compiler: clang++-18 | |
| debug: debug | |
| coverage: nocoverage | |
| shell: bash | |
| # This test gives false positives on newer versions of clang | |
| # and ubuntu-18.04 is not supported anymore on github | |
| #- test-group: extra | |
| # os: ubuntu-18.04 | |
| # os-type: ubuntu | |
| # build-type: msan | |
| # compiler-family: clang | |
| # c-compiler: clang-6.0 | |
| # cc-compiler: clang++-6.0 | |
| # debug: debug | |
| # coverage: nocoverage | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: lsan | |
| compiler-family: clang | |
| c-compiler: clang-18 | |
| cc-compiler: clang++-18 | |
| debug: debug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: tsan | |
| compiler-family: clang | |
| c-compiler: clang-18 | |
| cc-compiler: clang++-18 | |
| debug: debug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: ubsan | |
| compiler-family: clang | |
| c-compiler: clang-18 | |
| cc-compiler: clang++-18 | |
| debug: debug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: gcc | |
| c-compiler: gcc-9 | |
| cc-compiler: g++-9 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: gcc | |
| c-compiler: gcc-10 | |
| cc-compiler: g++-10 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: gcc | |
| c-compiler: gcc-11 | |
| cc-compiler: g++-11 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: gcc | |
| c-compiler: gcc-12 | |
| cc-compiler: g++-12 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: gcc | |
| c-compiler: gcc-13 | |
| cc-compiler: g++-13 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: gcc | |
| c-compiler: gcc-14 | |
| cc-compiler: g++-14 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-22.04 | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: clang | |
| c-compiler: clang-11 | |
| cc-compiler: clang++-11 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-22.04 | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: clang | |
| c-compiler: clang-12 | |
| cc-compiler: clang++-12 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-22.04 | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: clang | |
| c-compiler: clang-13 | |
| cc-compiler: clang++-13 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: clang | |
| c-compiler: clang-14 | |
| cc-compiler: clang++-14 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: clang | |
| c-compiler: clang-15 | |
| cc-compiler: clang++-15 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: clang | |
| c-compiler: clang-16 | |
| cc-compiler: clang++-16 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: none | |
| compiler-family: clang | |
| c-compiler: clang-17 | |
| cc-compiler: clang++-17 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: valgrind | |
| compiler-family: gcc | |
| c-compiler: gcc-14 | |
| cc-compiler: g++-14 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| # Test build without digest auth support (issue #232) | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: no-dauth | |
| compiler-family: gcc | |
| c-compiler: gcc | |
| cc-compiler: g++ | |
| debug: nodebug | |
| coverage: nocoverage | |
| linking: dynamic | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: iwyu | |
| compiler-family: clang | |
| c-compiler: clang-18 | |
| cc-compiler: clang++-18 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: performance | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: select | |
| compiler-family: gcc | |
| c-compiler: gcc-10 | |
| cc-compiler: g++-10 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: performance | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: nodelay | |
| compiler-family: gcc | |
| c-compiler: gcc-10 | |
| cc-compiler: g++-10 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: performance | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: threads | |
| compiler-family: gcc | |
| c-compiler: gcc-10 | |
| cc-compiler: g++-10 | |
| debug: nodebug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: extra | |
| os: ubuntu-latest | |
| os-type: ubuntu | |
| build-type: lint | |
| compiler-family: gcc | |
| c-compiler: gcc-10 | |
| cc-compiler: g++-10 | |
| debug: debug | |
| coverage: nocoverage | |
| shell: bash | |
| - test-group: basic | |
| os: windows-latest | |
| os-type: windows | |
| msys-env: MINGW64 | |
| shell: 'msys2 {0}' | |
| build-type: classic | |
| compiler-family: none | |
| c-compiler: gcc | |
| cc-compiler: g++ | |
| debug: nodebug | |
| coverage: nocoverage | |
| linking: dynamic | |
| - test-group: basic | |
| os: windows-latest | |
| os-type: windows | |
| msys-env: MSYS | |
| shell: 'msys2 {0}' | |
| build-type: classic | |
| compiler-family: none | |
| c-compiler: gcc | |
| cc-compiler: g++ | |
| debug: nodebug | |
| coverage: nocoverage | |
| linking: dynamic | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| # We must fetch at least the immediate parents so that if this is | |
| # a pull request then we can checkout the head. | |
| fetch-depth: 2 | |
| # If this run was triggered by a pull request event, then checkout | |
| # the head of the pull request instead of the merge commit. | |
| - run: git checkout HEAD^2 | |
| shell: bash | |
| if: ${{ github.event_name == 'pull_request' }} | |
| - name: Setup MSYS2 | |
| if: ${{ matrix.os-type == 'windows' }} | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.msys-env }} | |
| update: true | |
| install: >- | |
| autotools | |
| base-devel | |
| - name: Install MinGW64 packages | |
| if: ${{ matrix.os-type == 'windows' && matrix.msys-env == 'MINGW64' }} | |
| run: | | |
| pacman --noconfirm -S --needed mingw-w64-x86_64-{toolchain,libtool,make,pkg-config,libsystre,doxygen,gnutls,graphviz,curl} | |
| - name: Install MSYS packages | |
| if: ${{ matrix.os-type == 'windows' && matrix.msys-env == 'MSYS' }} | |
| run: | | |
| pacman --noconfirm -S --needed msys2-devel gcc make libcurl-devel libgnutls-devel | |
| - name: Install Ubuntu test sources | |
| run: | | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test ; | |
| sudo apt-get update ; | |
| if: ${{ matrix.os-type == 'ubuntu' }} | |
| - name: Install apache benchmark if needed | |
| run: sudo apt-get install apache2-utils ; | |
| if: ${{ matrix.test-group == 'performance' && matrix.os-type == 'ubuntu' }} | |
| - name: Install optional clang if needed | |
| run: sudo apt-get install ${{ matrix.c-compiler }} | |
| if: ${{ matrix.compiler-family == 'clang' && matrix.os-type == 'ubuntu' }} | |
| - name: Install optional gcc if needed | |
| run: sudo apt-get install ${{ matrix.cc-compiler }} | |
| if: ${{ matrix.compiler-family == 'gcc' && matrix.os-type == 'ubuntu' }} | |
| - name: Install valgrind if needed | |
| run: sudo apt-get install valgrind | |
| if: ${{ matrix.build-type == 'valgrind' && matrix.os-type == 'ubuntu' }} | |
| - name: Install cpplint if needed | |
| run: sudo pip3 install cpplint ; | |
| if: ${{ matrix.build-type == 'lint' && matrix.os-type == 'ubuntu' }} | |
| - name: Install IWYU dependencies if needed | |
| run: | | |
| sudo apt-get install llvm-18-dev libclang-18-dev clang-18 ; | |
| if: ${{ matrix.build-type == 'iwyu' && matrix.os-type == 'ubuntu' }} | |
| - name: IWYU from cache (for testing) | |
| id: cache-IWYU | |
| uses: actions/cache@v4 | |
| with: | |
| path: include-what-you-use | |
| key: ${{ matrix.os }}-${{ matrix.c-compiler }}-include-what-you-use-pre-built | |
| if: ${{ matrix.build-type == 'iwyu' && matrix.os-type == 'ubuntu' }} | |
| # Installing iwyu manually because clang and iwyu paths won't match on Ubuntu otherwise. | |
| - name: Build IWYU if requested | |
| run: | | |
| CLANG_ROOT_PATH=`llvm-config-18 --prefix` ; | |
| CLANG_BIN_PATH=`llvm-config-18 --bindir` ; | |
| git clone https://github.com/include-what-you-use/include-what-you-use.git ; | |
| cd include-what-you-use ; | |
| git checkout clang_18 ; | |
| mkdir build_iwyu ; | |
| cd build_iwyu ; | |
| cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=$CLANG_ROOT_PATH -DCMAKE_C_COMPILER=$CLANG_BIN_PATH/clang -DCMAKE_CXX_COMPILER=$CLANG_BIN_PATH/clang++ ../ ; | |
| make ; | |
| sudo make install ; | |
| if: ${{ matrix.build-type == 'iwyu' && matrix.os-type == 'ubuntu' && steps.cache-IWYU.outputs.cache-hit != 'true' }} | |
| - name: Install IWYU if requested | |
| run: | | |
| cd include-what-you-use/build_iwyu ; | |
| sudo make install ; | |
| if: ${{ matrix.build-type == 'iwyu' && matrix.os-type == 'ubuntu' }} | |
| - name: CURL from cache (for testing) | |
| id: cache-CURL | |
| uses: actions/cache@v4 | |
| with: | |
| path: curl-7.75.0 | |
| key: ${{ matrix.os }}-CURL-pre-built | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| - name: Build CURL (for testing) | |
| run: | | |
| curl https://libhttpserver.s3.amazonaws.com/travis_stuff/curl-7.75.0.tar.gz -o curl-7.75.0.tar.gz ; | |
| tar -xzf curl-7.75.0.tar.gz ; | |
| cd curl-7.75.0 ; | |
| ./configure --with-darwinssl ; | |
| make ; | |
| if: ${{ matrix.os == 'macos-latest' && steps.cache-CURL.outputs.cache-hit != 'true' }} | |
| - name: Install CURL (for testing on mac only) | |
| run: cd curl-7.75.0 ; sudo make install ; | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| - name: Install CURL (for testing on linux) | |
| run: sudo apt-get install libcurl4-openssl-dev | |
| if: ${{ matrix.os-type == 'ubuntu' }} | |
| - name: Install autotools on mac | |
| run: brew install autoconf automake libtool | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| - name: Setup dependencies (only on linux) | |
| run: | | |
| sudo apt-get install info install-info ; | |
| sudo apt-get install cppcheck ; | |
| if: ${{ matrix.os-type == 'ubuntu' }} | |
| - name: Setup coverage dependencies (only on linux) | |
| run: | | |
| sudo pip install gcovr ; | |
| if: ${{ matrix.os-type == 'ubuntu' && matrix.c-compiler == 'gcc' && matrix.debug == 'debug' && matrix.coverage == 'coverage' }} | |
| - name: Setup gnutls dependency (only on linux) | |
| run: | | |
| sudo apt-get install libgnutls28-dev ; | |
| if: ${{ matrix.os-type == 'ubuntu' }} | |
| - name: Fetch libmicrohttpd from cache | |
| id: cache-libmicrohttpd | |
| uses: actions/cache@v4 | |
| with: | |
| path: libmicrohttpd-0.9.77 | |
| key: ${{ matrix.os }}-${{ matrix.c-compiler }}-libmicrohttpd-0.9.77-pre-built | |
| if: ${{ matrix.os-type != 'windows' && matrix.build-type != 'no-dauth' }} | |
| - name: Build libmicrohttpd dependency (if not cached) | |
| run: | | |
| curl https://s3.amazonaws.com/libhttpserver/libmicrohttpd_releases/libmicrohttpd-0.9.77.tar.gz -o libmicrohttpd-0.9.77.tar.gz ; | |
| tar -xzf libmicrohttpd-0.9.77.tar.gz ; | |
| cd libmicrohttpd-0.9.77 ; | |
| ./configure --disable-examples ; | |
| make ; | |
| if: ${{ matrix.os-type != 'windows' && matrix.build-type != 'no-dauth' && steps.cache-libmicrohttpd.outputs.cache-hit != 'true' }} | |
| - name: Build libmicrohttpd without digest auth (no-dauth test) | |
| run: | | |
| curl https://s3.amazonaws.com/libhttpserver/libmicrohttpd_releases/libmicrohttpd-0.9.77.tar.gz -o libmicrohttpd-0.9.77.tar.gz ; | |
| tar -xzf libmicrohttpd-0.9.77.tar.gz ; | |
| cd libmicrohttpd-0.9.77 ; | |
| ./configure --disable-examples --disable-dauth ; | |
| make ; | |
| if: ${{ matrix.build-type == 'no-dauth' }} | |
| - name: Install libmicrohttpd | |
| run: cd libmicrohttpd-0.9.77 ; sudo make install ; | |
| if: ${{ matrix.os-type != 'windows' }} | |
| - name: Verify digest auth is disabled (no-dauth test) | |
| run: | | |
| # Verify that MHD_queue_auth_fail_response is NOT present in libmicrohttpd | |
| if nm /usr/local/lib/libmicrohttpd.so 2>/dev/null | grep -q MHD_queue_auth_fail_response; then | |
| echo "ERROR: libmicrohttpd was built WITH digest auth support" ; | |
| exit 1 ; | |
| fi | |
| echo "Verified: libmicrohttpd built without digest auth support" ; | |
| if: ${{ matrix.build-type == 'no-dauth' }} | |
| - name: Build and install libmicrohttpd (Windows) | |
| if: ${{ matrix.os-type == 'windows' }} | |
| run: | | |
| curl https://s3.amazonaws.com/libhttpserver/libmicrohttpd_releases/libmicrohttpd-0.9.77.tar.gz -o libmicrohttpd-0.9.77.tar.gz | |
| tar -xzf libmicrohttpd-0.9.77.tar.gz | |
| cd libmicrohttpd-0.9.77 | |
| ./configure --disable-examples --enable-poll=no | |
| make | |
| make install | |
| - name: Refresh links to shared libs | |
| run: sudo ldconfig ; | |
| if: ${{ matrix.os-type == 'ubuntu' }} | |
| - name: Run cpplint on code | |
| run: cpplint --extensions=cpp,hpp --headers=hpp --recursive . ; | |
| if: ${{ matrix.build-type == 'lint' && matrix.os-type == 'ubuntu' }} | |
| - name: Run libhttpserver configure | |
| run: | | |
| # Set memory check flags. They need to stay in step as env variables don't propagate across steps. | |
| if [ "$BUILD_TYPE" = "asan" ]; then export CFLAGS='-fsanitize=address'; export CXXLAGS='-fsanitize=address'; export LDFLAGS='-fsanitize=address'; fi | |
| if [ "$BUILD_TYPE" = "msan" ]; then export CFLAGS='-fsanitize=memory'; export CXXLAGS='-fsanitize=memory'; export LDFLAGS='-fsanitize=memory'; fi | |
| if [ "$BUILD_TYPE" = "lsan" ]; then export CFLAGS='-fsanitize=leak'; export CXXLAGS='-fsanitize=leak'; export LDFLAGS='-fsanitize=leak'; fi | |
| if [ "$BUILD_TYPE" = "tsan" ]; then export CFLAGS='-fsanitize=thread'; export CXXLAGS='-fsanitize=thread'; export LDFLAGS='-fsanitize=thread'; fi | |
| if [ "$BUILD_TYPE" = "ubsan" ]; then export export CFLAGS='-fsanitize=undefined'; export CXXLAGS='-fsanitize=undefined'; export LDFLAGS='-fsanitize=undefined'; fi | |
| # Additional flags on mac. They need to stay in step as env variables don't propagate across steps. | |
| if [ "${{ matrix.os }}" = "macos-latest" ]; then | |
| export CFLAGS='-mtune=generic' ; | |
| export IPV6_TESTS_ENABLED="true" ; | |
| fi | |
| ./bootstrap ; | |
| mkdir build ; | |
| cd build ; | |
| if [ "$LINKING" = "static" ]; then | |
| ../configure --enable-static --disable-fastopen; | |
| elif [ "$DEBUG" = "debug" ] && [ "$COVERAGE" = "coverage" ]; then | |
| ../configure --enable-debug --enable-coverage --disable-shared --disable-fastopen; | |
| elif [ "$DEBUG" = "debug" ]; then | |
| ../configure --enable-debug --disable-shared --disable-fastopen; | |
| elif [ "$BUILD_TYPE" = "valgrind" ]; then | |
| ../configure --enable-debug --disable-fastopen --disable-valgrind-helgrind --disable-valgrind-drd --disable-valgrind-sgcheck; | |
| elif [ "$BUILD_TYPE" = "iwyu" ]; then | |
| ../configure --disable-examples; | |
| else | |
| ../configure --disable-fastopen; | |
| fi | |
| - name: Verify libhttpserver detected no digest auth (no-dauth test) | |
| run: | | |
| cd build ; | |
| if grep -q "Digest Auth.*:.*no" config.log; then | |
| echo "Verified: libhttpserver correctly detected digest auth is disabled" ; | |
| else | |
| echo "ERROR: libhttpserver did not detect that digest auth is disabled" ; | |
| grep "Digest Auth" config.log || echo "Digest Auth line not found" ; | |
| exit 1 ; | |
| fi | |
| if: ${{ matrix.build-type == 'no-dauth' }} | |
| - name: Print config.log | |
| shell: bash | |
| run: | | |
| cd build ; | |
| cat config.log ; | |
| if: ${{ failure() }} | |
| # Make or run iwyu. If running iwyu, check for the result code to be 2 (IWYU always returns an error code, if it is 2, no corrections are necessary). | |
| - name: Make or run IWYU | |
| run: | | |
| # IWYU always return an error code. If it returns "2" it indicates a success so we manage this within the function below. | |
| function safe_make_iwyu() { | |
| { | |
| make -k CXX='/usr/local/bin/include-what-you-use -Xiwyu --mapping_file=${top_builddir}/../custom_iwyu.imp' CXXFLAGS="-std=c++11 -DHTTPSERVER_COMPILATION -D_REENTRANT $CXXFLAGS" ; | |
| } || { | |
| if [ $? -ne 2 ]; then | |
| return 1; | |
| else | |
| return 0; | |
| fi | |
| } | |
| return 0; | |
| } | |
| cd build ; | |
| if [ "$BUILD_TYPE" = "iwyu" ]; then | |
| safe_make_iwyu ; | |
| else | |
| make ; | |
| fi | |
| - name: Run tests | |
| run: | | |
| cd build ; | |
| make check; | |
| if: ${{ matrix.build-type != 'iwyu' }} | |
| - name: Print tests results | |
| shell: bash | |
| run: | | |
| cd build ; | |
| cat test/test-suite.log ; | |
| if: ${{ failure() && matrix.build-type != 'iwyu' }} | |
| - name: Run Valgrind checks | |
| run: | | |
| cd build ; | |
| make check-valgrind ; | |
| if: ${{ matrix.build-type == 'valgrind' }} | |
| - name: Print Valgrind memcheck results | |
| shell: bash | |
| run: | | |
| cd build ; | |
| if [ -f test/test-suite-memcheck.log ]; then | |
| cat test/test-suite-memcheck.log ; | |
| fi | |
| if: ${{ always() && matrix.build-type == 'valgrind' }} | |
| - name: Run cppcheck | |
| run: | | |
| cd src/ ; | |
| cppcheck --error-exitcode=1 . ; | |
| if: ${{ matrix.os-type == 'ubuntu' }} | |
| - name: Run performance tests (select) | |
| run: | | |
| cd build | |
| cd examples | |
| ./benchmark_select 8080 $(nproc) & | |
| sleep 5 && ab -n 1000000 -c 100 127.0.0.1:8080/plaintext | |
| if: ${{ matrix.build-type == 'select' }} | |
| - name: Run performance tests (nodelay) | |
| run: | | |
| cd build | |
| cd examples | |
| ./benchmark_nodelay 8080 $(nproc) & | |
| sleep 5 && ab -n 1000000 -c 100 127.0.0.1:8080/plaintext | |
| if: ${{ matrix.build-type == 'nodelay' }} | |
| - name: Run performance tests (threads) | |
| run: | | |
| cd build | |
| cd examples | |
| ./benchmark_threads 8080 & | |
| sleep 5 && ab -n 1000000 -c 100 127.0.0.1:8080/plaintext | |
| if: ${{ matrix.build-type == 'threads' }} | |
| - name: Push code coverage data | |
| run: | | |
| cd build ; | |
| bash <(curl -s https://codecov.io/bash) ; | |
| if: ${{ matrix.os-type == 'discard' && matrix.c-compiler == 'gcc' && matrix.debug == 'debug' && matrix.coverage == 'coverage' && success() }} |