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

haonan pushed a commit to branch ht/playgrand
in repository https://gitbox.apache.org/repos/asf/tsfile.git

commit 93a5d57597dec920dc968df64023cbc91e9eb068
Author: HTHou <[email protected]>
AuthorDate: Fri Jul 12 11:06:23 2024 +0800

    optimize ci and python build
---
 .github/workflows/codeql.yml    |  2 ++
 .github/workflows/unit-test.yml | 19 ++++++++++++-------
 python/setup.py                 | 38 ++++++++++++--------------------------
 3 files changed, 26 insertions(+), 33 deletions(-)

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 0c968ef3..d0d3fc9c 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -14,6 +14,8 @@ name: "CodeQL"
 on:
   push:
     branches: [ "develop" ]
+    paths-ignore:
+      - 'docs/**'
 
 jobs:
   analyze:
diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
index a529989d..d80d6fe5 100644
--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -7,11 +7,16 @@ on:
   push:
     branches:
       - develop
-      - 'rel/*'
+      - iotdb
+      - ht/playgrand
+    paths-ignore:
+      - 'docs/**'
   pull_request:
     branches:
       - develop
-      - 'rel/*'
+      - iotdb
+    paths-ignore:
+      - 'docs/**'
   # Enable manually starting builds, and allow forcing updating of SNAPSHOT 
dependencies.
   workflow_dispatch:
     inputs:
@@ -75,11 +80,11 @@ jobs:
 
       # Use python 3.12 to avoid Cython files don't compile on Mingw-w64 64-bit
       # https://bugs.python.org/issue40167
-      - name: Set up python 3.12 for windows
-        if: ${{ matrix.os == 'windows-latest'}}
-        uses: actions/setup-python@v5
-        with:
-          python-version: '3.12' 
+#      - name: Set up python 3.12 for windows
+#        if: ${{ matrix.os == 'windows-latest'}}
+#        uses: actions/setup-python@v5
+#        with:
+#          python-version: '3.12'
 
       # Run the actual maven build including all unit- and integration-tests.
       - name: Build and test with Maven (All others)
diff --git a/python/setup.py b/python/setup.py
index 3d57e55f..20820b88 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -73,32 +73,18 @@ source_include_dir = os.path.join(
 target_include_dir = os.path.join(project_dir, "tsfile", "TsFile-cwrapper.h")
 copy_header(source_include_dir, target_include_dir)
 
-
-if platform.system() == "Windows":
-    ext_modules_tsfile = [
-        Extension(
-            "tsfile.tsfile_pywrapper",
-            sources=[source_file],
-            libraries=["tsfile"],
-            library_dirs=[libtsfile_dir],
-            include_dirs=[include_dir, np.get_include()],
-            extra_compile_args=["-std=c++11"],
-            language="c++",
-        )
-    ]
-else:
-    ext_modules_tsfile = [
-        Extension(
-            "tsfile.tsfile_pywrapper",
-            sources=[source_file],
-            libraries=["tsfile"],
-            library_dirs=[libtsfile_dir],
-            include_dirs=[include_dir, np.get_include()],
-            runtime_library_dirs=[libtsfile_dir],
-            extra_compile_args=["-std=c++11"],
-            language="c++",
-        )
-    ]
+ext_modules_tsfile = [
+    Extension(
+        "tsfile.tsfile_pywrapper",
+        sources=[source_file],
+        libraries=["tsfile"],
+        library_dirs=[libtsfile_dir],
+        include_dirs=[include_dir, np.get_include()],
+        runtime_library_dirs=[libtsfile_dir if platform.system() != "Windows"],
+        extra_compile_args=["-std=c++11"],
+        language="c++",
+    )
+]
 
 setup(
     name="tsfile",

Reply via email to