Merge branch 'fix/strings-leak-on-composites-sunstitution' into 'deve… #2952
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: build | |
| on: push | |
| jobs: | |
| build-windows-latest: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| compiler: ['Visual Studio 17 2022', 'MinGW Makefiles'] | |
| fail-fast: false | |
| env: | |
| EXTRA_FLAGS: | |
| "${{ matrix.compiler == 'Visual Studio 17 2022' && '-Ax64' || '' }}" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install NSIS | |
| uses: repolevedavaj/install-nsis@v1.0.3 | |
| with: | |
| nsis-version: '3.11' | |
| - name: Build Reindexer | |
| run: | | |
| mkdir build && cd build | |
| cmake -G "${{matrix.compiler}}" -DBUILD_ANN_INDEXES=builtin .. $EXTRA_FLAGS | |
| cmake --build . --config Release | |
| cmake --build . --config Release --target face | |
| cmake --build . --config Release --target swagger | |
| cpack | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04, macos-15] | |
| include: | |
| - os: ubuntu-latest | |
| sanitizer: ASAN | |
| - os: ubuntu-latest | |
| sanitizer: TSAN | |
| cc: gcc-12 | |
| cxx: g++-12 | |
| fail-fast: false | |
| runs-on: ${{matrix.os}} | |
| env: | |
| OS: ${{matrix.os}} | |
| CC: ${{matrix.cc}} | |
| CXX: ${{matrix.cxx}} | |
| SANITIZER: ${{matrix.sanitizer}} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Prepare Environment | |
| run: | | |
| ./.github/workflows/install_gtest.sh | |
| ./.github/workflows/install_gtest_parallel.sh | |
| if [[ $OS == ubuntu* ]]; then | |
| sudo ./dependencies.sh | |
| ./.github/workflows/install_grpc.sh | |
| ./.github/workflows/install_gbench.sh | |
| else | |
| ./dependencies.sh | |
| fi | |
| - name: Build Reindexer | |
| run: | | |
| export CPLUS_INCLUDE_PATH=$GITHUB_WORKSPACE/grpc/third_party/abseil-cpp | |
| mkdir build && cd build | |
| if [[ $OS == ubuntu-latest ]]; then | |
| if [[ $SANITIZER == 'ASAN' ]]; then | |
| cmake -DENABLE_GRPC=ON -DWITH_${{matrix.sanitizer}}=On -DGTEST_SKIP_ASAN_MEMORY_HEAVY=On .. | |
| else | |
| cmake -DENABLE_GRPC=ON -DWITH_${{matrix.sanitizer}}=On .. | |
| fi | |
| elif [[ $OS == macos* ]]; then | |
| cmake -DGH_CI_OSX=ON .. | |
| else | |
| cmake -DENABLE_GRPC=ON .. | |
| fi | |
| make -j4 | |
| STRIP=/bin/true cpack | |
| - name: 'C++ tests' | |
| if: ${{ matrix.os == 'macos-13' }} | |
| run: | | |
| echo "Running C++ directly in this job due to Action's problem with artifacts transition for macos-11 and macos-12 runners" | |
| cd build | |
| ctest --verbose -R gtests | |
| - name: 'Tar Artifacts' | |
| run: | | |
| find ./build/ -name CMakeFiles | xargs -n1 rm -rf | |
| rm -rf ./build/_CPack_Packages ./build/cpp_src/server/reindexer_server_resources | |
| tar -cvf artifacts.tar build/ bindings/builtin/builtin_posix.go bindings/builtinserver/builtinserver_posix.go dependencies.sh | |
| - name: Archive Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{matrix.os}}${{matrix.sanitizer}} | |
| path: artifacts.tar | |
| if-no-files-found: error | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04, macos-15] | |
| test: ['C++', 'GO'] | |
| include: | |
| - os: ubuntu-latest | |
| sanitizer: ASAN | |
| test: 'C++' | |
| - os: ubuntu-latest | |
| sanitizer: ASAN | |
| test: 'GO' | |
| # os: ubuntu-latest | |
| # test: 'C++' | |
| - os: ubuntu-latest | |
| sanitizer: TSAN | |
| test: 'GO' | |
| fail-fast: false | |
| runs-on: ${{matrix.os}} | |
| needs: build | |
| if: always() | |
| env: | |
| CC: ${{matrix.cc}} | |
| CXX: ${{matrix.cxx}} | |
| TEST: ${{matrix.test}} | |
| SANITIZER: ${{matrix.sanitizer}} | |
| steps: | |
| - name: Checkout repository | |
| if: ${{ matrix.os != 'macos-15' || matrix.test == 'GO' }} | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| if: ${{ matrix.os == 'macos-15' && matrix.test == 'GO' }} | |
| with: | |
| go-version: '1.24.x' | |
| check-latest: true | |
| - name: Download ${{matrix.os}}${{matrix.sanitizer}} Artifacts | |
| if: ${{ matrix.os != 'macos-15' || matrix.test == 'GO' }} | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{matrix.os}}${{matrix.sanitizer}} | |
| - name: 'Untar Artifacts' | |
| if: ${{ matrix.os != 'macos-15' || matrix.test == 'GO' }} | |
| run: tar -xvf artifacts.tar | |
| - name: Prepare Environment | |
| if: ${{ matrix.os != 'macos-15' || matrix.test == 'GO' }} | |
| env: | |
| OS: ${{matrix.os}} | |
| run: | | |
| if [[ $OS == ubuntu* ]]; then | |
| sudo ./dependencies.sh | |
| else | |
| ./dependencies.sh | |
| fi | |
| if [[ $TEST == 'GO' ]]; then | |
| go mod download | |
| elif [[ $OS == ubuntu* ]]; then | |
| ./.github/workflows/install_gtest_parallel.sh | |
| fi | |
| - name: Tests | |
| if: ${{ matrix.os != 'macos-15' || matrix.test == 'GO' }} | |
| run: | | |
| if [[ $TEST == 'GO' ]]; then | |
| if [[ $SANITIZER == 'ASAN' ]]; then | |
| export REINDEXER_GH_CI_ASAN=true | |
| fi | |
| if [[ -z "$SANITIZER" ]]; then | |
| go test -timeout 15m ./test/... -bench . -benchmem -benchtime 100ms -seedcount 50000 | |
| else | |
| export TSAN_OPTIONS="halt_on_error=1 suppressions=$PWD/test/tsan/builtin.tsan.suppressions" | |
| mkdir gotests | |
| # Using preocompiled tests to get readable Thread sanitizer backtraces from builtin C++ library | |
| go test ./test/... -c -o gotests -tags tiny_vectors | |
| ./gotests/test.test -test.timeout 35m -test.bench . -test.benchmem -test.benchtime 100ms -seedcount 50000 | |
| ./gotests/ft.test -test.bench . -test.benchmem -test.benchtime 100ms -seedcount 50000 | |
| fi | |
| else | |
| cd build | |
| ctest --verbose | |
| fi | |
| test-pyreindexer: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04] | |
| fail-fast: false | |
| runs-on: ${{matrix.os}} | |
| needs: build | |
| if: always() | |
| env: | |
| OS: ${{matrix.os}} | |
| steps: | |
| - name: Download ${{matrix.os}} Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{matrix.os}} | |
| - name: 'Untar Artifacts' | |
| run: tar -xvf artifacts.tar | |
| - name: Prepare Environment | |
| run: | | |
| if [[ $OS == ubuntu* ]]; then | |
| sudo ./dependencies.sh | |
| python3 -m pip install setuptools build | |
| else | |
| ./dependencies.sh | |
| fi | |
| - name: Install Reindexer | |
| run: | | |
| cd build | |
| if [[ $OS == ubuntu* ]]; then | |
| sudo dpkg -i reindexer-dev*.deb | |
| sudo apt-get install -f | |
| sudo dpkg -i reindexer-server*.deb | |
| sudo apt-get install -f | |
| else | |
| for f in reindexer-*.tar.gz; do tar -xvzf "$f"; done | |
| cp -R ./usr/local/include/reindexer /usr/local/include/reindexer | |
| cp -R ./usr/local/lib/reindexer /usr/local/lib/reindexer | |
| cp ./usr/local/lib/libreindexer.a /usr/local/lib/libreindexer.a | |
| cp ./usr/local/lib/libreindexer_server_library.a /usr/local/lib/libreindexer_server_library.a | |
| cp ./usr/local/lib/libreindexer_server_resources.a /usr/local/lib/libreindexer_server_resources.a | |
| cp ./usr/local/lib/pkgconfig/libreindexer.pc /usr/local/lib/pkgconfig/libreindexer.pc | |
| cp ./usr/local/lib/pkgconfig/libreindexer_server.pc /usr/local/lib/pkgconfig/libreindexer_server.pc | |
| cp ./usr/local/bin/reindexer_server /usr/local/bin/reindexer_server | |
| cp ./usr/local/etc/reindexer.conf.pkg /usr/local/etc/reindexer.conf.pkg | |
| fi | |
| - name: Clone PyReindexer | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: restream/reindexer-py | |
| - name: Install PyReindexer | |
| run: | | |
| python -m build | |
| python -m pip install . | |
| - name: Test PyReindexer | |
| run: | | |
| cd pyreindexer | |
| ../.github/workflows/test.sh |