CSV Parser 4.0.0 - Benchmarks, DataFrame gets parallelized, MSVC AV2 Fixes #186
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: Memory and Thread Sanitizers | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| linux-sanitizers: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - sanitizer: address | |
| cxx_standard: 20 | |
| flag: "-fsanitize=address -fno-omit-frame-pointer" | |
| name: "AddressSanitizer" | |
| - sanitizer: thread | |
| cxx_standard: 20 | |
| flag: "-fsanitize=thread" | |
| name: "ThreadSanitizer" | |
| - sanitizer: undefined | |
| cxx_standard: 17 | |
| flag: "-fsanitize=undefined -fno-omit-frame-pointer" | |
| name: "UndefinedBehaviorSanitizer" | |
| env: | |
| ASAN_OPTIONS: "detect_leaks=1:halt_on_error=0" | |
| TSAN_OPTIONS: "halt_on_error=1" | |
| UBSAN_OPTIONS: "halt_on_error=1" | |
| steps: | |
| - name: Checkout repository and submodules | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake | |
| - name: Configure CMake with ${{ matrix.name }} | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCSV_CXX_STANDARD=${{ matrix.cxx_standard }} \ | |
| -DCMAKE_CXX_COMPILER=g++ \ | |
| -DCMAKE_C_COMPILER=gcc \ | |
| -DCMAKE_CXX_FLAGS="${{ matrix.flag }} -g" \ | |
| -DCMAKE_C_FLAGS="${{ matrix.flag }} -g" | |
| - name: Build with ${{ matrix.name }} | |
| run: cmake --build build --config Debug | |
| - name: Test with ${{ matrix.name }} | |
| working-directory: build | |
| run: ctest --output-on-failure -V | |
| timeout-minutes: 20 | |
| - name: Upload sanitizer logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-sanitizer-logs-${{ matrix.sanitizer }}-std${{ matrix.cxx_standard }} | |
| path: build/Testing/ | |
| windows-asan-msvc: | |
| name: MSVC AddressSanitizer (C++20) | |
| runs-on: windows-latest | |
| env: | |
| ASAN_OPTIONS: "halt_on_error=1" | |
| steps: | |
| - name: Checkout repository and submodules | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Set up MSVC developer command prompt | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Configure CMake with MSVC AddressSanitizer | |
| shell: cmd | |
| run: > | |
| cmake -S %GITHUB_WORKSPACE% | |
| -B %GITHUB_WORKSPACE%\build\msvc-asan | |
| -DCSV_CXX_STANDARD=20 | |
| -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
| -DCMAKE_CXX_FLAGS="/fsanitize=address /Zi" | |
| -DCMAKE_C_FLAGS="/fsanitize=address /Zi" | |
| -DCMAKE_EXE_LINKER_FLAGS="/INCREMENTAL:NO" | |
| -DCMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO" | |
| - name: Build with MSVC AddressSanitizer | |
| run: cmake --build ${{ github.workspace }}/build/msvc-asan --config RelWithDebInfo | |
| - name: Test with MSVC AddressSanitizer | |
| working-directory: ${{ github.workspace }}/build/msvc-asan | |
| run: ctest --build-config RelWithDebInfo --output-on-failure -V | |
| timeout-minutes: 20 | |
| - name: Upload MSVC AddressSanitizer logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-msvc-asan-logs-std20 | |
| path: build/msvc-asan/Testing/ | |
| valgrind: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository and submodules | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake valgrind | |
| - name: Configure CMake | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCSV_CXX_STANDARD=17 \ | |
| -DCMAKE_CXX_COMPILER=g++ \ | |
| -DCMAKE_C_COMPILER=gcc \ | |
| -DCMAKE_CXX_FLAGS="-g -O1" \ | |
| -DCMAKE_C_FLAGS="-g -O1" | |
| - name: Build | |
| run: cmake --build build --config Debug | |
| - name: Test with Valgrind | |
| working-directory: build | |
| run: ctest --output-on-failure | |
| timeout-minutes: 60 | |
| - name: Upload Valgrind results | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: valgrind-results | |
| path: build/Testing/ | |
| # Reproduces the exact build profile reported in issue #293: | |
| # -O3 combined with --coverage exposes memory ordering issues invisible to plain -O3 | |
| o3-coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository and submodules | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake lcov | |
| - name: Configure CMake | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCSV_CXX_STANDARD=17 \ | |
| -DCMAKE_CXX_COMPILER=g++ \ | |
| -DCMAKE_C_COMPILER=gcc \ | |
| -DCMAKE_CXX_FLAGS="-O3 --coverage" \ | |
| -DCMAKE_C_FLAGS="-O3 --coverage" \ | |
| -DCMAKE_EXE_LINKER_FLAGS="--coverage" | |
| - name: Build | |
| run: cmake --build build | |
| - name: Test with -O3 --coverage | |
| working-directory: build | |
| run: ctest --output-on-failure | |
| timeout-minutes: 20 |