This is an automated email from the ASF dual-hosted git repository.

placave pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datasketches-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new 15b1e0e  ci: generate snaps stably (#65)
15b1e0e is described below

commit 15b1e0e30a6591c67a94c30b331f882350d45921
Author: tison <[email protected]>
AuthorDate: Thu Jan 8 20:51:59 2026 +0800

    ci: generate snaps stably (#65)
    
    Signed-off-by: tison <[email protected]>
---
 .github/workflows/ci.yml                  | 22 +++++++++++++---------
 tools/generate_serialization_test_data.py | 22 +++++++++++++++++++---
 2 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 318599e..02ffb73 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -85,6 +85,19 @@ jobs:
         run: |
           rustup toolchain install ${{ matrix.rust-version }}
           rustup default ${{ matrix.rust-version }}
+      - name: Run examples
+        shell: bash
+        working-directory: examples
+        run: |
+          set -x
+          METADATA=$( cargo metadata --format-version=1 --no-deps )
+          EXAMPLES=$( echo "$METADATA" | jq -r '.packages[] | select(.name == 
"examples") | .targets[].name' | tr -d '\r' )
+          while read -r example; do
+            if [ -n "$example" ]; then
+              echo "Running example: $example"
+              cargo run --bin "$example"
+            fi
+          done <<< "$EXAMPLES"
       - name: Setup Java
         uses: actions/setup-java@v5
         with:
@@ -96,15 +109,6 @@ jobs:
       - name: Run unit tests
         shell: bash
         run: cargo x test
-      - name: Run examples
-        shell: bash
-        working-directory: examples
-        run: |
-          set -x
-          EXAMPLES=( hll_update )
-          for example in $EXAMPLES; do
-            cargo run --bin "$example"
-          done
 
   required:
     name: Required
diff --git a/tools/generate_serialization_test_data.py 
b/tools/generate_serialization_test_data.py
index 7fb488b..c965f39 100755
--- a/tools/generate_serialization_test_data.py
+++ b/tools/generate_serialization_test_data.py
@@ -71,7 +71,15 @@ def generate_java_files(workspace_dir, project_dir):
 
     # 4. Clone repository
     repo_url = "https://github.com/apache/datasketches-java.git";
-    run_command(["git", "clone", repo_url, str(temp_dir)])
+    branch = "9.0.0" # FIXME: temporarily use fixed branch until mvn issue is 
resolved
+    run_command([
+        "git", "clone",
+        "--depth", "1",
+        "--branch", branch,
+        "--single-branch",
+        repo_url,
+        str(temp_dir)
+    ])
 
     # 5. Run Maven to generate files
     mvn_cmd = ["mvn", "test", "-P", "generate-java-files"]
@@ -125,7 +133,15 @@ def generate_cpp_files(workspace_dir, project_root):
 
     # 4. Clone repository
     repo_url = "https://github.com/apache/datasketches-cpp.git";
-    run_command(["git", "clone", repo_url, str(temp_dir)])
+    branch = "master"
+    run_command([
+        "git", "clone",
+        "--depth", "1",
+        "--branch", branch,
+        "--single-branch",
+        repo_url,
+        str(temp_dir)
+    ])
 
     # 5. Build and Run CMake
     build_dir = temp_dir / "build"
@@ -152,7 +168,7 @@ def generate_cpp_files(workspace_dir, project_root):
     files_copied = 0
     # Search recursively in build directory for *_cpp.sk
     for file_path in build_dir.rglob("*_cpp.sk"):
-         # Avoid copying from CMakeFiles or other intermediate dirs if 
possible, but the pattern is specific enough
+        # Avoid copying from CMakeFiles or other intermediate dirs if 
possible, but the pattern is specific enough
         shutil.copy2(file_path, output_dir)
         print(f"Copied: {file_path.name}")
         files_copied += 1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to