From aa4be36f1e9a1625960a19bd4c62b0625ac15b2b Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 13:33:09 +0000 Subject: [PATCH 01/47] Initial simple CI workflow --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..d7c756a64 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] + steps: + - uses: actions/checkout@v2 + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + - name: Configure + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DPISA_BUILD_TOOLS=OFF .. + - name: Build + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake --build . --config Debug + - name: Test + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake test -C Debug From 2399a53e4ce4c5a386d6e64385d867f536867dd3 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 13:42:50 +0000 Subject: [PATCH 02/47] Run CI workflow for linux only --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7c756a64..ebc3be5bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] + os: [ubuntu-latest] #, macOS-latest] # VS not supported yet steps: - uses: actions/checkout@v2 - name: Create Build Environment From dda8d429e959b8aa71fa02ed42c8def9865d7083 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 14:57:44 +0000 Subject: [PATCH 03/47] Fix workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebc3be5bf..44f505ae0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,4 +27,4 @@ jobs: - name: Test shell: bash working-directory: ${{runner.workspace}}/build - run: cmake test -C Debug + run: cmake test From 4573cb46f602664b2b8c3f603d5bfb3b3888b975 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 15:13:59 +0000 Subject: [PATCH 04/47] Fix workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44f505ae0..5ff4f5c3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,4 +27,4 @@ jobs: - name: Test shell: bash working-directory: ${{runner.workspace}}/build - run: cmake test + run: ctest From c21b5d913b6a9b0e83b86f08df0e5413beafeb67 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 17:46:02 +0000 Subject: [PATCH 05/47] Add additional OS --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ff4f5c3b..5a83dca8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Build and test on: push: @@ -11,9 +11,35 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] #, macOS-latest] # VS not supported yet + os: [ubuntu-latest, macOS-latest] # VS not supported yet + include: + - os: ubuntu-latest + compiler: "clang" + compiler-version: "10" + - os: ubuntu-latest + compiler: "gcc" + compiler-version: "9" steps: - uses: actions/checkout@v2 + + - name: Install (Linux) + if: runner.os == 'Linux' + run: | + # LLVM 9 is not in Bionic's repositories so we add the official LLVM repository. + if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.compiler-version }}" = "10" ]; then + sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" + fi + sudo apt-get update + if [ "${{ matrix.compiler }}" = "gcc" ]; then + sudo apt-get install -y g++-${{ matrix.version }} + echo "::set-env name=CC::gcc-${{ matrix.version }}" + echo "::set-env name=CXX::g++-${{ matrix.version }}" + else + sudo apt-get install -y clang-${{ matrix.version }} + echo "::set-env name=CC::clang-${{ matrix.version }}" + echo "::set-env name=CXX::clang++-${{ matrix.version }}" + fi + - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build - name: Configure From b08584f360e289412b056c426e7d7b5b7e920168 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 17:58:32 +0000 Subject: [PATCH 06/47] Fix yaml format --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a83dca8e..14968fefa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,13 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest] # VS not supported yet - include: - - os: ubuntu-latest - compiler: "clang" - compiler-version: "10" - - os: ubuntu-latest - compiler: "gcc" - compiler-version: "9" + include: + - os: ubuntu-latest + compiler: "clang" + compiler-version: "10" + - os: ubuntu-latest + compiler: "gcc" + compiler-version: "9" steps: - uses: actions/checkout@v2 From e658923e6c931369c179b67d669f896934309d38 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 18:21:30 +0000 Subject: [PATCH 07/47] Fix env variables --- .github/workflows/ci.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14968fefa..a7f1678ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: compiler: "clang" compiler-version: "10" - os: ubuntu-latest - compiler: "gcc" + compiler: "g++" compiler-version: "9" steps: - uses: actions/checkout@v2 @@ -31,25 +31,28 @@ jobs: fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then - sudo apt-get install -y g++-${{ matrix.version }} - echo "::set-env name=CC::gcc-${{ matrix.version }}" - echo "::set-env name=CXX::g++-${{ matrix.version }}" + sudo apt-get install -y g++-${{ matrix.compiler-version }} + echo "::set-env name=CC::gcc-${{ matrix.compiler-version }}" + echo "::set-env name=CXX::g++-${{ matrix.compiler-version }}" else - sudo apt-get install -y clang-${{ matrix.version }} - echo "::set-env name=CC::clang-${{ matrix.version }}" - echo "::set-env name=CXX::clang++-${{ matrix.version }}" + sudo apt-get install -y clang-${{ matrix.compiler-version }} + echo "::set-env name=CC::clang-${{ matrix.compiler-version }}" + echo "::set-env name=CXX::clang++-${{ matrix.compiler-version }}" fi - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build + - name: Configure shell: bash working-directory: ${{runner.workspace}}/build run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DPISA_BUILD_TOOLS=OFF .. + - name: Build shell: bash working-directory: ${{runner.workspace}}/build run: cmake --build . --config Debug + - name: Test shell: bash working-directory: ${{runner.workspace}}/build From 2a7a55afcd8cf1373a3e48514c009b559d0f3434 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 18:26:42 +0000 Subject: [PATCH 08/47] Fix workflow --- .github/workflows/ci.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7f1678ea..58edc0ce0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,32 +15,34 @@ jobs: include: - os: ubuntu-latest compiler: "clang" - compiler-version: "10" + version: "10" - os: ubuntu-latest - compiler: "g++" - compiler-version: "9" + compiler: "gcc" + version: "9" steps: - uses: actions/checkout@v2 - name: Install (Linux) if: runner.os == 'Linux' + shell: bash run: | # LLVM 9 is not in Bionic's repositories so we add the official LLVM repository. - if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.compiler-version }}" = "10" ]; then + if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "10" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then - sudo apt-get install -y g++-${{ matrix.compiler-version }} - echo "::set-env name=CC::gcc-${{ matrix.compiler-version }}" - echo "::set-env name=CXX::g++-${{ matrix.compiler-version }}" + sudo apt-get install -y g++-${{ matrix.version }} + echo "::set-env name=CC::gcc-${{ matrix.version }}" + echo "::set-env name=CXX::g++-${{ matrix.version }}" else - sudo apt-get install -y clang-${{ matrix.compiler-version }} - echo "::set-env name=CC::clang-${{ matrix.compiler-version }}" - echo "::set-env name=CXX::clang++-${{ matrix.compiler-version }}" + sudo apt-get install -y clang-${{ matrix.version }} + echo "::set-env name=CC::clang-${{ matrix.version }}" + echo "::set-env name=CXX::clang++-${{ matrix.version }}" fi - name: Create Build Environment + shell: bash run: cmake -E make_directory ${{runner.workspace}}/build - name: Configure From 3eeafce641a1de4fad3e8701c853edc1619e9ab1 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 18:32:03 +0000 Subject: [PATCH 09/47] Fix workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58edc0ce0..ce8f8a217 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macOS-latest] # VS not supported yet + os: [ubuntu-latest] #, macOS-latest] # VS not supported yet include: - os: ubuntu-latest compiler: "clang" From 8f14d4d258cc43fbbf94218bf8d9d951a38816df Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 18:58:47 +0000 Subject: [PATCH 10/47] Fix workflow --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce8f8a217..2c29bd4b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,12 +11,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] #, macOS-latest] # VS not supported yet + name: [linux-gcc-9, linux-clang-10] include: - - os: ubuntu-latest + - name: linux-gcc-9 + os: ubuntu-latest compiler: "clang" version: "10" - - os: ubuntu-latest + - name: linux-clang-10 + os: ubuntu-latest compiler: "gcc" version: "9" steps: @@ -26,7 +28,7 @@ jobs: if: runner.os == 'Linux' shell: bash run: | - # LLVM 9 is not in Bionic's repositories so we add the official LLVM repository. + # Install compiler if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "10" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi From 5339f83e30b80ec4bac8c815c388208912a3e078 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 19:15:24 +0000 Subject: [PATCH 11/47] Add format and tidy --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c29bd4b6..5738c14ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - name: Configure shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DPISA_BUILD_TOOLS=OFF .. + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DPISA_BUILD_TOOLS=ON .. - name: Build shell: bash From 7f82bae6652bab1180e9e50f738f1c7a7d590fae Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 19:20:08 +0000 Subject: [PATCH 12/47] Add format and tidy --- .github/workflows/format.yml | 37 ++++++++++++++++++++++++++++++++++++ .github/workflows/tidy.yml | 35 ++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .github/workflows/format.yml create mode 100644 .github/workflows/tidy.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 000000000..b3dd1e715 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,37 @@ +name: clang-format + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install clang-format + shell: bash + run: | + sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main" + sudo apt-get update + sudo apt-get install -y clang-format-9 + echo "::set-env name=CC::clang-9 + echo "::set-env name=CXX::clang++-10 + + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Create Build Environment + shell: bash + run: | + wget https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py + python run-clang-format.py \ + --clang-format-executable clang-format-9 \ + -r src/**/*.cpp include/pisa/**/*.hpp tools/*.cpp tools/*.hpp test/*.cpp; + - cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=${COVERAGE} -DPISA_ENABLE_CLANG_TIDY=${TIDY} -DPISA_CLANG_TIDY_EXECUTABLE=clang-tidy-9 ${CMAKE_OPTIONS} .. diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml new file mode 100644 index 000000000..d23997df5 --- /dev/null +++ b/.github/workflows/tidy.yml @@ -0,0 +1,35 @@ +name: clang-format + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install clang and clang-tidy + shell: bash + run: | + sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" + sudo apt-get update + sudo apt-get install -y clang-10 clang-tidy-10 + + - name: Create Build Environment + shell: bash + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DPISA_BUILD_TOOLS=ON -DPISA_ENABLE_CLANG_TIDY=ON .. + + - name: Build + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake --build . --config Debug From df51a7dd270cfafe4787ef4161ac29e3b6af8d1a Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 19:21:25 +0000 Subject: [PATCH 13/47] Add format and tidy --- .github/workflows/tidy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index d23997df5..5f744a7f5 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -1,4 +1,4 @@ -name: clang-format +name: clang-tidy on: push: From 0c6fe2f8b299d58ab1952e39d55b8fd74435ad02 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 19:22:59 +0000 Subject: [PATCH 14/47] Add format and tidy --- .github/workflows/format.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index b3dd1e715..a7ab16f4c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -33,5 +33,4 @@ jobs: wget https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py python run-clang-format.py \ --clang-format-executable clang-format-9 \ - -r src/**/*.cpp include/pisa/**/*.hpp tools/*.cpp tools/*.hpp test/*.cpp; - - cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=${COVERAGE} -DPISA_ENABLE_CLANG_TIDY=${TIDY} -DPISA_CLANG_TIDY_EXECUTABLE=clang-tidy-9 ${CMAKE_OPTIONS} .. + -r src/**/*.cpp include/pisa/**/*.hpp tools/*.cpp tools/*.hpp test/*.cpp From 200635d7165e06de5443791b46190a0bb67eefc4 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 19:31:52 +0000 Subject: [PATCH 15/47] Export tidy env vars --- .github/workflows/format.yml | 2 +- .github/workflows/tidy.yml | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index a7ab16f4c..681a5a656 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -27,7 +27,7 @@ jobs: with: python-version: 3.7 - - name: Create Build Environment + - name: Run clang-format shell: bash run: | wget https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index 5f744a7f5..fa2585ca3 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -19,6 +19,8 @@ jobs: sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" sudo apt-get update sudo apt-get install -y clang-10 clang-tidy-10 + echo "::set-env name=CC::clang-10" + echo "::set-env name=CXX::clang++-10" - name: Create Build Environment shell: bash @@ -27,7 +29,12 @@ jobs: - name: Configure shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DPISA_BUILD_TOOLS=ON -DPISA_ENABLE_CLANG_TIDY=ON .. + run: | + cmake $GITHUB_WORKSPACE \ + -DCMAKE_BUILD_TYPE=Debug \ + -DPISA_BUILD_TOOLS=ON \ + -DPISA_ENABLE_CLANG_TIDY=ON \ + -DPISA_CLANG_TIDY_EXECUTABLE=clang-tidy-10 .. - name: Build shell: bash From 523d9cd4c765b798e8565499edfa749883edb131 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Thu, 30 Apr 2020 20:55:58 +0000 Subject: [PATCH 16/47] Clang tidy fixes --- external/trecpp | 2 +- include/pisa/binary_collection.hpp | 4 ++-- include/pisa/mappable/mappable_vector.hpp | 4 ++-- include/pisa/parser.hpp | 7 ++++--- include/pisa/sequence/partitioned_sequence.hpp | 2 +- include/pisa/sequence/uniform_partitioned_sequence.hpp | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/external/trecpp b/external/trecpp index c01d5b9fa..f939d99cb 160000 --- a/external/trecpp +++ b/external/trecpp @@ -1 +1 @@ -Subproject commit c01d5b9fa12ef91a2dfb5f68530f1ec0654e4f93 +Subproject commit f939d99cb2fddd1e68c584a13e995c3cef194ad0 diff --git a/include/pisa/binary_collection.hpp b/include/pisa/binary_collection.hpp index 9c9d26132..98867d3b1 100644 --- a/include/pisa/binary_collection.hpp +++ b/include/pisa/binary_collection.hpp @@ -39,7 +39,7 @@ class base_binary_collection { // Indicates that the application expects to access this address range in a sequential // manner auto ret = posix_madvise((void*)m_data, m_data_size, POSIX_MADV_SEQUENTIAL); - if (ret) { + if (ret != 0) { spdlog::error("Error calling madvice: {}", errno); } #endif @@ -92,7 +92,7 @@ class base_binary_collection { auto const& operator*() const { return m_cur_seq; } - auto const* operator-> () const { return &m_cur_seq; } + auto const* operator->() const { return &m_cur_seq; } base_iterator& operator++() { diff --git a/include/pisa/mappable/mappable_vector.hpp b/include/pisa/mappable/mappable_vector.hpp index 5c6417314..88ac570e8 100644 --- a/include/pisa/mappable/mappable_vector.hpp +++ b/include/pisa/mappable/mappable_vector.hpp @@ -48,7 +48,7 @@ namespace pisa { namespace mapper { ~mappable_vector() { - if (m_deleter) { + if (m_deleter != nullptr) { m_deleter(); } } @@ -67,7 +67,7 @@ namespace pisa { namespace mapper { { clear(); m_size = vec.size(); - if (m_size) { + if (m_size > 0) { auto* new_vec = new std::vector; new_vec->swap(vec); m_deleter = boost::lambda::bind(boost::lambda::delete_ptr(), new_vec); diff --git a/include/pisa/parser.hpp b/include/pisa/parser.hpp index 8e1871328..de9fff372 100644 --- a/include/pisa/parser.hpp +++ b/include/pisa/parser.hpp @@ -52,7 +52,7 @@ record_parser(std::string const& type, std::istream& is) parser->read_record(), [](trecpp::Record rec) { return std::make_optional( - std::move(rec.trecid()), std::move(rec.content()), std::move(rec.url())); + rec.trecid(), rec.content(), rec.url()); }, [](trecpp::Error const& error) { spdlog::warn("Skipped invalid record: {}", error); @@ -74,8 +74,9 @@ record_parser(std::string const& type, std::istream& is) if (not rec.valid_response()) { return std::optional{}; } + // TODO(michal): use std::move return std::make_optional( - std::move(rec.trecid()), std::move(rec.content()), std::move(rec.url())); + rec.trecid(), rec.content(), rec.url()); }, [](warcpp::Error const& error) { spdlog::warn("Skipped invalid record: {}", error); @@ -141,4 +142,4 @@ content_parser(std::optional const& type) spdlog::error("Unknown content parser type: {}", *type); std::abort(); } -} // namespace pisa \ No newline at end of file +} // namespace pisa diff --git a/include/pisa/sequence/partitioned_sequence.hpp b/include/pisa/sequence/partitioned_sequence.hpp index 16a3245cc..f75ff81bb 100644 --- a/include/pisa/sequence/partitioned_sequence.hpp +++ b/include/pisa/sequence/partitioned_sequence.hpp @@ -208,7 +208,7 @@ struct partitioned_sequence { uint64_t prev_value() const { if (PISA_UNLIKELY(m_position == m_cur_begin)) { - return m_cur_partition ? m_cur_base - 1 : 0; + return m_cur_partition != 0U ? m_cur_base - 1 : 0; } return m_cur_base + m_partition_enum.prev_value(); } diff --git a/include/pisa/sequence/uniform_partitioned_sequence.hpp b/include/pisa/sequence/uniform_partitioned_sequence.hpp index 8e58fc732..684736cb7 100644 --- a/include/pisa/sequence/uniform_partitioned_sequence.hpp +++ b/include/pisa/sequence/uniform_partitioned_sequence.hpp @@ -194,7 +194,7 @@ struct uniform_partitioned_sequence { uint64_t prev_value() const { if (PISA_UNLIKELY(m_position == m_cur_begin)) { - return m_cur_partition ? m_cur_base - 1 : 0; + return m_cur_partition != 0U ? m_cur_base - 1 : 0; } return m_cur_base + m_partition_enum.prev_value(); } From 074ddd59910bdaadbbd10a2ca86fdb214cb61b9f Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Fri, 22 May 2020 22:07:16 +0000 Subject: [PATCH 17/47] Fix mappable vector destructor --- include/pisa/mappable/mappable_vector.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pisa/mappable/mappable_vector.hpp b/include/pisa/mappable/mappable_vector.hpp index 88ac570e8..5b4c6a5a5 100644 --- a/include/pisa/mappable/mappable_vector.hpp +++ b/include/pisa/mappable/mappable_vector.hpp @@ -48,7 +48,7 @@ namespace pisa { namespace mapper { ~mappable_vector() { - if (m_deleter != nullptr) { + if (not m_deleter.empty()) { m_deleter(); } } From 3f5f6b33809650a9686b103da11590cec3e98128 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Fri, 22 May 2020 22:32:51 +0000 Subject: [PATCH 18/47] Add missing constructors to temporary directory --- include/pisa/temporary_directory.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/pisa/temporary_directory.hpp b/include/pisa/temporary_directory.hpp index ac20eb38c..0e2403ea9 100644 --- a/include/pisa/temporary_directory.hpp +++ b/include/pisa/temporary_directory.hpp @@ -5,7 +5,7 @@ #include "boost/filesystem.hpp" struct Temporary_Directory { - explicit Temporary_Directory() + Temporary_Directory() : dir_(boost::filesystem::temp_directory_path() / boost::filesystem::unique_path()) { if (boost::filesystem::exists(dir_)) { @@ -14,6 +14,10 @@ struct Temporary_Directory { boost::filesystem::create_directory(dir_); std::cerr << "Created a tmp dir " << dir_.c_str() << '\n'; } + Temporary_Directory(Temporary_Directory const&) = default; + Temporary_Directory(Temporary_Directory&&) noexcept = default; + Temporary_Directory& operator=(Temporary_Directory const&) = default; + Temporary_Directory& operator=(Temporary_Directory&&) noexcept = default; ~Temporary_Directory() { if (boost::filesystem::exists(dir_)) { From 5308390667fc738891338a6ed8d7b6d25b475dfb Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Fri, 22 May 2020 23:18:26 +0000 Subject: [PATCH 19/47] Remove Travis jobs duplicated by actions --- .travis.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45f71e9ac..ea3ad5f98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,14 +41,6 @@ matrix: sources: *all_sources packages: ['g++-8'] env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8 && COVERAGE=Off && DOCKER=On" - - os: linux - dist: xenial - compiler: gcc - addons: &gcc9 - apt: - sources: *all_sources - packages: ['g++-9'] - env: MATRIX_EVAL="CC=gcc-9 && CXX=g++-9 && COVERAGE=Off && DOCKER=Off" - os: linux dist: xenial compiler: clang @@ -65,30 +57,6 @@ matrix: sources: *all_sources packages: ['clang-6.0', 'libstdc++-7-dev'] env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0 && COVERAGE=Off" - - os: linux - dist: xenial - compiler: clang - addons: - apt: - sources: - - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main' - key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' - packages: - - clang-format-9 - env: MATRIX_EVAL="COVERAGE=Off && CLANG_FORMAT=On" - - os: linux - dist: xenial - compiler: clang - addons: - apt: - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-xenial-6.0 - - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main' - key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' - packages: - - ['clang-tidy-9', 'clang-9', 'libstdc++-7-dev'] - env: MATRIX_EVAL="CC=clang-9 && CXX=clang++-9 && COVERAGE=Off && TIDY=On" - os: osx osx_image: xcode10.3 compiler: clang From d87d991752d0d490ee745d7a06d3778ab9aedb5d Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 00:23:25 +0000 Subject: [PATCH 20/47] Migrate clang and gcc tests to Actions --- .github/workflows/ci.yml | 16 ++++++++++++---- .travis.yml | 26 -------------------------- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5738c14ec..26eb36eb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,16 +11,24 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - name: [linux-gcc-9, linux-clang-10] + name: [linux-gcc-9, linux-gcc-7, linux-clang-10, linux-clang-6] include: - name: linux-gcc-9 + os: ubuntu-latest + compiler: "gcc" + version: "9" + - name: linux-gcc-7 + os: ubuntu-latest + compiler: "gcc" + version: "7" + - name: linux-clang-10 os: ubuntu-latest compiler: "clang" version: "10" - - name: linux-clang-10 + - name: linux-clang-6 os: ubuntu-latest - compiler: "gcc" - version: "9" + compiler: "clang" + version: "6" steps: - uses: actions/checkout@v2 diff --git a/.travis.yml b/.travis.yml index ea3ad5f98..8a407f76d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,16 +23,6 @@ cache: matrix: fast_finish: true include: - - os: linux - dist: xenial - compiler: gcc - addons: &gcc7 - apt: - sources: *all_sources - packages: - - g++-7 - - lcov - env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && COVERAGE=Off" - os: linux dist: xenial compiler: gcc @@ -41,22 +31,6 @@ matrix: sources: *all_sources packages: ['g++-8'] env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8 && COVERAGE=Off && DOCKER=On" - - os: linux - dist: xenial - compiler: clang - addons: - apt: - sources: *all_sources - packages: ['clang-5.0', 'libstdc++-7-dev'] - env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0 && COVERAGE=Off" - - os: linux - dist: xenial - compiler: clang - addons: - apt: - sources: *all_sources - packages: ['clang-6.0', 'libstdc++-7-dev'] - env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0 && COVERAGE=Off" - os: osx osx_image: xcode10.3 compiler: clang From 8ce3b4ed7765229aa5653f4f863aa94e07dd9d27 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 00:50:59 +0000 Subject: [PATCH 21/47] Additional compilers in Actions --- .github/workflows/ci.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26eb36eb0..440795e44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,16 +19,14 @@ jobs: version: "9" - name: linux-gcc-7 os: ubuntu-latest - compiler: "gcc" - version: "7" + compiler: "gcc" # default on bionic: gcc-7 - name: linux-clang-10 os: ubuntu-latest compiler: "clang" version: "10" - name: linux-clang-6 os: ubuntu-latest - compiler: "clang" - version: "6" + compiler: "clang" # default on bionic: clang-6 steps: - uses: actions/checkout@v2 @@ -37,19 +35,23 @@ jobs: shell: bash run: | # Install compiler - if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "10" ]; then + + cc="${{ matrix.compiler }}-${{ matrix.version }}" + cc="${cc%-}" + cxx="${cc/clang/clang++}" + cxx="${cxx/gcc/g++}" + + if [ "${cc}" = "clang-10" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then - sudo apt-get install -y g++-${{ matrix.version }} - echo "::set-env name=CC::gcc-${{ matrix.version }}" - echo "::set-env name=CXX::g++-${{ matrix.version }}" + sudo apt-get install -y "${cxx}" else - sudo apt-get install -y clang-${{ matrix.version }} - echo "::set-env name=CC::clang-${{ matrix.version }}" - echo "::set-env name=CXX::clang++-${{ matrix.version }}" + sudo apt-get install -y "${cc}" fi + echo "::set-env name=CC::${cc}" + echo "::set-env name=CXX::${cxx}" - name: Create Build Environment shell: bash From 044d612fd1c2c464a58a7caf0e1a8cd24c08a318 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 01:05:09 +0000 Subject: [PATCH 22/47] Use libc++ with clang-6 --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 440795e44..79b8c5cc2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,9 @@ jobs: if [ "${cc}" = "clang-10" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi + if [ "${cc}" = "clang" ]; then + sudo apt-get install -y libc++ + fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then sudo apt-get install -y "${cxx}" From 248eb676d5830b3861b42aa80e736d644b2f4a6f Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 01:08:21 +0000 Subject: [PATCH 23/47] Use libc++-7 with clang-6 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79b8c5cc2..f3e5721a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi if [ "${cc}" = "clang" ]; then - sudo apt-get install -y libc++ + sudo apt-get install -y libc++-7-dev fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then From c5cd85d8d896ed9feda34d42b26e9e6763fc8f98 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 01:21:36 +0000 Subject: [PATCH 24/47] Use libstdc++-7 with clang-6 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3e5721a7..e90a221bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi if [ "${cc}" = "clang" ]; then - sudo apt-get install -y libc++-7-dev + sudo apt-get install -y libstdc++-7-dev fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then From 041660be0ae73c1eab93d76b08338580f92ca1a6 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 01:44:32 +0000 Subject: [PATCH 25/47] libc++abi --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e90a221bc..798a1cea5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,8 @@ jobs: sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi if [ "${cc}" = "clang" ]; then - sudo apt-get install -y libstdc++-7-dev + sudo apt-get install -y libc++-7-dev libc++abi-7-dev + echo "::set-env name=CMAKE_CXX_FLAGS::-stdlib=libc++" fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then From 8c12faf96732785dddb38b19ca041b49598b6b03 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 02:08:17 +0000 Subject: [PATCH 26/47] Replace clang-6 with clang-7 --- .github/workflows/ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 798a1cea5..a7c37fc1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - name: [linux-gcc-9, linux-gcc-7, linux-clang-10, linux-clang-6] + name: [linux-gcc-9, linux-gcc-7, linux-clang-10, linux-clang-7] include: - name: linux-gcc-9 os: ubuntu-latest @@ -24,9 +24,10 @@ jobs: os: ubuntu-latest compiler: "clang" version: "10" - - name: linux-clang-6 + - name: linux-clang-7 os: ubuntu-latest - compiler: "clang" # default on bionic: clang-6 + compiler: "clang" + version: "7" steps: - uses: actions/checkout@v2 @@ -44,10 +45,6 @@ jobs: if [ "${cc}" = "clang-10" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi - if [ "${cc}" = "clang" ]; then - sudo apt-get install -y libc++-7-dev libc++abi-7-dev - echo "::set-env name=CMAKE_CXX_FLAGS::-stdlib=libc++" - fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then sudo apt-get install -y "${cxx}" From fd2edcd41b3d7078969b5f37b7bea62625927274 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 14:00:05 +0000 Subject: [PATCH 27/47] Clang-6 struggles --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7c37fc1a..7b0bcb2b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - name: [linux-gcc-9, linux-gcc-7, linux-clang-10, linux-clang-7] + name: [linux-gcc-9, linux-gcc-7, linux-clang-10, linux-clang-6] include: - name: linux-gcc-9 os: ubuntu-latest @@ -24,10 +24,9 @@ jobs: os: ubuntu-latest compiler: "clang" version: "10" - - name: linux-clang-7 + - name: linux-clang-6 os: ubuntu-latest - compiler: "clang" - version: "7" + compiler: "clang" # default on bionic: clang-6 steps: - uses: actions/checkout@v2 @@ -45,6 +44,9 @@ jobs: if [ "${cc}" = "clang-10" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi + if [ "${cc}" = "clang" ]; then + sudo apt-get remove -y gcc-9 g++-9 + fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then sudo apt-get install -y "${cxx}" From b4a435d05cfdded4bedc4435a41b91ca359ae90c Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 14:11:20 +0000 Subject: [PATCH 28/47] Clang-6 struggles --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b0bcb2b8..97a53388c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi if [ "${cc}" = "clang" ]; then - sudo apt-get remove -y gcc-9 g++-9 + sudo apt-get remove -y gcc-9 g++-9 libstdc++-9-dev fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then From 0cdd99fe472f354611891bde5c55cfc830d8de3e Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 14:13:27 +0000 Subject: [PATCH 29/47] Clang-6 struggles --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97a53388c..921bcaad9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,7 @@ jobs: fi if [ "${cc}" = "clang" ]; then sudo apt-get remove -y gcc-9 g++-9 libstdc++-9-dev + sudo apt-get install -y libstdc++-7 fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then From e516757335e64852e29a9c4211fc3f8d9ba393b9 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Sat, 23 May 2020 14:24:04 +0000 Subject: [PATCH 30/47] Clang-6 struggles --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 921bcaad9..177d15613 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: fi if [ "${cc}" = "clang" ]; then sudo apt-get remove -y gcc-9 g++-9 libstdc++-9-dev - sudo apt-get install -y libstdc++-7 + sudo apt-get install -y libstdc++-7-dev fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then From 7cb5803f5a2d13eb29c5db6a0cf4015989c1223b Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Mon, 1 Jun 2020 22:44:39 +0000 Subject: [PATCH 31/47] Revert clang-6 test to Travis --- .github/workflows/ci.yml | 9 +-------- .travis.yml | 8 ++++++++ external/trecpp | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 177d15613..52339a244 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - name: [linux-gcc-9, linux-gcc-7, linux-clang-10, linux-clang-6] + name: [linux-gcc-9, linux-gcc-7, linux-clang-10] include: - name: linux-gcc-9 os: ubuntu-latest @@ -24,9 +24,6 @@ jobs: os: ubuntu-latest compiler: "clang" version: "10" - - name: linux-clang-6 - os: ubuntu-latest - compiler: "clang" # default on bionic: clang-6 steps: - uses: actions/checkout@v2 @@ -44,10 +41,6 @@ jobs: if [ "${cc}" = "clang-10" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi - if [ "${cc}" = "clang" ]; then - sudo apt-get remove -y gcc-9 g++-9 libstdc++-9-dev - sudo apt-get install -y libstdc++-7-dev - fi sudo apt-get update if [ "${{ matrix.compiler }}" = "gcc" ]; then sudo apt-get install -y "${cxx}" diff --git a/.travis.yml b/.travis.yml index 8a407f76d..ef3284acf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,14 @@ matrix: sources: *all_sources packages: ['g++-8'] env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8 && COVERAGE=Off && DOCKER=On" + - os: linux + dist: xenial + compiler: clang + addons: + apt: + sources: *all_sources + packages: ['clang-6.0', 'libstdc++-7-dev'] + env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0 && COVERAGE=Off" - os: osx osx_image: xcode10.3 compiler: clang diff --git a/external/trecpp b/external/trecpp index f939d99cb..c01d5b9fa 160000 --- a/external/trecpp +++ b/external/trecpp @@ -1 +1 @@ -Subproject commit f939d99cb2fddd1e68c584a13e995c3cef194ad0 +Subproject commit c01d5b9fa12ef91a2dfb5f68530f1ec0654e4f93 From 6eb4d5a52dcd13e75a5964d6b4d2049392d550d8 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Mon, 1 Jun 2020 22:59:00 +0000 Subject: [PATCH 32/47] Update trecpp --- external/trecpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/trecpp b/external/trecpp index c01d5b9fa..f939d99cb 160000 --- a/external/trecpp +++ b/external/trecpp @@ -1 +1 @@ -Subproject commit c01d5b9fa12ef91a2dfb5f68530f1ec0654e4f93 +Subproject commit f939d99cb2fddd1e68c584a13e995c3cef194ad0 From 16ae9f6155ba974a91637a15a1bb6f8be97b770a Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Mon, 1 Jun 2020 23:00:24 +0000 Subject: [PATCH 33/47] Update warcpp --- external/warcpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/warcpp b/external/warcpp index 0c990c6c6..e05f1afb4 160000 --- a/external/warcpp +++ b/external/warcpp @@ -1 +1 @@ -Subproject commit 0c990c6c65801074d567a89f4970b1a1913c337f +Subproject commit e05f1afb4d37bc93d1fb97932b311be05b68de79 From 7cf5fc00b2c2c944bbab89061f39495d3c9afeb3 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 2 Jun 2020 01:19:04 +0000 Subject: [PATCH 34/47] Add external dependencies caching --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52339a244..888edcd98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,12 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Cache external depenencies + uses: actions/cache@v2 + with: + path: ${{ runner.workspace }}/build/external + key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }} + - name: Install (Linux) if: runner.os == 'Linux' shell: bash From b9e96bb599646becde57f8ecf2c76fe61f390d07 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 2 Jun 2020 01:20:27 +0000 Subject: [PATCH 35/47] Add external dependencies caching --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 888edcd98..5b5b713b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,9 +29,9 @@ jobs: - name: Cache external depenencies uses: actions/cache@v2 - with: - path: ${{ runner.workspace }}/build/external - key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }} + with: + path: ${{ runner.workspace }}/build/external + key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }} - name: Install (Linux) if: runner.os == 'Linux' From 2f291497d7139638084006eb694c81ff2e93bfe4 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 2 Jun 2020 02:11:30 +0000 Subject: [PATCH 36/47] Increase no. threads --- .github/workflows/ci.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b5b713b8..e3a34700b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,18 +27,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Cache external depenencies - uses: actions/cache@v2 - with: - path: ${{ runner.workspace }}/build/external - key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }} - - name: Install (Linux) if: runner.os == 'Linux' shell: bash run: | - # Install compiler - cc="${{ matrix.compiler }}-${{ matrix.version }}" cc="${cc%-}" cxx="${cc/clang/clang++}" @@ -60,6 +52,12 @@ jobs: shell: bash run: cmake -E make_directory ${{runner.workspace}}/build + - name: Cache external depenencies + uses: actions/cache@v2 + with: + path: ${{ runner.workspace }}/build/external + key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }} + - name: Configure shell: bash working-directory: ${{runner.workspace}}/build @@ -68,9 +66,9 @@ jobs: - name: Build shell: bash working-directory: ${{runner.workspace}}/build - run: cmake --build . --config Debug + run: cmake --build . --config Debug -- -j 4 - name: Test shell: bash working-directory: ${{runner.workspace}}/build - run: ctest + run: ctest -j From 06f513f218230c2dfd8bd5347c2316bc7bb8b713 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 2 Jun 2020 02:34:51 +0000 Subject: [PATCH 37/47] Increase no. threads --- .github/workflows/ci.yml | 2 +- .github/workflows/tidy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3a34700b..2f2d3e3c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: - name: Build shell: bash working-directory: ${{runner.workspace}}/build - run: cmake --build . --config Debug -- -j 4 + run: cmake --build . --config Debug -- -j 8 - name: Test shell: bash diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index fa2585ca3..4e382372f 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -39,4 +39,4 @@ jobs: - name: Build shell: bash working-directory: ${{runner.workspace}}/build - run: cmake --build . --config Debug + run: cmake --build . --config Debug -- -j 8 From fb9651952c22d4fb1d3a033a66146cef4acc800b Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 2 Jun 2020 02:52:47 +0000 Subject: [PATCH 38/47] Increase no. threads --- .github/workflows/ci.yml | 2 +- .github/workflows/tidy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f2d3e3c6..998fd51b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: - name: Build shell: bash working-directory: ${{runner.workspace}}/build - run: cmake --build . --config Debug -- -j 8 + run: cmake --build . --config Debug -- -j - name: Test shell: bash diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index 4e382372f..61ea8db81 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -39,4 +39,4 @@ jobs: - name: Build shell: bash working-directory: ${{runner.workspace}}/build - run: cmake --build . --config Debug -- -j 8 + run: cmake --build . --config Debug -- -j From a913239d3173440ea56d9af014cf4e78a35020f4 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 2 Jun 2020 12:32:22 +0000 Subject: [PATCH 39/47] Set 4 threads for make --- .github/workflows/ci.yml | 2 +- .github/workflows/tidy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 998fd51b7..e3a34700b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: - name: Build shell: bash working-directory: ${{runner.workspace}}/build - run: cmake --build . --config Debug -- -j + run: cmake --build . --config Debug -- -j 4 - name: Test shell: bash diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index 61ea8db81..96cbc0790 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -39,4 +39,4 @@ jobs: - name: Build shell: bash working-directory: ${{runner.workspace}}/build - run: cmake --build . --config Debug -- -j + run: cmake --build . --config Debug -- -j 4 From a860678e5ce9ba28950ef4f6ddc2d24f065c44d8 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 2 Jun 2020 12:58:25 +0000 Subject: [PATCH 40/47] Add libtool dep for workflows --- .github/workflows/ci.yml | 1 + .github/workflows/tidy.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3a34700b..e3b9efce2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,7 @@ jobs: sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi sudo apt-get update + sudo apt-get install -y libtool if [ "${{ matrix.compiler }}" = "gcc" ]; then sudo apt-get install -y "${cxx}" else diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index 96cbc0790..149b76575 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -19,6 +19,7 @@ jobs: sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" sudo apt-get update sudo apt-get install -y clang-10 clang-tidy-10 + sudo apt-get install -y libtool echo "::set-env name=CC::clang-10" echo "::set-env name=CXX::clang++-10" From 5cfd53d045fc12801eb0d9c9a850a4c21cf2f210 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 2 Jun 2020 13:11:24 +0000 Subject: [PATCH 41/47] Add gumbo dependencies --- .github/workflows/ci.yml | 2 +- .github/workflows/tidy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3b9efce2..15a9ea842 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi sudo apt-get update - sudo apt-get install -y libtool + sudo apt-get install -y libtool m4 autoconf if [ "${{ matrix.compiler }}" = "gcc" ]; then sudo apt-get install -y "${cxx}" else diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index 149b76575..daa17ad0f 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -19,7 +19,7 @@ jobs: sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" sudo apt-get update sudo apt-get install -y clang-10 clang-tidy-10 - sudo apt-get install -y libtool + sudo apt-get install -y libtool m4 autoconf echo "::set-env name=CC::clang-10" echo "::set-env name=CXX::clang++-10" From c303b4e15235b36cf820be2b5f74212709ff3422 Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 2 Jun 2020 20:11:01 +0000 Subject: [PATCH 42/47] Add missing key --- .github/workflows/ci.yml | 3 ++- .github/workflows/format.yml | 1 + .github/workflows/tidy.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd82d7293..e5ce081ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,7 @@ jobs: if [ "${cc}" = "clang-10" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi + sudo wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_18.04/Release.key -O "/etc/apt/trusted.gpg.d/devel:kubic:libcontainers:stable.asc" sudo apt-get update sudo apt-get install -y libtool m4 autoconf if [ "${{ matrix.compiler }}" = "gcc" ]; then @@ -72,4 +73,4 @@ jobs: - name: Test shell: bash working-directory: ${{runner.workspace}}/build - run: ctest -j 4 \ No newline at end of file + run: ctest -j 4 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 681a5a656..6241776d3 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -17,6 +17,7 @@ jobs: shell: bash run: | sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main" + sudo wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_18.04/Release.key -O "/etc/apt/trusted.gpg.d/devel:kubic:libcontainers:stable.asc" sudo apt-get update sudo apt-get install -y clang-format-9 echo "::set-env name=CC::clang-9 diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index daa17ad0f..e6a10ebad 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -17,6 +17,7 @@ jobs: shell: bash run: | sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" + sudo wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_18.04/Release.key -O "/etc/apt/trusted.gpg.d/devel:kubic:libcontainers:stable.asc" sudo apt-get update sudo apt-get install -y clang-10 clang-tidy-10 sudo apt-get install -y libtool m4 autoconf From c4328b37d86d20b6d876825c5d788ee68b17f31a Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 2 Jun 2020 20:21:50 +0000 Subject: [PATCH 43/47] Revert last changes --- .github/workflows/ci.yml | 1 - .github/workflows/format.yml | 1 - .github/workflows/tidy.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5ce081ac..b3621e922 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,6 @@ jobs: if [ "${cc}" = "clang-10" ]; then sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi - sudo wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_18.04/Release.key -O "/etc/apt/trusted.gpg.d/devel:kubic:libcontainers:stable.asc" sudo apt-get update sudo apt-get install -y libtool m4 autoconf if [ "${{ matrix.compiler }}" = "gcc" ]; then diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 6241776d3..681a5a656 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -17,7 +17,6 @@ jobs: shell: bash run: | sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main" - sudo wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_18.04/Release.key -O "/etc/apt/trusted.gpg.d/devel:kubic:libcontainers:stable.asc" sudo apt-get update sudo apt-get install -y clang-format-9 echo "::set-env name=CC::clang-9 diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index e6a10ebad..daa17ad0f 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -17,7 +17,6 @@ jobs: shell: bash run: | sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" - sudo wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_18.04/Release.key -O "/etc/apt/trusted.gpg.d/devel:kubic:libcontainers:stable.asc" sudo apt-get update sudo apt-get install -y clang-10 clang-tidy-10 sudo apt-get install -y libtool m4 autoconf From 9785c3bc03a5e3473a3a8141819dcb5c3607728d Mon Sep 17 00:00:00 2001 From: Antonio Mallia Date: Fri, 5 Jun 2020 19:11:03 +0200 Subject: [PATCH 44/47] Update ci.yml --- .github/workflows/ci.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 449fa3b51..e6ab65b9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,38 +48,36 @@ jobs: sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" fi sudo apt-get update - sudo apt-get install -y libtool m4 autoconf + sudo apt-get install -y libtool m4 autoconf ccache if [ "${{ matrix.compiler }}" = "gcc" ]; then sudo apt-get install -y "${cxx}" else sudo apt-get install -y "${cc}" fi - echo "::set-env name=CC::${cc}" - echo "::set-env name=CXX::${cxx}" + echo "::set-env name=CC::ccache ${cc}" + echo "::set-env name=CXX::ccache ${cxx}" - name: Install (macOS) if: runner.os == 'macOS' run: | - brew install autoconf automake libtool cmake + brew install autoconf automake libtool cmake ccache if [ "${{ matrix.compiler }}" = "gcc" ]; then - echo "::set-env name=CC::gcc-${{ matrix.version }}" - echo "::set-env name=CXX::g++-${{ matrix.version }}" + echo "::set-env name=CC::ccache gcc-${{ matrix.version }}" + echo "::set-env name=CXX::ccache g++-${{ matrix.version }}" else sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app - echo "::set-env name=CC::$(xcrun -f clang)" - echo "::set-env name=CXX::$(xcrun -f clang++)" + echo "::set-env name=CC::ccache $(xcrun -f clang)" + echo "::set-env name=CXX::ccache $(xcrun -f clang++)" echo "::set-env name=SDKROOT::$(xcodebuild -version -sdk macosx Path)" echo "::set-env name=PATH::$(dirname $(xcrun -f clang)):$PATH" fi - name: Create Build Environment shell: bash run: cmake -E make_directory ${{runner.workspace}}/build - - - name: Cache external depenencies - uses: actions/cache@v2 + - name: Cache ccache files + uses: actions/cache@v1.1.2 with: - path: ${{ runner.workspace }}/build/external - key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }} - + path: ~/.ccache + key: ${{ runner.os }}-${{ matrix.CC }}-${{ hashFiles('**/*.c') }}-${{ hashFiles('**/*.cpp') }} - name: Configure shell: bash working-directory: ${{runner.workspace}}/build From 4eab88c0ccb61332498687a3cce48bb4c83aa071 Mon Sep 17 00:00:00 2001 From: Antonio Mallia Date: Fri, 5 Jun 2020 19:12:05 +0200 Subject: [PATCH 45/47] Update ci.yml --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6ab65b9e..a475dd451 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,8 +86,9 @@ jobs: - name: Build shell: bash working-directory: ${{runner.workspace}}/build - run: cmake --build . --config Debug -- -j 4 - + run: | + [ -d "$HOME/.ccache" ] && sudo chown -R "$USER": "$HOME/.ccache" + cmake --build . --config Debug -- -j 4 - name: Test shell: bash working-directory: ${{runner.workspace}}/build From 2dbde45a3d8d7b2e2252651e09064b256382a5b1 Mon Sep 17 00:00:00 2001 From: Antonio Mallia Date: Fri, 5 Jun 2020 19:20:05 +0200 Subject: [PATCH 46/47] Update ci.yml --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a475dd451..815505450 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,8 +54,8 @@ jobs: else sudo apt-get install -y "${cc}" fi - echo "::set-env name=CC::ccache ${cc}" - echo "::set-env name=CXX::ccache ${cxx}" + echo "::set-env name=CC::${cc}" + echo "::set-env name=CXX::${cxx}" - name: Install (macOS) if: runner.os == 'macOS' run: | @@ -65,8 +65,8 @@ jobs: echo "::set-env name=CXX::ccache g++-${{ matrix.version }}" else sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app - echo "::set-env name=CC::ccache $(xcrun -f clang)" - echo "::set-env name=CXX::ccache $(xcrun -f clang++)" + echo "::set-env name=CC::$(xcrun -f clang)" + echo "::set-env name=CXX::$(xcrun -f clang++)" echo "::set-env name=SDKROOT::$(xcodebuild -version -sdk macosx Path)" echo "::set-env name=PATH::$(dirname $(xcrun -f clang)):$PATH" fi From 70390506501b8a6359c8fadcd131e37f15d936ba Mon Sep 17 00:00:00 2001 From: Antonio Mallia Date: Fri, 5 Jun 2020 19:25:52 +0200 Subject: [PATCH 47/47] Update ci.yml --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 815505450..fb78b567b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,9 +60,10 @@ jobs: if: runner.os == 'macOS' run: | brew install autoconf automake libtool cmake ccache + export PATH="/usr/local/opt/ccache/libexec:$PATH"; if [ "${{ matrix.compiler }}" = "gcc" ]; then - echo "::set-env name=CC::ccache gcc-${{ matrix.version }}" - echo "::set-env name=CXX::ccache g++-${{ matrix.version }}" + echo "::set-env name=CC::gcc-${{ matrix.version }}" + echo "::set-env name=CXX::g++-${{ matrix.version }}" else sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app echo "::set-env name=CC::$(xcrun -f clang)"