From cced19228036c5be357ad28a010bc8f9fbdccb9a Mon Sep 17 00:00:00 2001 From: Sergey Nikolaev Date: Mon, 9 Oct 2023 17:46:13 +0700 Subject: [PATCH 1/8] CI: use Debug build in the test-kit --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3f4095d046..045b965116c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -366,6 +366,7 @@ jobs: cmake --build . --target package cache_key: pack_jammy_x86_64 artifact_list: "build/manticore*deb" + CTEST_CONFIGURATION_TYPE: "Debug" build_test_kit_docker: name: Test Kit docker image @@ -386,7 +387,7 @@ jobs: uses: manticoresoftware/download_artifact_with_retries@v2 continue-on-error: true with: - name: build_jammy_RelWithDebInfo_x86_64 + name: build_jammy_Debug_x86_64 path: . # Uncomment this shortcut for debug to save time by not preparing the packages in the pack_jammy job # - run: | From dc9712c2b72b2e0a94540854da4faa8e6ff94a98 Mon Sep 17 00:00:00 2001 From: Sergey Nikolaev Date: Mon, 9 Oct 2023 18:29:04 +0700 Subject: [PATCH 2/8] Fix to prev --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 045b965116c..e93006cd201 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -362,11 +362,10 @@ jobs: cmake_command: | mkdir build cd build - cmake -DPACK=1 .. + cmake -DPACK=1 -DCMAKE_BUILD_TYPE=Debug .. cmake --build . --target package cache_key: pack_jammy_x86_64 artifact_list: "build/manticore*deb" - CTEST_CONFIGURATION_TYPE: "Debug" build_test_kit_docker: name: Test Kit docker image From 4da4ebe30bf8e034e6e899626c74dc66cfbe23b6 Mon Sep 17 00:00:00 2001 From: Sergey Nikolaev Date: Mon, 9 Oct 2023 20:34:22 +0700 Subject: [PATCH 3/8] Fix to prev --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e93006cd201..c7214ccee7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -366,6 +366,7 @@ jobs: cmake --build . --target package cache_key: pack_jammy_x86_64 artifact_list: "build/manticore*deb" + CTEST_CONFIGURATION_TYPE: "Debug" build_test_kit_docker: name: Test Kit docker image From d395bfc531b73f4da3234056d9f0b487e782326a Mon Sep 17 00:00:00 2001 From: Sergey Nikolaev Date: Mon, 9 Oct 2023 21:13:01 +0700 Subject: [PATCH 4/8] CI: Improvement in test_kit_docker.sh, so the tag includes the branch name if it's not master --- dist/test_kit_docker.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/test_kit_docker.sh b/dist/test_kit_docker.sh index 23b109860f7..c1431b3fc8b 100644 --- a/dist/test_kit_docker.sh +++ b/dist/test_kit_docker.sh @@ -141,8 +141,9 @@ docker exec manticore-test-kit bash -c \ docker exec manticore-test-kit bash -c \ "php -r \"copy('https://getcomposer.org/installer', 'composer-setup.php');\" && php -r \"if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;\" && php composer-setup.php && php -r \"unlink('composer-setup.php');\" && mv composer.phar /usr/bin/composer || true" -img_url="ghcr.io/manticoresoftware/manticoresearch:test-kit-$BUILD_COMMIT" -img_url_latest="ghcr.io/manticoresoftware/manticoresearch:test-kit-latest" +[[ $GITHUB_REF_NAME == "master" ]] && branch="" || branch="-$GITHUB_REF_NAME" +img_url="ghcr.io/manticoresoftware/manticoresearch:test-kit-${BUILD_COMMIT}${branch}" +img_url_latest="ghcr.io/manticoresoftware/manticoresearch:test-kit-latest${branch}" # exporting the image, it also squashes all the layers into one docker export manticore-test-kit > ../manticore_test_kit.img From 82f9bec841e6065a2813b7a55918c1669852a2fe Mon Sep 17 00:00:00 2001 From: Sergey Nikolaev Date: Mon, 9 Oct 2023 21:27:58 +0700 Subject: [PATCH 5/8] Fix to prev --- dist/test_kit_docker.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/test_kit_docker.sh b/dist/test_kit_docker.sh index c1431b3fc8b..ee2f0c54f72 100644 --- a/dist/test_kit_docker.sh +++ b/dist/test_kit_docker.sh @@ -144,6 +144,7 @@ docker exec manticore-test-kit bash -c \ [[ $GITHUB_REF_NAME == "master" ]] && branch="" || branch="-$GITHUB_REF_NAME" img_url="ghcr.io/manticoresoftware/manticoresearch:test-kit-${BUILD_COMMIT}${branch}" img_url_latest="ghcr.io/manticoresoftware/manticoresearch:test-kit-latest${branch}" +echo "Going to push to $img_url and $img_url_latest if there's access to the registry" # exporting the image, it also squashes all the layers into one docker export manticore-test-kit > ../manticore_test_kit.img From 8dd9a05515120a2cd2d7ccdf028d58fa136bf6f2 Mon Sep 17 00:00:00 2001 From: Sergey Nikolaev Date: Mon, 9 Oct 2023 21:42:08 +0700 Subject: [PATCH 6/8] Fix to prev --- dist/test_kit_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/test_kit_docker.sh b/dist/test_kit_docker.sh index ee2f0c54f72..797b3ede6fc 100644 --- a/dist/test_kit_docker.sh +++ b/dist/test_kit_docker.sh @@ -141,7 +141,7 @@ docker exec manticore-test-kit bash -c \ docker exec manticore-test-kit bash -c \ "php -r \"copy('https://getcomposer.org/installer', 'composer-setup.php');\" && php -r \"if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;\" && php composer-setup.php && php -r \"unlink('composer-setup.php');\" && mv composer.phar /usr/bin/composer || true" -[[ $GITHUB_REF_NAME == "master" ]] && branch="" || branch="-$GITHUB_REF_NAME" +[[ $GITHUB_REF_NAME == "master" ]] && branch="" || branch="-${GITHUB_REF_NAME////-}" img_url="ghcr.io/manticoresoftware/manticoresearch:test-kit-${BUILD_COMMIT}${branch}" img_url_latest="ghcr.io/manticoresoftware/manticoresearch:test-kit-latest${branch}" echo "Going to push to $img_url and $img_url_latest if there's access to the registry" From 9a2f293fcc909febc40c8c9dffc68c9efd6e816c Mon Sep 17 00:00:00 2001 From: Sergey Nikolaev Date: Mon, 9 Oct 2023 22:09:29 +0700 Subject: [PATCH 7/8] Fix to prev --- dist/test_kit_docker.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dist/test_kit_docker.sh b/dist/test_kit_docker.sh index 797b3ede6fc..c22c7782a0f 100644 --- a/dist/test_kit_docker.sh +++ b/dist/test_kit_docker.sh @@ -143,16 +143,20 @@ docker exec manticore-test-kit bash -c \ [[ $GITHUB_REF_NAME == "master" ]] && branch="" || branch="-${GITHUB_REF_NAME////-}" img_url="ghcr.io/manticoresoftware/manticoresearch:test-kit-${BUILD_COMMIT}${branch}" -img_url_latest="ghcr.io/manticoresoftware/manticoresearch:test-kit-latest${branch}" -echo "Going to push to $img_url and $img_url_latest if there's access to the registry" +images=("$img_url") +[[ $GITHUB_REF_NAME == "master" ]] \ + && img_url_latest="ghcr.io/manticoresoftware/manticoresearch:test-kit-latest" \ + && images+=("$img_url_latest") \ + || img_url_latest="" + +echo "Going to push to '$img_url' and '$img_url_latest' (if not empty) if there's access to the registry" # exporting the image, it also squashes all the layers into one docker export manticore-test-kit > ../manticore_test_kit.img docker import ../manticore_test_kit.img $img_url -docker tag $img_url $img_url_latest +[ ! -z "$img_url_latest" ] && docker tag $img_url $img_url_latest # pusing to ghcr.io -images=("$img_url" "$img_url_latest") [ ! -z "$GHCR_USER" ] && for img in "${images[@]}"; do docker push $img \ && echo "❗ Pushed the image to $img" \ From 95e18f1b2d80ab8c449dee06dd4163100772e6dc Mon Sep 17 00:00:00 2001 From: Sergey Nikolaev Date: Mon, 9 Oct 2023 22:47:23 +0700 Subject: [PATCH 8/8] Fix in dist/test_kit_docker.sh (lemmatizer_base was set wrong) --- dist/test_kit_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/test_kit_docker.sh b/dist/test_kit_docker.sh index c22c7782a0f..e6e7c64ce26 100644 --- a/dist/test_kit_docker.sh +++ b/dist/test_kit_docker.sh @@ -15,7 +15,7 @@ cd docker cat > manticore.conf << EOF common { plugin_dir = /usr/local/lib/manticore - lemmatizer_base = /usr/share/manticore/morph/ + lemmatizer_base = /usr/share/manticore/ } searchd { listen = 9306:mysql41