From b2e172201c3f1bf3f9dfbf8c1ce27255f0468879 Mon Sep 17 00:00:00 2001 From: ado Date: Sun, 21 Feb 2021 22:42:08 +0100 Subject: [PATCH] add msys2-clang.yml --- .github/workflows/msys2-clang.yml | 63 +++++++++++++++++++ .../workflows/{msys2.yml => msys2-gcc.yml} | 0 ...ntu-latest.yml => ubuntu-latest-clang.yml} | 40 ------------ .github/workflows/ubuntu-latest-gcc.yml | 57 +++++++++++++++++ test/test_parser.cpp | 2 +- 5 files changed, 121 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/msys2-clang.yml rename .github/workflows/{msys2.yml => msys2-gcc.yml} (100%) rename .github/workflows/{ubuntu-latest.yml => ubuntu-latest-clang.yml} (59%) create mode 100644 .github/workflows/ubuntu-latest-gcc.yml diff --git a/.github/workflows/msys2-clang.yml b/.github/workflows/msys2-clang.yml new file mode 100644 index 0000000..a4b42ab --- /dev/null +++ b/.github/workflows/msys2-clang.yml @@ -0,0 +1,63 @@ +name: MSYS2-CI + +on: + push: + branches: + - master + - feature/** + - improvement/** + - bugfix/** + + pull_request: + branches: + - master + - feature/** + - improvement/** + - bugfix/** + +jobs: + windows-mingw: + name: ${{ matrix.msystem }} + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + strategy: + fail-fast: false + matrix: + include: + - msystem: "MINGW64" + install: git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang + type: Release + - msystem: "MINGW32" + install: git mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-clang + type: Release + - msystem: "MINGW64" + install: git mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang + type: Debug + - msystem: "MINGW32" + install: git mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-clang + type: Debug + env: + CMAKE_GENERATOR: Ninja + + steps: + - uses: actions/checkout@v2 + - uses: msys2/setup-msys2@v2 + with: + update: true + msystem: ${{ matrix.msystem }} + install: ${{ matrix.install }} + + - name: Install dependencies + run: script/ci_install_deps.sh + + - name: Configure + run: cmake -S test -B build -DCMAKE_CXX_COMPILER=clang++ CMAKE_BUILD_TYPE=Debug + + - name: Build + run: cmake --build build -j ${{ steps.cores.outputs.count }} + + - name: Run + working-directory: build + run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} diff --git a/.github/workflows/msys2.yml b/.github/workflows/msys2-gcc.yml similarity index 100% rename from .github/workflows/msys2.yml rename to .github/workflows/msys2-gcc.yml diff --git a/.github/workflows/ubuntu-latest.yml b/.github/workflows/ubuntu-latest-clang.yml similarity index 59% rename from .github/workflows/ubuntu-latest.yml rename to .github/workflows/ubuntu-latest-clang.yml index cd1b7e2..48a4314 100644 --- a/.github/workflows/ubuntu-latest.yml +++ b/.github/workflows/ubuntu-latest-clang.yml @@ -63,43 +63,3 @@ jobs: - name: Run working-directory: build run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} - - gcc_tests: - if: >- - ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && - ! contains(toJSON(github.event.commits.*.message), '[skip github]') - - strategy: - matrix: - version: [10, 9, 8] - - runs-on: ubuntu-latest - - name: GCC ${{ matrix.version }} - - container: - image: gcc:${{ matrix.version }} - - options: -v /usr/local:/host_usr_local - - steps: - - uses: actions/checkout@v1 - - - uses: friendlyanon/fetch-core-count@v1 - id: cores - - - name: CMake - run: echo "/host_usr_local/bin" >> $GITHUB_PATH - - - name: Install dependencies - run: script/ci_install_deps.sh - - - name: Configure - run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug - - - name: Build - run: cmake --build build -j ${{ steps.cores.outputs.count }} - - - name: Run - working-directory: build - run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} diff --git a/.github/workflows/ubuntu-latest-gcc.yml b/.github/workflows/ubuntu-latest-gcc.yml new file mode 100644 index 0000000..b69e415 --- /dev/null +++ b/.github/workflows/ubuntu-latest-gcc.yml @@ -0,0 +1,57 @@ +name: Continuous Integration + +on: + push: + branches: + - master + - feature/** + - improvement/** + - bugfix/** + + pull_request: + branches: + - master + - feature/** + - improvement/** + - bugfix/** + +jobs: + gcc_tests: + if: >- + ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && + ! contains(toJSON(github.event.commits.*.message), '[skip github]') + + strategy: + matrix: + version: [10, 9, 8] + + runs-on: ubuntu-latest + + name: GCC ${{ matrix.version }} + + container: + image: gcc:${{ matrix.version }} + + options: -v /usr/local:/host_usr_local + + steps: + - uses: actions/checkout@v1 + + - uses: friendlyanon/fetch-core-count@v1 + id: cores + + - name: CMake + run: echo "/host_usr_local/bin" >> $GITHUB_PATH + + - name: Install dependencies + run: script/ci_install_deps.sh + + - name: Configure + run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug + + - name: Build + run: cmake --build build -j ${{ steps.cores.outputs.count }} + + - name: Run + working-directory: build + run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} diff --git a/test/test_parser.cpp b/test/test_parser.cpp index af8b183..4056da1 100644 --- a/test/test_parser.cpp +++ b/test/test_parser.cpp @@ -524,7 +524,7 @@ std::string no_quote(const std::string& s) { return s; } -TEST_CASE("parser test csv on multiple lines with quotes zzz") { +TEST_CASE("parser test csv on multiple lines with quotes") { unique_file_name f; std::vector data = {{1, 2, "\"x\nx\nx\""}, {3, 4, "\"y\ny\ny\""}, {5, 6, "\"z\nz\""}, {7, 8, "\"u\"\"\""},