feat(mdbx): add MdbxLogger #373
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [ main, stable ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| std: [11, 17] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - run: git submodule update --init --recursive | |
| - name: Configure | |
| run: cmake -S . -B build -DLOGIT_CPP_BUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DLOGIT_WITH_SYSLOG=ON -DLOGIT_WITH_WIN_EVENT_LOG=OFF | |
| - name: Build | |
| run: cmake --build build | |
| - name: Install | |
| run: cmake --install build --prefix install | |
| - name: Test | |
| run: ctest --test-dir build --output-on-failure | |
| - name: Configure benchmarks | |
| # if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/stable') }} | |
| run: cmake -S . -B build-bench -DLOGIT_BENCH_ENABLE=ON -DLOGIT_BENCH_WITH_SPDLOG=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DLOGIT_WITH_SYSLOG=ON -DLOGIT_WITH_WIN_EVENT_LOG=OFF | |
| - name: Build benchmarks | |
| # if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/stable') }} | |
| run: cmake --build build-bench --target logit_bench | |
| - name: Run latency benchmarks | |
| # if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/stable') }} | |
| timeout-minutes: 20 | |
| env: | |
| LOGIT_BENCH_TIMEOUT_SEC: 900 | |
| LOGIT_BENCH_TOTAL: 20000 | |
| LOGIT_BENCH_WARMUP: 2000 | |
| run: ./build-bench/logit_bench | |
| - name: Configure consumer project | |
| run: cmake -S tests/install_consumer -B build-consumer -DCMAKE_PREFIX_PATH=${{ github.workspace }}/install -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| - name: Build consumer project | |
| run: cmake --build build-consumer | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs-${{ matrix.std }} | |
| path: | | |
| build/CMakeFiles/CMakeOutput.log | |
| build/Testing/Temporary/LastTest.log | |
| if-no-files-found: ignore | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| std: [11, 17] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - run: git submodule update --init --recursive | |
| - name: Configure | |
| run: cmake -S . -B build -DLOGIT_CPP_BUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DLOGIT_WITH_SYSLOG=OFF -DLOGIT_WITH_WIN_EVENT_LOG=ON | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Install | |
| run: cmake --install build --prefix install --config Release | |
| - name: Test | |
| run: ctest --test-dir build -C Release | |
| - name: Configure consumer project | |
| run: cmake -S tests/install_consumer -B build-consumer -DCMAKE_PREFIX_PATH="${{ github.workspace }}/install" -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| - name: Build consumer project | |
| run: cmake --build build-consumer --config Release | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs-${{ matrix.std }} | |
| path: | | |
| build/CMakeFiles/CMakeOutput.log | |
| build/Testing/Temporary/LastTest.log | |
| if-no-files-found: ignore | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| std: [11, 17] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - run: git submodule update --init --recursive | |
| - name: Configure | |
| run: cmake -S . -B build -DLOGIT_CPP_BUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DLOGIT_WITH_SYSLOG=ON -DLOGIT_WITH_WIN_EVENT_LOG=OFF | |
| - name: Build | |
| run: cmake --build build | |
| - name: Install | |
| run: cmake --install build --prefix install | |
| - name: Test | |
| run: ctest --test-dir build | |
| - name: Configure consumer project | |
| run: cmake -S tests/install_consumer -B build-consumer -DCMAKE_PREFIX_PATH=${{ github.workspace }}/install -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| - name: Build consumer project | |
| run: cmake --build build-consumer | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs-${{ matrix.std }} | |
| path: | | |
| build/CMakeFiles/CMakeOutput.log | |
| build/Testing/Temporary/LastTest.log | |
| if-no-files-found: ignore | |
| linux-extras: | |
| name: ${{ matrix.suite }} | |
| runs-on: ubuntu-latest | |
| env: | |
| VCPKG_TAG: '2024.09.30' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| suite: [asan-ubsan, tsan, odr, bench-asan, vcpkg-install] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - run: git submodule update --init --recursive | |
| - name: Configure (asan-ubsan) | |
| if: matrix.suite == 'asan-ubsan' | |
| run: cmake -S . -B build -DLOGIT_CPP_BUILD_TESTS=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS='-fsanitize=address,undefined' -DCMAKE_LINKER_FLAGS='-fsanitize=address,undefined' | |
| - name: Build (asan-ubsan) | |
| if: matrix.suite == 'asan-ubsan' | |
| run: cmake --build build | |
| - name: Test (asan-ubsan) | |
| if: matrix.suite == 'asan-ubsan' | |
| run: ctest --test-dir build --output-on-failure | |
| - name: Configure (tsan) | |
| if: matrix.suite == 'tsan' | |
| env: | |
| LOGIT_PROFILE: thread | |
| run: cmake -S . -B build -DLOGIT_CPP_BUILD_TESTS=ON -DLOGIT_FORCE_ASYNC_OFF=OFF -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS='-fsanitize=thread' -DCMAKE_LINKER_FLAGS='-fsanitize=thread' | |
| - name: Build (tsan) | |
| if: matrix.suite == 'tsan' | |
| run: cmake --build build | |
| - name: Test (tsan) | |
| if: matrix.suite == 'tsan' | |
| run: ctest --test-dir build --output-on-failure | |
| - name: Install dependencies (odr) | |
| if: matrix.suite == 'odr' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential | |
| - name: Build Logit ODR header | |
| if: matrix.suite == 'odr' | |
| working-directory: tests/odr | |
| run: | | |
| g++ -std=c++17 -I ../../include -I ../../external/time-shield-cpp/include -c get_logger_a.cpp | |
| g++ -std=c++17 -I ../../include -I ../../external/time-shield-cpp/include -c get_logger_b.cpp | |
| g++ -std=c++17 -I ../../include -I ../../external/time-shield-cpp/include -c get_logger_main.cpp | |
| g++ get_logger_a.o get_logger_b.o get_logger_main.o -o app_logger | |
| - name: Run ConsoleApp ODR header | |
| if: matrix.suite == 'odr' | |
| working-directory: tests/odr | |
| run: ./app_logger | |
| - name: Build Task Executor ODR header | |
| if: matrix.suite == 'odr' | |
| working-directory: tests/odr | |
| run: | | |
| g++ -std=c++17 -I ../../include -I ../../external/time-shield-cpp/include -c get_executor_a.cpp | |
| g++ -std=c++17 -I ../../include -I ../../external/time-shield-cpp/include -c get_executor_b.cpp | |
| g++ -std=c++17 -I ../../include -I ../../external/time-shield-cpp/include -c get_executor_main.cpp | |
| g++ get_executor_a.o get_executor_b.o get_executor_main.o -o app_executor | |
| - name: Run Task Executor ODR header | |
| if: matrix.suite == 'odr' | |
| working-directory: tests/odr | |
| run: ./app_executor | |
| - name: Configure benchmarks (asan) | |
| if: matrix.suite == 'bench-asan' | |
| run: | | |
| cmake -S . -B build-bench-asan \ | |
| -DLOGIT_BENCH_ENABLE=ON \ | |
| -DLOGIT_BENCH_WITH_SPDLOG=ON \ | |
| -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
| -DCMAKE_CXX_STANDARD=17 \ | |
| -DCMAKE_CXX_FLAGS='-fsanitize=address,undefined -fno-omit-frame-pointer -g' \ | |
| -DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address,undefined' | |
| - name: Build benchmarks (asan) | |
| if: matrix.suite == 'bench-asan' | |
| run: cmake --build build-bench-asan --target logit_bench | |
| - name: Run spdlog async null bench (asan) | |
| if: matrix.suite == 'bench-asan' | |
| timeout-minutes: 10 | |
| env: | |
| LOGIT_BENCH_FILTER_LIB: spdlog | |
| LOGIT_BENCH_FILTER_ASYNC: "1" | |
| LOGIT_BENCH_FILTER_SINK: null | |
| LOGIT_BENCH_FILTER_PRODUCERS: "4" | |
| LOGIT_BENCH_FILTER_BYTES: "40" | |
| LOGIT_BENCH_TOTAL: 200 | |
| LOGIT_BENCH_WARMUP: 20 | |
| LOGIT_BENCH_TIMEOUT_SEC: 120 | |
| run: ./build-bench-asan/logit_bench | |
| - name: Restore vcpkg cache | |
| if: matrix.suite == 'vcpkg-install' | |
| id: cache-vcpkg | |
| uses: actions/cache/restore@v3 | |
| with: | |
| path: | | |
| vcpkg | |
| vcpkg/downloads | |
| vcpkg/installed | |
| key: ${{ runner.os }}-vcpkg-${{ env.VCPKG_TAG }}-${{ hashFiles('vcpkg-overlay/ports/**', 'external/time-shield-cpp/vcpkg-overlay/ports/**') }} | |
| - name: Install vcpkg | |
| if: matrix.suite == 'vcpkg-install' && steps.cache-vcpkg.outputs.cache-hit != 'true' | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git --branch $VCPKG_TAG --single-branch | |
| ./vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
| - name: Validate port | |
| if: matrix.suite == 'vcpkg-install' | |
| run: | | |
| ./vcpkg/vcpkg install log-it-cpp \ | |
| --overlay-ports=vcpkg-overlay/ports \ | |
| --overlay-ports=external/time-shield-cpp/vcpkg-overlay/ports | |
| - name: Configure consumer project | |
| if: matrix.suite == 'vcpkg-install' | |
| run: cmake -B build -S tests/install_consumer -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake | |
| - name: Build consumer project | |
| if: matrix.suite == 'vcpkg-install' | |
| run: cmake --build build | |
| - name: Save vcpkg cache | |
| if: matrix.suite == 'vcpkg-install' && success() && steps.cache-vcpkg.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v3 | |
| with: | |
| path: | | |
| vcpkg | |
| vcpkg/downloads | |
| vcpkg/installed | |
| key: ${{ runner.os }}-vcpkg-${{ env.VCPKG_TAG }}-${{ hashFiles('vcpkg-overlay/ports/**', 'external/time-shield-cpp/vcpkg-overlay/ports/**') }} | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs-${{ matrix.suite }} | |
| path: | | |
| build/CMakeFiles/CMakeOutput.log | |
| build/Testing/Temporary/LastTest.log | |
| build-bench-asan/CMakeFiles/CMakeOutput.log | |
| build-bench-asan/Testing/Temporary/LastTest.log | |
| if-no-files-found: ignore | |
| emscripten: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - run: git submodule update --init --recursive | |
| - uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: 'latest' | |
| - name: Configure (Node target) | |
| run: | | |
| emcmake cmake -S . -B build-ems \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DLOGIT_CPP_BUILD_TESTS=ON \ | |
| -DLOGIT_EMSCRIPTEN=ON -DLOGIT_FORCE_ASYNC_OFF=ON | |
| - name: Build | |
| run: cmake --build build-ems --target ems_console ems_async_flush ems_single_thread_executor -j | |
| - name: Run smoke tests | |
| run: | | |
| node --no-experimental-fetch build-ems/tests/ems_console.js | |
| node --no-experimental-fetch build-ems/tests/ems_async_flush.js | |
| node --no-experimental-fetch build-ems/tests/ems_single_thread_executor.js | |
| - name: Upload logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: emscripten-logs | |
| path: | | |
| build-ems/CMakeFiles/CMakeOutput.log | |
| build-ems/Testing/Temporary/LastTest.log | |
| if-no-files-found: ignore |