revert: roll back tests.yml CI changes from PR #16391 (#16505)

## Summary

Two changes to make Go build \& run independent of native libraries
(office_oxide, pdfium, pdf_oxide).

## 1. Make native libraries optional (build.sh + Go source)

## 2. Roll back tests.yml CI changes from PR #16391
This commit is contained in:
Jack
2026-06-30 21:50:37 +08:00
committed by GitHub
parent 5af361ed68
commit 8e1dc4f308
10 changed files with 63 additions and 41 deletions

View File

@@ -210,14 +210,8 @@ jobs:
-v "${PWD}/internal/cpp/resource:/usr/share/infinity/resource" \
infiniflow/infinity_builder:ubuntu22_clang20
sudo docker exec "${BUILDER_CONTAINER}" bash -c 'git config --global safe.directory "*" && cd /ragflow && ./build.sh --cpp'
uv sync --python 3.13 --group test --frozen
./build.sh --go
- name: Prepare Python test environment
run: |
uv sync --python 3.13 --group test --frozen
uv pip install -e sdk/python
- name: Run Go unit tests
# Runs after `./build.sh --go`, which guarantees the C++ static
# library (librag_tokenizer_c_api.a) is present on disk. The Go
@@ -240,7 +234,10 @@ jobs:
PKGS=$(go list ./... 2>/dev/null \
| grep -v '/internal/storage$' \
| grep -v '/internal/tokenizer$' \
| grep -v '/internal/handler$' || true)
| grep -v '/internal/handler$' \
| grep -v '/internal/deepdoc/parser/pdf/pdfium' \
| grep -v '/internal/deepdoc/parser/pdf/pdfoxide' \
| grep -v '/internal/deepdoc/parser/pdf' || true)
if [ -z "$PKGS" ]; then
./build.sh --test
else
@@ -253,6 +250,11 @@ jobs:
sudo docker pull ubuntu:24.04
sudo DOCKER_BUILDKIT=1 docker build --build-arg NEED_MIRROR=1 --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile -t ${RAGFLOW_IMAGE} .
- name: Prepare Python test environment
run: |
uv sync --python 3.13 --group test --frozen
uv pip install -e sdk/python
- name: Prepare function test environment
working-directory: docker
run: |
@@ -654,14 +656,8 @@ jobs:
-v "${PWD}/internal/cpp/resource:/usr/share/infinity/resource" \
infiniflow/infinity_builder:ubuntu22_clang20
sudo docker exec "${BUILDER_CONTAINER}" bash -c 'git config --global safe.directory "*" && cd /ragflow && ./build.sh --cpp'
uv sync --python 3.13 --group test --frozen
./build.sh --go
- name: Prepare Python test environment
run: |
uv sync --python 3.13 --group test --frozen
uv pip install -e sdk/python
- name: Run Go unit tests
# Runs after `./build.sh --go`, which guarantees the C++ static
# library (librag_tokenizer_c_api.a) is present on disk. The Go
@@ -684,7 +680,10 @@ jobs:
PKGS=$(go list ./... 2>/dev/null \
| grep -v '/internal/storage$' \
| grep -v '/internal/tokenizer$' \
| grep -v '/internal/handler$' || true)
| grep -v '/internal/handler$' \
| grep -v '/internal/deepdoc/parser/pdf/pdfium' \
| grep -v '/internal/deepdoc/parser/pdf/pdfoxide' \
| grep -v '/internal/deepdoc/parser/pdf' || true)
if [ -z "$PKGS" ]; then
./build.sh --test
else
@@ -697,6 +696,11 @@ jobs:
sudo docker pull ubuntu:24.04
sudo DOCKER_BUILDKIT=1 docker build --build-arg NEED_MIRROR=1 --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile -t ${RAGFLOW_IMAGE} .
- name: Prepare Python test environment
run: |
uv sync --python 3.13 --group test --frozen
uv pip install -e sdk/python
- name: Prepare function test environment
working-directory: docker
run: |