You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tsfile.apache.org by co...@apache.org on 2026/09/17 07:36:35 UTC
(tsfile) 20/22: fix(ci): address native packaging runner failures
This is an automated email from the ASF dual-hosted git repository.
ColinLeeo pushed a commit to branch feat/native-package-artifacts
in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit ffae604c3cd6a8bb86d3846adae34a4b6d4d33cc
Author: ColinLee <sh...@163.com>
AuthorDate: Thu Sep 10 23:18:44 2026 +0800
fix(ci): address native packaging runner failures
---
.github/workflows/native-packages.yml | 4 +--
cpp/src/utils/util_define.h | 4 +--
.../2026-09-10-native-package-artifacts-design.md | 4 ++-
packaging/README.md | 7 ++++-
packaging/homebrew/tsfile-dev.rb.in | 1 +
packaging/tests/check_native_workflow.rb | 5 ++++
packaging/tests/test_native_install.py | 30 ++++++++++++++++++++++
packaging/tests/test_render_homebrew_formula.py | 5 ++++
8 files changed, 54 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/native-packages.yml b/.github/workflows/native-packages.yml
index f6f349315..99bf2d8bb 100644
--- a/.github/workflows/native-packages.yml
+++ b/.github/workflows/native-packages.yml
@@ -205,7 +205,7 @@ jobs:
dnf install -y \
cmake \
gcc-c++ \
- ninja-build \
+ make \
pkgconf-pkg-config \
rpm-build \
git \
@@ -224,7 +224,7 @@ jobs:
TSFILE_RPM_PACKAGE_RELEASE: ${{ needs.prepare.outputs.rpm_release }}
shell: bash
run: |
- cmake -S cpp -B build/rpm -G Ninja \
+ cmake -S cpp -B build/rpm \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TEST=OFF \
-DBUILD_TOOLS=ON \
diff --git a/cpp/src/utils/util_define.h b/cpp/src/utils/util_define.h
index 564581a11..f7f638e5b 100644
--- a/cpp/src/utils/util_define.h
+++ b/cpp/src/utils/util_define.h
@@ -147,13 +147,13 @@ typedef int mode_t;
* @msg should be a single word (use -/_ to concat)
* such as This_should_be_TRUE
*/
-#if __cplusplus < 201103L
+#if __cplusplus < 201103L && !defined(_MSC_VER)
// TODO only define this when DEBUG
#define STATIC_ASSERT(cond, msg) \
typedef char static_assertion_##msg[(cond) ? 1 : -1] __attribute__((unused))
#else
#define STATIC_ASSERT(cond, msg) static_assert((cond), #msg)
-#endif // __cplusplus < 201103L
+#endif // __cplusplus < 201103L && !defined(_MSC_VER)
/* ======== atomic operation ========
*
diff --git a/docs/superpowers/specs/2026-09-10-native-package-artifacts-design.md b/docs/superpowers/specs/2026-09-10-native-package-artifacts-design.md
index ac04ec68b..d5ce8a58f 100644
--- a/docs/superpowers/specs/2026-09-10-native-package-artifacts-design.md
+++ b/docs/superpowers/specs/2026-09-10-native-package-artifacts-design.md
@@ -151,7 +151,9 @@ The ARM64 and Intel jobs download the immutable GitHub source archive for the
exact fork commit and create a temporary local tap containing `tsfile-dev.rb`.
The formula builds that archive as a Bottle candidate, runs its CLI and C++
consumer tests, and calls `brew bottle --json` with the future immutable JFrog
-root URL.
+root URL. The development Formula is keg-only because the installed SDK includes
+its current dependency header closure, which must not be linked over files owned
+by Homebrew dependencies such as `simde`.
A macOS merge job consumes both Bottle JSON files and produces the final
`tsfile-dev.rb` with one `bottle do` block containing both platform checksums.
diff --git a/packaging/README.md b/packaging/README.md
index feffc2cb2..32b8106d4 100644
--- a/packaging/README.md
+++ b/packaging/README.md
@@ -117,7 +117,12 @@ Formula `tsfile-dev`, using `packaging/homebrew/tsfile-dev.rb.in`. This is not a
Homebrew/core submission. Each build pins the full workflow commit from
`ColinLeeo/tsfile`, hashes that source archive, and uses the generated immutable
Homebrew development version. The Formula retains the CMake install behavior
-and tests the installed C++ consumer and CLI before bottling.
+and tests the installed C++ consumer and CLI before bottling. `tsfile-dev` is
+keg-only because the current SDK intentionally ships its dependency header
+closure; linking that closure into Homebrew's shared prefix would collide with
+headers owned by dependencies such as `simde`. After installation, invoke the
+CLI as `$(brew --prefix tsfile-dev)/bin/tsfile-cli`, or add that Formula's
+`bin` directory to `PATH`.
The ARM64 job runs on `macos-latest` and the Intel job on `macos-15-intel`.
Their `native-homebrew-macos-arm64` and `native-homebrew-macos-x86_64`
diff --git a/packaging/homebrew/tsfile-dev.rb.in b/packaging/homebrew/tsfile-dev.rb.in
index 567a2fcfc..b5eac6431 100644
--- a/packaging/homebrew/tsfile-dev.rb.in
+++ b/packaging/homebrew/tsfile-dev.rb.in
@@ -22,6 +22,7 @@ class TsfileDev < Formula
version "@HOMEBREW_VERSION@"
sha256 "@SOURCE_SHA256@"
license "Apache-2.0"
+ keg_only "development snapshots install their dependency header closure"
@BOTTLE_BLOCK@
diff --git a/packaging/tests/check_native_workflow.rb b/packaging/tests/check_native_workflow.rb
index 82e5e506f..053e25174 100644
--- a/packaging/tests/check_native_workflow.rb
+++ b/packaging/tests/check_native_workflow.rb
@@ -30,6 +30,11 @@ bootstrap = jobs.fetch("build-rpm").fetch("steps").find { |step| step["name"] ==
packages = Shellwords.split(bootstrap.fetch("run").gsub("\\\n", " "))
raise "AlmaLinux 9 curl-minimal conflicts with full curl" if packages.include?("curl")
raise "RPM bootstrap must retain curl-minimal" unless packages.include?("curl-minimal")
+raise "AlmaLinux 9 default repositories do not provide ninja-build" if packages.include?("ninja-build")
+raise "RPM bootstrap must install make" unless packages.include?("make")
+
+rpm_build = jobs.fetch("build-rpm").fetch("steps").filter_map { |step| step["run"] }.join("\n")
+raise "RPM build must not require Ninja" if rpm_build.include?("-G Ninja")
windows = jobs.fetch("build-windows").fetch("steps").filter_map { |step| step["run"] }.join("\n")
raise "Windows ZIP needs a consistent static CRT" unless windows.include?("-DTSFILE_MSVC_STATIC_RUNTIME=ON") && windows.include?("-DTSFILE_DEPENDENCY_SOURCE=BUNDLED")
diff --git a/packaging/tests/test_native_install.py b/packaging/tests/test_native_install.py
index 76128fcf9..ed3eb5a10 100644
--- a/packaging/tests/test_native_install.py
+++ b/packaging/tests/test_native_install.py
@@ -31,6 +31,36 @@ ROOT = Path(__file__).resolve().parents[2]
FIXTURES = ROOT / "cpp/cmake/tests/projects"
+class PublicHeaderCompatibilityTest(unittest.TestCase):
+ def test_static_assert_uses_the_native_keyword_for_msvc(self):
+ source = textwrap.dedent("""\
+ #include "utils/util_define.h"
+ class Probe { STATIC_ASSERT(true, MSVC_old_cplusplus); };
+ """)
+ result = subprocess.run(
+ [
+ *shlex.split(os.environ.get("CXX", "c++")),
+ "-E",
+ "-P",
+ "-x",
+ "c++",
+ "-std=c++11",
+ "-D_MSC_VER=1930",
+ "-DTSFILE_STATIC",
+ "-D__cplusplus=199711L",
+ f"-I{ROOT / 'cpp/src'}",
+ "-",
+ ],
+ input=source,
+ text=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ )
+ self.assertEqual(result.returncode, 0, result.stdout[-4000:])
+ self.assertRegex(result.stdout, r"class Probe \{\s*(?:static_assert|_Static_assert)")
+ self.assertNotIn("static_assertion_MSVC_old_cplusplus", result.stdout)
+
+
class StaticANTLRPackageTest(unittest.TestCase):
"""Exercise installed metadata without compiling the ANTLR runtime."""
diff --git a/packaging/tests/test_render_homebrew_formula.py b/packaging/tests/test_render_homebrew_formula.py
index a702c40d9..a60f9a6c0 100644
--- a/packaging/tests/test_render_homebrew_formula.py
+++ b/packaging/tests/test_render_homebrew_formula.py
@@ -128,6 +128,11 @@ class RenderHomebrewFormulaTest(unittest.TestCase):
def test_cli_renders_real_template_with_optional_bottle_file(self):
self.renderer()
+ template = TEMPLATE_PATH.read_text(encoding="utf-8")
+ self.assertIn(
+ 'keg_only "development snapshots install their dependency header closure"',
+ template,
+ )
with tempfile.TemporaryDirectory() as temporary_directory:
directory = Path(temporary_directory)
output = directory / "tsfile-dev.rb"