From 686fdb194281e19a7c980f46edf10c4ebc5a7267 Mon Sep 17 00:00:00 2001 From: Kybxd <627940450@qq.com> Date: Thu, 9 Apr 2026 16:12:31 +0800 Subject: [PATCH 01/10] chore(test): Update CI workflows to use buf for proto generation The CI workflows for testing C++, C#, and Go are updated to use buf setup action and buf generate command for protocol buffer generation, replacing the previous gen.sh/gen.bat scripts. --- .github/workflows/testing-cpp.yml | 12 ++- .github/workflows/testing-csharp.yml | 12 ++- .github/workflows/testing-go.yml | 17 ++-- test/buf.gen.yaml | 31 +++++++ test/buf.lock | 6 ++ test/buf.yaml | 5 ++ test/cpp-tableau-loader/gen.bat | 82 ------------------ test/cpp-tableau-loader/gen.sh | 70 ---------------- .../src/protoconf/hero_conf.pc.cc | 2 +- .../src/protoconf/hero_conf.pc.h | 2 +- .../src/protoconf/hub.pc.cc | 2 +- .../cpp-tableau-loader/src/protoconf/hub.pc.h | 2 +- .../src/protoconf/hub_shard0.pc.cc | 2 +- .../src/protoconf/hub_shard1.pc.cc | 2 +- .../src/protoconf/index_conf.pc.cc | 2 +- .../src/protoconf/index_conf.pc.h | 2 +- .../src/protoconf/item_conf.pc.cc | 2 +- .../src/protoconf/item_conf.pc.h | 2 +- .../src/protoconf/load.pc.cc | 2 +- .../src/protoconf/load.pc.h | 2 +- .../src/protoconf/logger.pc.cc | 2 +- .../src/protoconf/logger.pc.h | 2 +- .../src/protoconf/patch_conf.pc.cc | 2 +- .../src/protoconf/patch_conf.pc.h | 2 +- .../src/protoconf/scheduler.pc.cc | 2 +- .../src/protoconf/scheduler.pc.h | 2 +- .../src/protoconf/test_conf.pc.cc | 2 +- .../src/protoconf/test_conf.pc.h | 2 +- .../src/protoconf/util.pc.cc | 2 +- .../src/protoconf/util.pc.h | 2 +- test/csharp-tableau-loader/gen.bat | 83 ------------------- test/csharp-tableau-loader/gen.sh | 72 ---------------- .../tableau/HeroConf.pc.cs | 2 +- test/csharp-tableau-loader/tableau/Hub.pc.cs | 2 +- .../tableau/IndexConf.pc.cs | 2 +- .../tableau/ItemConf.pc.cs | 2 +- test/csharp-tableau-loader/tableau/Load.pc.cs | 2 +- .../tableau/PatchConf.pc.cs | 2 +- .../tableau/TestConf.pc.cs | 2 +- test/csharp-tableau-loader/tableau/Util.pc.cs | 2 +- test/go-tableau-loader/gen.bat | 71 ---------------- test/go-tableau-loader/gen.sh | 59 ------------- .../protoconf/loader/hero_conf.pc.go | 2 +- .../protoconf/loader/hub.pc.go | 2 +- .../protoconf/loader/index_conf.pc.go | 2 +- .../protoconf/loader/item_conf.pc.go | 2 +- .../protoconf/loader/messager.pc.go | 2 +- .../protoconf/loader/messager_container.pc.go | 2 +- .../protoconf/loader/patch_conf.pc.go | 2 +- .../protoconf/loader/test_conf.pc.go | 2 +- .../protoconf/loader/util.pc.go | 2 +- 51 files changed, 103 insertions(+), 495 deletions(-) create mode 100644 test/buf.gen.yaml create mode 100644 test/buf.lock create mode 100644 test/buf.yaml delete mode 100644 test/cpp-tableau-loader/gen.bat delete mode 100755 test/cpp-tableau-loader/gen.sh delete mode 100644 test/csharp-tableau-loader/gen.bat delete mode 100755 test/csharp-tableau-loader/gen.sh delete mode 100644 test/go-tableau-loader/gen.bat delete mode 100755 test/go-tableau-loader/gen.sh diff --git a/.github/workflows/testing-cpp.yml b/.github/workflows/testing-cpp.yml index 3e88a540..ef135971 100644 --- a/.github/workflows/testing-cpp.yml +++ b/.github/workflows/testing-cpp.yml @@ -20,12 +20,10 @@ jobs: - os: ubuntu-latest go-version: 1.21.x init_script: bash init.sh - gen_script: bash gen.sh run_loader: ./bin/loader - os: windows-latest go-version: 1.21.x init_script: cmd /c init.bat - gen_script: cmd /c gen.bat run_loader: .\bin\loader.exe name: test (${{ matrix.os }}) @@ -59,9 +57,15 @@ jobs: - name: Init submodules and build protobuf run: ${{ matrix.init_script }} + - name: Setup buf + uses: bufbuild/buf-setup-action@v1.50.0 + with: + version: 1.67.0 + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Generate protoconf - working-directory: test/cpp-tableau-loader - run: ${{ matrix.gen_script }} + working-directory: test + run: buf generate - name: CMake Configure working-directory: test/cpp-tableau-loader diff --git a/.github/workflows/testing-csharp.yml b/.github/workflows/testing-csharp.yml index b631f4c8..eb998af3 100644 --- a/.github/workflows/testing-csharp.yml +++ b/.github/workflows/testing-csharp.yml @@ -19,10 +19,8 @@ jobs: include: - os: ubuntu-latest go-version: 1.21.x - gen_script: bash gen.sh - os: windows-latest go-version: 1.21.x - gen_script: cmd /c gen.bat name: test (${{ matrix.os }}) runs-on: ${{ matrix.os }} @@ -51,9 +49,15 @@ jobs: version: "3.19.3" repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Setup buf + uses: bufbuild/buf-setup-action@v1.50.0 + with: + version: 1.67.0 + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Generate protoconf - working-directory: test/csharp-tableau-loader - run: ${{ matrix.gen_script }} + working-directory: test + run: buf generate - name: Build working-directory: test/csharp-tableau-loader diff --git a/.github/workflows/testing-go.yml b/.github/workflows/testing-go.yml index 8128c057..4026a92e 100644 --- a/.github/workflows/testing-go.yml +++ b/.github/workflows/testing-go.yml @@ -19,10 +19,8 @@ jobs: include: - os: ubuntu-latest go-version: 1.21.x - gen_script: bash gen.sh - os: windows-latest go-version: 1.21.x - gen_script: cmd /c gen.bat name: test (${{ matrix.os }}) runs-on: ${{ matrix.os }} @@ -40,18 +38,15 @@ jobs: go-version: ${{ matrix.go-version }} cache: true - - name: Install Protoc - uses: arduino/setup-protoc@v1 + - name: Setup buf + uses: bufbuild/buf-setup-action@v1.50.0 with: - version: "3.19.3" - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install protoc-gen-go - run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 + version: 1.67.0 + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Generate protoconf - working-directory: test/go-tableau-loader - run: ${{ matrix.gen_script }} + working-directory: test + run: buf generate - name: Vet run: go vet ./... diff --git a/test/buf.gen.yaml b/test/buf.gen.yaml new file mode 100644 index 00000000..33080075 --- /dev/null +++ b/test/buf.gen.yaml @@ -0,0 +1,31 @@ +version: v2 +plugins: + - remote: buf.build/protocolbuffers/go:v1.34.2 + out: go-tableau-loader/protoconf + opt: paths=source_relative + - local: ["go", "run", "../cmd/protoc-gen-go-tableau-loader"] + out: go-tableau-loader/protoconf/loader + opt: + - paths=source_relative + - pkg=loader + strategy: all + - protoc_builtin: cpp + protoc_path: ../third_party/_submodules/protobuf/cmake/build/protoc + out: cpp-tableau-loader/src/protoconf + include_imports: true + - local: ["go", "run", "../cmd/protoc-gen-cpp-tableau-loader"] + out: cpp-tableau-loader/src/protoconf + opt: + - paths=source_relative + - shards=2 + strategy: all + - protoc_builtin: csharp + protoc_path: ../third_party/_submodules/protobuf/cmake/build/protoc + out: csharp-tableau-loader/protoconf + include_imports: true + - local: ["go", "run", "../cmd/protoc-gen-csharp-tableau-loader"] + out: csharp-tableau-loader/tableau + opt: paths=source_relative + strategy: all +inputs: + - directory: proto diff --git a/test/buf.lock b/test/buf.lock new file mode 100644 index 00000000..13c53ed2 --- /dev/null +++ b/test/buf.lock @@ -0,0 +1,6 @@ +# Generated by buf. DO NOT EDIT. +version: v2 +deps: + - name: buf.build/tableauio/tableau + commit: 04b3a2c59b6644318d341d4f2220a578 + digest: b5:59bca610664e985502469393a4d47370da9d40d874312a76db4fe133fe61e27fc23b72d2ad45d67c3af76e6620ab1c86c3de0bd13d3517abf6e8b75a346b78fd diff --git a/test/buf.yaml b/test/buf.yaml new file mode 100644 index 00000000..d6995604 --- /dev/null +++ b/test/buf.yaml @@ -0,0 +1,5 @@ +version: v2 +deps: + - buf.build/tableauio/tableau:v0.15.1 +modules: + - path: proto diff --git a/test/cpp-tableau-loader/gen.bat b/test/cpp-tableau-loader/gen.bat deleted file mode 100644 index 1751c14c..00000000 --- a/test/cpp-tableau-loader/gen.bat +++ /dev/null @@ -1,82 +0,0 @@ -@echo off -setlocal -setlocal enabledelayedexpansion - -for /f "delims=" %%i in ('git rev-parse --show-toplevel') do set repoRoot=%%i -cd /d "%repoRoot%" - -REM Allow overriding protoc via environment variable. -REM Default to locally compiled protoc for local development; fallback to system protoc. -if not defined PROTOC ( - if exist "%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" ( - set "PROTOC=%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" - ) else ( - where protoc >nul 2>nul - if !errorlevel! equ 0 ( - for /f "delims=" %%p in ('where protoc') do set "PROTOC=%%p" - ) else ( - echo Error: protoc not found. Please build protobuf submodule or install protoc. >&2 - exit /b 1 - ) - ) -) -REM Allow overriding protobuf include path via environment variable. -REM Default to local submodule source; fallback to system include path. -if not defined PROTOBUF_PROTO ( - if exist "%repoRoot%\third_party\_submodules\protobuf\src\google\protobuf" ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) else ( - for /f "delims=" %%p in ('where protoc 2^>nul') do set "_PROTOC_DIR=%%~dpp" - if defined _PROTOC_DIR ( - set "PROTOBUF_PROTO=!_PROTOC_DIR!..\include" - ) else ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) - ) -) -set "TABLEAU_PROTO=%repoRoot%\third_party\_submodules\tableau\proto" -set "ROOTDIR=%repoRoot%\test\cpp-tableau-loader" -set "PLGUIN_DIR=%repoRoot%\cmd\protoc-gen-cpp-tableau-loader" -set "PROTOCONF_IN=%repoRoot%\test\proto" -set "PROTOCONF_OUT=%ROOTDIR%\src\protoconf" - -REM remove old generated files -rmdir /s /q "%PROTOCONF_OUT%" 2>nul -mkdir "%PROTOCONF_OUT%" - -REM build protoc plugin of loader -pushd "%PLGUIN_DIR%" -go build -popd - -set "PATH=%PATH%;%PLGUIN_DIR%" - -set protoFiles= -pushd "%PROTOCONF_IN%" -for /R %%f in (*.proto) do ( - set protoFiles=!protoFiles! "%%f" -) -popd -"%PROTOC%" ^ ---cpp-tableau-loader_out="%PROTOCONF_OUT%" ^ ---cpp-tableau-loader_opt=paths=source_relative,shards=2 ^ ---cpp_out="%PROTOCONF_OUT%" ^ ---proto_path="%PROTOBUF_PROTO%" ^ ---proto_path="%TABLEAU_PROTO%" ^ ---proto_path="%PROTOCONF_IN%" ^ -!protoFiles! - -set "TABLEAU_IN=%TABLEAU_PROTO%\tableau\protobuf" -set "TABLEAU_OUT=%ROOTDIR%\src" -REM remove old generated files -if exist "%TABLEAU_OUT%\tableau" rmdir /s /q "%TABLEAU_OUT%\tableau" -mkdir "%TABLEAU_OUT%\tableau" - -"%PROTOC%" ^ ---cpp_out="%TABLEAU_OUT%" ^ ---proto_path="%PROTOBUF_PROTO%" ^ ---proto_path="%TABLEAU_PROTO%" ^ -"%TABLEAU_IN%\tableau.proto" "%TABLEAU_IN%\wellknown.proto" - -endlocal -endlocal diff --git a/test/cpp-tableau-loader/gen.sh b/test/cpp-tableau-loader/gen.sh deleted file mode 100755 index 017757e3..00000000 --- a/test/cpp-tableau-loader/gen.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# set -eux -set -e -set -o pipefail - -shopt -s globstar - -cd "$(git rev-parse --show-toplevel)" - -# Allow overriding protoc via environment variable. -# Default to locally compiled protoc for local development; fallback to system protoc. -LOCAL_PROTOC="./third_party/_submodules/protobuf/cmake/build/protoc" -if [ -z "$PROTOC" ]; then - if [ -x "$LOCAL_PROTOC" ]; then - PROTOC="$LOCAL_PROTOC" - else - PROTOC="$(which protoc 2>/dev/null || true)" - fi -fi -if [ -z "$PROTOC" ]; then - echo "Error: protoc not found. Please build protobuf submodule or install protoc." >&2 - exit 1 -fi -# Allow overriding protobuf include path via environment variable. -# Default to local submodule source; fallback to system include path. -LOCAL_PROTOBUF_PROTO="./third_party/_submodules/protobuf/src" -if [ -z "$PROTOBUF_PROTO" ]; then - if [ -d "$LOCAL_PROTOBUF_PROTO/google/protobuf" ]; then - PROTOBUF_PROTO="$LOCAL_PROTOBUF_PROTO" - else - PROTOBUF_PROTO="$(pkg-config --variable=includedir protobuf 2>/dev/null || echo /usr/include)" - fi -fi -TABLEAU_PROTO="./third_party/_submodules/tableau/proto" -ROOTDIR="./test/cpp-tableau-loader" -PLGUIN_DIR="./cmd/protoc-gen-cpp-tableau-loader" -PROTOCONF_IN="./test/proto" -PROTOCONF_OUT="${ROOTDIR}/src/protoconf" - -# remove old generated files -rm -rfv "$PROTOCONF_OUT" -mkdir -p "$PROTOCONF_OUT" - -# build protoc plugin of loader -cd "${PLGUIN_DIR}" && go build && cd - - -export PATH="${PATH}:${PLGUIN_DIR}" - -${PROTOC} \ - --cpp-tableau-loader_out="$PROTOCONF_OUT" \ - --cpp-tableau-loader_opt=paths=source_relative,shards=2 \ - --cpp_out="$PROTOCONF_OUT" \ - --proto_path="$PROTOBUF_PROTO" \ - --proto_path="$TABLEAU_PROTO" \ - --proto_path="$PROTOCONF_IN" \ - "$PROTOCONF_IN"/**/*.proto - -TABLEAU_IN="$TABLEAU_PROTO/tableau/protobuf" -TABLEAU_OUT="${ROOTDIR}/src" -# remove old generated files -rm -rfv "$TABLEAU_OUT/tableau" -mkdir -p "$TABLEAU_OUT/tableau" - -${PROTOC} \ - --cpp_out="$TABLEAU_OUT" \ - --proto_path="$PROTOBUF_PROTO" \ - --proto_path="$TABLEAU_PROTO" \ - "${TABLEAU_PROTO}/tableau/protobuf/tableau.proto" \ - "${TABLEAU_PROTO}/tableau/protobuf/wellknown.proto" diff --git a/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.cc b/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.cc index 3d5235a6..847986f4 100644 --- a/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: hero_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.h b/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.h index 0092db80..09922d63 100644 --- a/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: hero_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/hub.pc.cc b/test/cpp-tableau-loader/src/protoconf/hub.pc.cc index 8cd60ff5..69c19d83 100644 --- a/test/cpp-tableau-loader/src/protoconf/hub.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/hub.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "hub.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/hub.pc.h b/test/cpp-tableau-loader/src/protoconf/hub.pc.h index 3dec0210..612c45b4 100644 --- a/test/cpp-tableau-loader/src/protoconf/hub.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/hub.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #pragma once diff --git a/test/cpp-tableau-loader/src/protoconf/hub_shard0.pc.cc b/test/cpp-tableau-loader/src/protoconf/hub_shard0.pc.cc index a774e1c2..198b9224 100644 --- a/test/cpp-tableau-loader/src/protoconf/hub_shard0.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/hub_shard0.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "hub.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/hub_shard1.pc.cc b/test/cpp-tableau-loader/src/protoconf/hub_shard1.pc.cc index aada2017..4a228bc5 100644 --- a/test/cpp-tableau-loader/src/protoconf/hub_shard1.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/hub_shard1.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "hub.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/index_conf.pc.cc b/test/cpp-tableau-loader/src/protoconf/index_conf.pc.cc index ef84941d..532ca56c 100644 --- a/test/cpp-tableau-loader/src/protoconf/index_conf.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/index_conf.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: index_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/index_conf.pc.h b/test/cpp-tableau-loader/src/protoconf/index_conf.pc.h index a9fa3e6c..7205607f 100644 --- a/test/cpp-tableau-loader/src/protoconf/index_conf.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/index_conf.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: index_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/item_conf.pc.cc b/test/cpp-tableau-loader/src/protoconf/item_conf.pc.cc index 722a75e0..1edc25e2 100644 --- a/test/cpp-tableau-loader/src/protoconf/item_conf.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/item_conf.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: item_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/item_conf.pc.h b/test/cpp-tableau-loader/src/protoconf/item_conf.pc.h index fd757f5a..42f9cb15 100644 --- a/test/cpp-tableau-loader/src/protoconf/item_conf.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/item_conf.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: item_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/load.pc.cc b/test/cpp-tableau-loader/src/protoconf/load.pc.cc index ef258491..f7018a18 100644 --- a/test/cpp-tableau-loader/src/protoconf/load.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/load.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "load.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/load.pc.h b/test/cpp-tableau-loader/src/protoconf/load.pc.h index a8cbef6f..df584444 100644 --- a/test/cpp-tableau-loader/src/protoconf/load.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/load.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #pragma once diff --git a/test/cpp-tableau-loader/src/protoconf/logger.pc.cc b/test/cpp-tableau-loader/src/protoconf/logger.pc.cc index ca604ac9..2447b873 100644 --- a/test/cpp-tableau-loader/src/protoconf/logger.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/logger.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "logger.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/logger.pc.h b/test/cpp-tableau-loader/src/protoconf/logger.pc.h index 2925cf94..07d6884a 100644 --- a/test/cpp-tableau-loader/src/protoconf/logger.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/logger.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #pragma once diff --git a/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.cc b/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.cc index e943a3d2..ff10e772 100644 --- a/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: patch_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.h b/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.h index c761d655..a3741353 100644 --- a/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: patch_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/scheduler.pc.cc b/test/cpp-tableau-loader/src/protoconf/scheduler.pc.cc index a102e525..08207551 100644 --- a/test/cpp-tableau-loader/src/protoconf/scheduler.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/scheduler.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "scheduler.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/scheduler.pc.h b/test/cpp-tableau-loader/src/protoconf/scheduler.pc.h index 7b34521e..b2a1242c 100644 --- a/test/cpp-tableau-loader/src/protoconf/scheduler.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/scheduler.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #pragma once diff --git a/test/cpp-tableau-loader/src/protoconf/test_conf.pc.cc b/test/cpp-tableau-loader/src/protoconf/test_conf.pc.cc index 4422fcdd..a39c3437 100644 --- a/test/cpp-tableau-loader/src/protoconf/test_conf.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/test_conf.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: test_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/test_conf.pc.h b/test/cpp-tableau-loader/src/protoconf/test_conf.pc.h index ecf62d94..c2b92c43 100644 --- a/test/cpp-tableau-loader/src/protoconf/test_conf.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/test_conf.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: test_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/util.pc.cc b/test/cpp-tableau-loader/src/protoconf/util.pc.cc index 61e04959..b6306017 100644 --- a/test/cpp-tableau-loader/src/protoconf/util.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/util.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "util.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/util.pc.h b/test/cpp-tableau-loader/src/protoconf/util.pc.h index 92161188..39376272 100644 --- a/test/cpp-tableau-loader/src/protoconf/util.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/util.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #pragma once diff --git a/test/csharp-tableau-loader/gen.bat b/test/csharp-tableau-loader/gen.bat deleted file mode 100644 index 3a3d50f7..00000000 --- a/test/csharp-tableau-loader/gen.bat +++ /dev/null @@ -1,83 +0,0 @@ -@echo off -setlocal -setlocal enabledelayedexpansion - -for /f "delims=" %%i in ('git rev-parse --show-toplevel') do set repoRoot=%%i -cd /d "%repoRoot%" - -REM Allow overriding protoc via environment variable. -REM Default to locally compiled protoc for local development; fallback to system protoc. -if not defined PROTOC ( - if exist "%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" ( - set "PROTOC=%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" - ) else ( - where protoc >nul 2>nul - if !errorlevel! equ 0 ( - for /f "delims=" %%p in ('where protoc') do set "PROTOC=%%p" - ) else ( - echo Error: protoc not found. Please build protobuf submodule or install protoc. >&2 - exit /b 1 - ) - ) -) -REM Allow overriding protobuf include path via environment variable. -REM Default to local submodule source; fallback to system include path. -if not defined PROTOBUF_PROTO ( - if exist "%repoRoot%\third_party\_submodules\protobuf\src\google\protobuf" ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) else ( - for /f "delims=" %%p in ('where protoc 2^>nul') do set "_PROTOC_DIR=%%~dpp" - if defined _PROTOC_DIR ( - set "PROTOBUF_PROTO=!_PROTOC_DIR!..\include" - ) else ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) - ) -) -set "TABLEAU_PROTO=%repoRoot%\third_party\_submodules\tableau\proto" -set "ROOTDIR=%repoRoot%\test\csharp-tableau-loader" -set "PLGUIN_DIR=%repoRoot%\cmd\protoc-gen-csharp-tableau-loader" -set "PROTOCONF_IN=%repoRoot%\test\proto" -set "PROTOCONF_OUT=%ROOTDIR%\protoconf" -set "LOADER_OUT=%ROOTDIR%\tableau" - -REM remove old generated files -rmdir /s /q "%PROTOCONF_OUT%" "%LOADER_OUT%" 2>nul -mkdir "%PROTOCONF_OUT%" "%LOADER_OUT%" - -REM build protoc plugin of loader -pushd "%PLGUIN_DIR%" -go build -popd - -set "PATH=%PATH%;%PLGUIN_DIR%" - -set protoFiles= -pushd "%PROTOCONF_IN%" -for /R %%f in (*.proto) do ( - set protoFiles=!protoFiles! "%%f" -) -popd -"%PROTOC%" ^ ---csharp_out="%PROTOCONF_OUT%" ^ ---csharp-tableau-loader_out="%LOADER_OUT%" ^ ---csharp-tableau-loader_opt=paths=source_relative ^ ---proto_path="%PROTOBUF_PROTO%" ^ ---proto_path="%TABLEAU_PROTO%" ^ ---proto_path="%PROTOCONF_IN%" ^ -!protoFiles! - -set "TABLEAU_IN=%TABLEAU_PROTO%\tableau\protobuf" -set "TABLEAU_OUT=%ROOTDIR%\protoconf\tableau" -REM remove old generated files -rmdir /s /q "%TABLEAU_OUT%" 2>nul -mkdir "%TABLEAU_OUT%" - -"%PROTOC%" ^ ---csharp_out="%TABLEAU_OUT%" ^ ---proto_path="%PROTOBUF_PROTO%" ^ ---proto_path="%TABLEAU_PROTO%" ^ -"%TABLEAU_IN%\tableau.proto" "%TABLEAU_IN%\wellknown.proto" - -endlocal -endlocal diff --git a/test/csharp-tableau-loader/gen.sh b/test/csharp-tableau-loader/gen.sh deleted file mode 100755 index 7e3d06a9..00000000 --- a/test/csharp-tableau-loader/gen.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# set -eux -set -e -set -o pipefail - -cd "$(git rev-parse --show-toplevel)" - -# Allow overriding protoc via environment variable. -# Default to locally compiled protoc for local development; fallback to system protoc. -LOCAL_PROTOC="./third_party/_submodules/protobuf/cmake/build/protoc" -if [ -z "$PROTOC" ]; then - if [ -x "$LOCAL_PROTOC" ]; then - PROTOC="$LOCAL_PROTOC" - else - PROTOC="$(which protoc 2>/dev/null || true)" - fi -fi -if [ -z "$PROTOC" ]; then - echo "Error: protoc not found. Please build protobuf submodule or install protoc." >&2 - exit 1 -fi -# Allow overriding protobuf include path via environment variable. -# Default to local submodule source; fallback to system include path. -LOCAL_PROTOBUF_PROTO="./third_party/_submodules/protobuf/src" -if [ -z "$PROTOBUF_PROTO" ]; then - if [ -d "$LOCAL_PROTOBUF_PROTO/google/protobuf" ]; then - PROTOBUF_PROTO="$LOCAL_PROTOBUF_PROTO" - else - PROTOBUF_PROTO="$(pkg-config --variable=includedir protobuf 2>/dev/null || echo /usr/include)" - fi -fi -TABLEAU_PROTO="./third_party/_submodules/tableau/proto" -ROOTDIR="./test/csharp-tableau-loader" -PLUGIN_DIR="./cmd/protoc-gen-csharp-tableau-loader" -PROTOCONF_IN="./test/proto" -PROTOCONF_OUT="${ROOTDIR}/protoconf" -LOADER_OUT="${ROOTDIR}/tableau" - -# remove old generated files -rm -rfv "$PROTOCONF_OUT" "$LOADER_OUT" -mkdir -p "$PROTOCONF_OUT" "$LOADER_OUT" - -# build -cd "${PLUGIN_DIR}" && go build && cd - - -export PATH="$(pwd)/${PLUGIN_DIR}:${PATH}" - -# Collect all .proto files (use `find` for cross-platform compatibility). -PROTO_FILES=$(find "$PROTOCONF_IN" -name "*.proto") - -${PROTOC} \ - --csharp_out="$PROTOCONF_OUT" \ - --csharp-tableau-loader_out="$LOADER_OUT" \ - --csharp-tableau-loader_opt=paths=source_relative \ - --proto_path="$PROTOBUF_PROTO" \ - --proto_path="$TABLEAU_PROTO" \ - --proto_path="$PROTOCONF_IN" \ - $PROTO_FILES - -TABLEAU_IN="$TABLEAU_PROTO/tableau/protobuf" -TABLEAU_OUT="${ROOTDIR}/protoconf/tableau" -# remove old generated files -rm -rfv "$TABLEAU_OUT" -mkdir -p "$TABLEAU_OUT" - -${PROTOC} \ - --csharp_out="$TABLEAU_OUT" \ - --proto_path="$PROTOBUF_PROTO" \ - --proto_path="$TABLEAU_PROTO" \ - "$TABLEAU_IN/tableau.proto" \ - "$TABLEAU_IN/wellknown.proto" diff --git a/test/csharp-tableau-loader/tableau/HeroConf.pc.cs b/test/csharp-tableau-loader/tableau/HeroConf.pc.cs index 576ea607..c84ca61c 100644 --- a/test/csharp-tableau-loader/tableau/HeroConf.pc.cs +++ b/test/csharp-tableau-loader/tableau/HeroConf.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: hero_conf.proto // #nullable enable diff --git a/test/csharp-tableau-loader/tableau/Hub.pc.cs b/test/csharp-tableau-loader/tableau/Hub.pc.cs index a076b694..490b8f92 100644 --- a/test/csharp-tableau-loader/tableau/Hub.pc.cs +++ b/test/csharp-tableau-loader/tableau/Hub.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // #nullable enable using System; diff --git a/test/csharp-tableau-loader/tableau/IndexConf.pc.cs b/test/csharp-tableau-loader/tableau/IndexConf.pc.cs index fab40217..ee404d5a 100644 --- a/test/csharp-tableau-loader/tableau/IndexConf.pc.cs +++ b/test/csharp-tableau-loader/tableau/IndexConf.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: index_conf.proto // #nullable enable diff --git a/test/csharp-tableau-loader/tableau/ItemConf.pc.cs b/test/csharp-tableau-loader/tableau/ItemConf.pc.cs index 19f884ef..153c68bd 100644 --- a/test/csharp-tableau-loader/tableau/ItemConf.pc.cs +++ b/test/csharp-tableau-loader/tableau/ItemConf.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: item_conf.proto // #nullable enable diff --git a/test/csharp-tableau-loader/tableau/Load.pc.cs b/test/csharp-tableau-loader/tableau/Load.pc.cs index 463f9aa8..0f378066 100644 --- a/test/csharp-tableau-loader/tableau/Load.pc.cs +++ b/test/csharp-tableau-loader/tableau/Load.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // #nullable enable using System; diff --git a/test/csharp-tableau-loader/tableau/PatchConf.pc.cs b/test/csharp-tableau-loader/tableau/PatchConf.pc.cs index 6290448b..3aeebc50 100644 --- a/test/csharp-tableau-loader/tableau/PatchConf.pc.cs +++ b/test/csharp-tableau-loader/tableau/PatchConf.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: patch_conf.proto // #nullable enable diff --git a/test/csharp-tableau-loader/tableau/TestConf.pc.cs b/test/csharp-tableau-loader/tableau/TestConf.pc.cs index 577bf334..8905584d 100644 --- a/test/csharp-tableau-loader/tableau/TestConf.pc.cs +++ b/test/csharp-tableau-loader/tableau/TestConf.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: test_conf.proto // #nullable enable diff --git a/test/csharp-tableau-loader/tableau/Util.pc.cs b/test/csharp-tableau-loader/tableau/Util.pc.cs index c907729d..09b7ae06 100644 --- a/test/csharp-tableau-loader/tableau/Util.pc.cs +++ b/test/csharp-tableau-loader/tableau/Util.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // #nullable enable using System; diff --git a/test/go-tableau-loader/gen.bat b/test/go-tableau-loader/gen.bat deleted file mode 100644 index 2520760e..00000000 --- a/test/go-tableau-loader/gen.bat +++ /dev/null @@ -1,71 +0,0 @@ -@echo off -setlocal -setlocal enabledelayedexpansion - -for /f "delims=" %%i in ('git rev-parse --show-toplevel') do set repoRoot=%%i -cd /d "%repoRoot%" - -REM Allow overriding protoc via environment variable. -REM Default to locally compiled protoc for local development; fallback to system protoc. -if not defined PROTOC ( - if exist "%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" ( - set "PROTOC=%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" - ) else ( - where protoc >nul 2>nul - if !errorlevel! equ 0 ( - for /f "delims=" %%p in ('where protoc') do set "PROTOC=%%p" - ) else ( - echo Error: protoc not found. Please build protobuf submodule or install protoc. >&2 - exit /b 1 - ) - ) -) -REM Allow overriding protobuf include path via environment variable. -REM Default to local submodule source; fallback to system include path. -if not defined PROTOBUF_PROTO ( - if exist "%repoRoot%\third_party\_submodules\protobuf\src\google\protobuf" ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) else ( - for /f "delims=" %%p in ('where protoc 2^>nul') do set "_PROTOC_DIR=%%~dpp" - if defined _PROTOC_DIR ( - set "PROTOBUF_PROTO=!_PROTOC_DIR!..\include" - ) else ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) - ) -) -set "TABLEAU_PROTO=%repoRoot%\third_party\_submodules\tableau\proto" -set "PLGUIN_DIR=%repoRoot%\cmd\protoc-gen-go-tableau-loader" -set "PROTOCONF_IN=%repoRoot%\test\proto" -set "PROTOCONF_OUT=%repoRoot%\test\go-tableau-loader\protoconf" -set "LOADER_OUT=%PROTOCONF_OUT%\loader" - -REM remove old generated files -rmdir /s /q "%PROTOCONF_OUT%" "%LOADER_OUT%" 2>nul -mkdir "%PROTOCONF_OUT%" "%LOADER_OUT%" - -REM build -pushd "%PLGUIN_DIR%" -go build -popd - -set "PATH=%PATH%;%PLGUIN_DIR%" - -set protoFiles= -pushd "%PROTOCONF_IN%" -for /R %%f in (*.proto) do ( - set protoFiles=!protoFiles! "%%f" -) -popd -"%PROTOC%" ^ ---go-tableau-loader_out="%LOADER_OUT%" ^ ---go-tableau-loader_opt=paths=source_relative,pkg=loader ^ ---go_out="%PROTOCONF_OUT%" ^ ---go_opt=paths=source_relative ^ ---proto_path="%PROTOBUF_PROTO%" ^ ---proto_path="%TABLEAU_PROTO%" ^ ---proto_path="%PROTOCONF_IN%" ^ -!protoFiles! - -endlocal -endlocal diff --git a/test/go-tableau-loader/gen.sh b/test/go-tableau-loader/gen.sh deleted file mode 100755 index 0c74e757..00000000 --- a/test/go-tableau-loader/gen.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -# set -eux -set -e -set -o pipefail - -cd "$(git rev-parse --show-toplevel)" - -# Allow overriding protoc via environment variable. -# Default to locally compiled protoc for local development; fallback to system protoc. -LOCAL_PROTOC="./third_party/_submodules/protobuf/cmake/build/protoc" -if [ -z "$PROTOC" ]; then - if [ -x "$LOCAL_PROTOC" ]; then - PROTOC="$LOCAL_PROTOC" - else - PROTOC="$(which protoc 2>/dev/null || true)" - fi -fi -if [ -z "$PROTOC" ]; then - echo "Error: protoc not found. Please build protobuf submodule or install protoc." >&2 - exit 1 -fi -# Allow overriding protobuf include path via environment variable. -# Default to local submodule source; fallback to system include path. -LOCAL_PROTOBUF_PROTO="./third_party/_submodules/protobuf/src" -if [ -z "$PROTOBUF_PROTO" ]; then - if [ -d "$LOCAL_PROTOBUF_PROTO/google/protobuf" ]; then - PROTOBUF_PROTO="$LOCAL_PROTOBUF_PROTO" - else - PROTOBUF_PROTO="$(pkg-config --variable=includedir protobuf 2>/dev/null || echo /usr/include)" - fi -fi -TABLEAU_PROTO="./third_party/_submodules/tableau/proto" -PLUGIN_DIR="./cmd/protoc-gen-go-tableau-loader" -PROTOCONF_IN="./test/proto" -PROTOCONF_OUT="./test/go-tableau-loader/protoconf" -LOADER_OUT="$PROTOCONF_OUT/loader" - -# remove old generated files -rm -rfv "$PROTOCONF_OUT" "$LOADER_OUT" -mkdir -p "$PROTOCONF_OUT" "$LOADER_OUT" - -# build -cd "${PLUGIN_DIR}" && go build && cd - - -export PATH="$(pwd)/${PLUGIN_DIR}:${PATH}" - -# Collect all .proto files (use `find` for cross-platform compatibility). -PROTO_FILES=$(find "$PROTOCONF_IN" -name "*.proto") - -${PROTOC} \ - --go-tableau-loader_out="$LOADER_OUT" \ - --go-tableau-loader_opt=paths=source_relative,pkg=loader \ - --go_out="$PROTOCONF_OUT" \ - --go_opt=paths=source_relative \ - --proto_path="$PROTOBUF_PROTO" \ - --proto_path="$TABLEAU_PROTO" \ - --proto_path="$PROTOCONF_IN" \ - $PROTO_FILES diff --git a/test/go-tableau-loader/protoconf/loader/hero_conf.pc.go b/test/go-tableau-loader/protoconf/loader/hero_conf.pc.go index a47a64cc..85d23cc6 100644 --- a/test/go-tableau-loader/protoconf/loader/hero_conf.pc.go +++ b/test/go-tableau-loader/protoconf/loader/hero_conf.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: hero_conf.proto package loader diff --git a/test/go-tableau-loader/protoconf/loader/hub.pc.go b/test/go-tableau-loader/protoconf/loader/hub.pc.go index 6af49131..435279d4 100644 --- a/test/go-tableau-loader/protoconf/loader/hub.pc.go +++ b/test/go-tableau-loader/protoconf/loader/hub.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) package loader diff --git a/test/go-tableau-loader/protoconf/loader/index_conf.pc.go b/test/go-tableau-loader/protoconf/loader/index_conf.pc.go index 6ec07e40..379b0c4b 100644 --- a/test/go-tableau-loader/protoconf/loader/index_conf.pc.go +++ b/test/go-tableau-loader/protoconf/loader/index_conf.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: index_conf.proto package loader diff --git a/test/go-tableau-loader/protoconf/loader/item_conf.pc.go b/test/go-tableau-loader/protoconf/loader/item_conf.pc.go index 86b117d5..563b8cd3 100644 --- a/test/go-tableau-loader/protoconf/loader/item_conf.pc.go +++ b/test/go-tableau-loader/protoconf/loader/item_conf.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: item_conf.proto package loader diff --git a/test/go-tableau-loader/protoconf/loader/messager.pc.go b/test/go-tableau-loader/protoconf/loader/messager.pc.go index 4675c1c1..60c5b980 100644 --- a/test/go-tableau-loader/protoconf/loader/messager.pc.go +++ b/test/go-tableau-loader/protoconf/loader/messager.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) package loader diff --git a/test/go-tableau-loader/protoconf/loader/messager_container.pc.go b/test/go-tableau-loader/protoconf/loader/messager_container.pc.go index a6e08fbe..96b08f30 100644 --- a/test/go-tableau-loader/protoconf/loader/messager_container.pc.go +++ b/test/go-tableau-loader/protoconf/loader/messager_container.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) package loader diff --git a/test/go-tableau-loader/protoconf/loader/patch_conf.pc.go b/test/go-tableau-loader/protoconf/loader/patch_conf.pc.go index e75f0106..31c8845c 100644 --- a/test/go-tableau-loader/protoconf/loader/patch_conf.pc.go +++ b/test/go-tableau-loader/protoconf/loader/patch_conf.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: patch_conf.proto package loader diff --git a/test/go-tableau-loader/protoconf/loader/test_conf.pc.go b/test/go-tableau-loader/protoconf/loader/test_conf.pc.go index f6e78a8f..466eb20d 100644 --- a/test/go-tableau-loader/protoconf/loader/test_conf.pc.go +++ b/test/go-tableau-loader/protoconf/loader/test_conf.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: test_conf.proto package loader diff --git a/test/go-tableau-loader/protoconf/loader/util.pc.go b/test/go-tableau-loader/protoconf/loader/util.pc.go index 6bafc42b..11ea5d9d 100644 --- a/test/go-tableau-loader/protoconf/loader/util.pc.go +++ b/test/go-tableau-loader/protoconf/loader/util.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) package loader From 15532b553565b7c744ed32e8d9fd42279c25708b Mon Sep 17 00:00:00 2001 From: Kybxd <627940450@qq.com> Date: Thu, 9 Apr 2026 16:16:47 +0800 Subject: [PATCH 02/10] chore: Remove unused tableau submodule from .gitmodules --- .gitmodules | 4 ---- third_party/_submodules/tableau | 1 - 2 files changed, 5 deletions(-) delete mode 160000 third_party/_submodules/tableau diff --git a/.gitmodules b/.gitmodules index d0be858b..5f237432 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,7 +2,3 @@ path = third_party/_submodules/protobuf url = https://github.com/protocolbuffers/protobuf ignore = dirty -[submodule "third_party/_submodules/tableau"] - path = third_party/_submodules/tableau - url = https://github.com/tableauio/tableau - ignore = dirty diff --git a/third_party/_submodules/tableau b/third_party/_submodules/tableau deleted file mode 160000 index 0d308e52..00000000 --- a/third_party/_submodules/tableau +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0d308e52f7ca68ae770d7da40598ef84c7136fb3 From 0762d87c6dd0d6824c067c3446e9f412fc2f79c9 Mon Sep 17 00:00:00 2001 From: Kybxd <627940450@qq.com> Date: Thu, 9 Apr 2026 16:53:32 +0800 Subject: [PATCH 03/10] chore: Update testing workflows and buf gen config --- .github/workflows/testing-csharp.yml | 2 +- .github/workflows/testing-go.yml | 8 +++++++- test/buf.gen.yaml | 10 +++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testing-csharp.yml b/.github/workflows/testing-csharp.yml index eb998af3..7904d561 100644 --- a/.github/workflows/testing-csharp.yml +++ b/.github/workflows/testing-csharp.yml @@ -57,7 +57,7 @@ jobs: - name: Generate protoconf working-directory: test - run: buf generate + run: yq eval -i 'del(.plugins[].protoc_path)' buf.gen.yaml && buf generate - name: Build working-directory: test/csharp-tableau-loader diff --git a/.github/workflows/testing-go.yml b/.github/workflows/testing-go.yml index 4026a92e..6e028d7b 100644 --- a/.github/workflows/testing-go.yml +++ b/.github/workflows/testing-go.yml @@ -38,6 +38,12 @@ jobs: go-version: ${{ matrix.go-version }} cache: true + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: "3.19.3" + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Setup buf uses: bufbuild/buf-setup-action@v1.50.0 with: @@ -46,7 +52,7 @@ jobs: - name: Generate protoconf working-directory: test - run: buf generate + run: yq eval -i 'del(.plugins[].protoc_path)' buf.gen.yaml && buf generate - name: Vet run: go vet ./... diff --git a/test/buf.gen.yaml b/test/buf.gen.yaml index 33080075..a14a5a52 100644 --- a/test/buf.gen.yaml +++ b/test/buf.gen.yaml @@ -3,9 +3,9 @@ plugins: - remote: buf.build/protocolbuffers/go:v1.34.2 out: go-tableau-loader/protoconf opt: paths=source_relative - - local: ["go", "run", "../cmd/protoc-gen-go-tableau-loader"] + - local: ["go", "run", "../cmd/protoc-gen-go-tableau-loader"] out: go-tableau-loader/protoconf/loader - opt: + opt: - paths=source_relative - pkg=loader strategy: all @@ -13,9 +13,9 @@ plugins: protoc_path: ../third_party/_submodules/protobuf/cmake/build/protoc out: cpp-tableau-loader/src/protoconf include_imports: true - - local: ["go", "run", "../cmd/protoc-gen-cpp-tableau-loader"] + - local: ["go", "run", "../cmd/protoc-gen-cpp-tableau-loader"] out: cpp-tableau-loader/src/protoconf - opt: + opt: - paths=source_relative - shards=2 strategy: all @@ -23,7 +23,7 @@ plugins: protoc_path: ../third_party/_submodules/protobuf/cmake/build/protoc out: csharp-tableau-loader/protoconf include_imports: true - - local: ["go", "run", "../cmd/protoc-gen-csharp-tableau-loader"] + - local: ["go", "run", "../cmd/protoc-gen-csharp-tableau-loader"] out: csharp-tableau-loader/tableau opt: paths=source_relative strategy: all From 05b461ec921bdbd72fa6dcbb5288bd165c03cf5f Mon Sep 17 00:00:00 2001 From: Kybxd <627940450@qq.com> Date: Thu, 9 Apr 2026 16:59:48 +0800 Subject: [PATCH 04/10] chore: Simplify CI by moving protoc_path deletion to separate steps --- .github/workflows/testing-csharp.yml | 7 ++++++- .github/workflows/testing-go.yml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing-csharp.yml b/.github/workflows/testing-csharp.yml index 7904d561..4e5c83db 100644 --- a/.github/workflows/testing-csharp.yml +++ b/.github/workflows/testing-csharp.yml @@ -55,9 +55,14 @@ jobs: version: 1.67.0 github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Use default protoc path + uses: mikefarah/yq@master + with: + cmd: yq eval -i 'del(.plugins[].protoc_path)' buf.gen.yaml + - name: Generate protoconf working-directory: test - run: yq eval -i 'del(.plugins[].protoc_path)' buf.gen.yaml && buf generate + run: buf generate - name: Build working-directory: test/csharp-tableau-loader diff --git a/.github/workflows/testing-go.yml b/.github/workflows/testing-go.yml index 6e028d7b..fddb00c5 100644 --- a/.github/workflows/testing-go.yml +++ b/.github/workflows/testing-go.yml @@ -50,9 +50,14 @@ jobs: version: 1.67.0 github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Use default protoc path + uses: mikefarah/yq@master + with: + cmd: yq eval -i 'del(.plugins[].protoc_path)' buf.gen.yaml + - name: Generate protoconf working-directory: test - run: yq eval -i 'del(.plugins[].protoc_path)' buf.gen.yaml && buf generate + run: buf generate - name: Vet run: go vet ./... From 26703a42e16cb2dc37bc6374bd82093a07e61d91 Mon Sep 17 00:00:00 2001 From: Kybxd <627940450@qq.com> Date: Thu, 9 Apr 2026 17:02:12 +0800 Subject: [PATCH 05/10] chore: Update yq target and protoc_path scope in tests --- .github/workflows/testing-csharp.yml | 2 +- .github/workflows/testing-go.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing-csharp.yml b/.github/workflows/testing-csharp.yml index 4e5c83db..0b7bd132 100644 --- a/.github/workflows/testing-csharp.yml +++ b/.github/workflows/testing-csharp.yml @@ -58,7 +58,7 @@ jobs: - name: Use default protoc path uses: mikefarah/yq@master with: - cmd: yq eval -i 'del(.plugins[].protoc_path)' buf.gen.yaml + cmd: yq eval -i 'del(.plugins[].protoc_path)' test/buf.gen.yaml - name: Generate protoconf working-directory: test diff --git a/.github/workflows/testing-go.yml b/.github/workflows/testing-go.yml index fddb00c5..8ce77743 100644 --- a/.github/workflows/testing-go.yml +++ b/.github/workflows/testing-go.yml @@ -53,7 +53,7 @@ jobs: - name: Use default protoc path uses: mikefarah/yq@master with: - cmd: yq eval -i 'del(.plugins[].protoc_path)' buf.gen.yaml + cmd: yq eval -i 'del(.plugins[].protoc_path)' test/buf.gen.yaml - name: Generate protoconf working-directory: test From f350f41369cafe92216a85dab1c482ff3f1c532a Mon Sep 17 00:00:00 2001 From: Kybxd <627940450@qq.com> Date: Thu, 9 Apr 2026 17:17:38 +0800 Subject: [PATCH 06/10] feat: Unify buf-based protoconf generation across tests --- .github/workflows/testing-cpp.yml | 4 ++-- .github/workflows/testing-csharp.yml | 9 ++----- .github/workflows/testing-go.yml | 9 ++----- README.md | 9 ++++--- test/buf.gen.yaml | 31 ------------------------- test/cpp-tableau-loader/buf.gen.yaml | 11 +++++++++ test/csharp-tableau-loader/buf.gen.yaml | 9 +++++++ test/go-tableau-loader/buf.gen.yaml | 11 +++++++++ 8 files changed, 41 insertions(+), 52 deletions(-) delete mode 100644 test/buf.gen.yaml create mode 100644 test/cpp-tableau-loader/buf.gen.yaml create mode 100644 test/csharp-tableau-loader/buf.gen.yaml create mode 100644 test/go-tableau-loader/buf.gen.yaml diff --git a/.github/workflows/testing-cpp.yml b/.github/workflows/testing-cpp.yml index ef135971..4288b686 100644 --- a/.github/workflows/testing-cpp.yml +++ b/.github/workflows/testing-cpp.yml @@ -64,8 +64,8 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} - name: Generate protoconf - working-directory: test - run: buf generate + working-directory: test/cpp-tableau-loader + run: buf generate .. - name: CMake Configure working-directory: test/cpp-tableau-loader diff --git a/.github/workflows/testing-csharp.yml b/.github/workflows/testing-csharp.yml index 0b7bd132..6a907c6d 100644 --- a/.github/workflows/testing-csharp.yml +++ b/.github/workflows/testing-csharp.yml @@ -55,14 +55,9 @@ jobs: version: 1.67.0 github_token: ${{ secrets.GITHUB_TOKEN }} - - name: Use default protoc path - uses: mikefarah/yq@master - with: - cmd: yq eval -i 'del(.plugins[].protoc_path)' test/buf.gen.yaml - - name: Generate protoconf - working-directory: test - run: buf generate + working-directory: test/csharp-tableau-loader + run: buf generate .. - name: Build working-directory: test/csharp-tableau-loader diff --git a/.github/workflows/testing-go.yml b/.github/workflows/testing-go.yml index 8ce77743..49a660bf 100644 --- a/.github/workflows/testing-go.yml +++ b/.github/workflows/testing-go.yml @@ -50,14 +50,9 @@ jobs: version: 1.67.0 github_token: ${{ secrets.GITHUB_TOKEN }} - - name: Use default protoc path - uses: mikefarah/yq@master - with: - cmd: yq eval -i 'del(.plugins[].protoc_path)' test/buf.gen.yaml - - name: Generate protoconf - working-directory: test - run: buf generate + working-directory: test/go-tableau-loader + run: buf generate .. - name: Vet run: go vet ./... diff --git a/README.md b/README.md index 3df3d889..eafd30bd 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau). ### Dev at Linux - Change dir: `cd test/cpp-tableau-loader` -- Generate protoconf: `bash ./gen.sh` +- Generate protoconf: `PATH=../third_party/_submodules/protobuf/cmake/build:$PATH buf generate ..` - CMake: - C++17: `cmake -S . -B build` - C++20: `cmake -S . -B build -DCMAKE_CXX_STANDARD=20` @@ -53,7 +53,7 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau). - Initialize MSVC environment (from loader root): `.\prepare.bat` - Change dir: `cd test\cpp-tableau-loader`, or change directory with Drive, e.g.: `cd /D D:\GitHub\loader\test\cpp-tableau-loader` -- Generate protoconf: `.\gen.bat` +- Generate protoconf: `cmd /C "set PATH=..\third_party\_submodules\protobuf\cmake\build;%PATH% && buf generate .." ` - CMake: - C++17: `cmake -S . -B build -G "Ninja"` - C++20: `cmake -S . -B build -G "Ninja" -DCMAKE_CXX_STANDARD=20` @@ -68,9 +68,8 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau). ## Go - Install: **go1.21** or above -- Install protoc-gen-go: `go install google.golang.org/protobuf/cmd/protoc-gen-go@latest` - Change dir: `cd test/go-tableau-loader` -- Generate protoconf: `bash ./gen.sh` +- Generate protoconf: `buf generate .. ` - Run: `go run .` ### References @@ -88,7 +87,7 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau). - Install: **dotnet-sdk-8.0** - Change dir: `cd test/csharp-tableau-loader` -- Generate protoconf: `sh gen.sh` +- Generate protoconf: `PATH=../third_party/_submodules/protobuf/cmake/build:$PATH buf generate .. ` - Test: `dotnet run` ## TypeScript diff --git a/test/buf.gen.yaml b/test/buf.gen.yaml deleted file mode 100644 index a14a5a52..00000000 --- a/test/buf.gen.yaml +++ /dev/null @@ -1,31 +0,0 @@ -version: v2 -plugins: - - remote: buf.build/protocolbuffers/go:v1.34.2 - out: go-tableau-loader/protoconf - opt: paths=source_relative - - local: ["go", "run", "../cmd/protoc-gen-go-tableau-loader"] - out: go-tableau-loader/protoconf/loader - opt: - - paths=source_relative - - pkg=loader - strategy: all - - protoc_builtin: cpp - protoc_path: ../third_party/_submodules/protobuf/cmake/build/protoc - out: cpp-tableau-loader/src/protoconf - include_imports: true - - local: ["go", "run", "../cmd/protoc-gen-cpp-tableau-loader"] - out: cpp-tableau-loader/src/protoconf - opt: - - paths=source_relative - - shards=2 - strategy: all - - protoc_builtin: csharp - protoc_path: ../third_party/_submodules/protobuf/cmake/build/protoc - out: csharp-tableau-loader/protoconf - include_imports: true - - local: ["go", "run", "../cmd/protoc-gen-csharp-tableau-loader"] - out: csharp-tableau-loader/tableau - opt: paths=source_relative - strategy: all -inputs: - - directory: proto diff --git a/test/cpp-tableau-loader/buf.gen.yaml b/test/cpp-tableau-loader/buf.gen.yaml new file mode 100644 index 00000000..37635486 --- /dev/null +++ b/test/cpp-tableau-loader/buf.gen.yaml @@ -0,0 +1,11 @@ +version: v2 +plugins: + - protoc_builtin: cpp + out: src/protoconf + include_imports: true + - local: ["go", "run", "../../cmd/protoc-gen-cpp-tableau-loader"] + out: src/protoconf + opt: + - paths=source_relative + - shards=2 + strategy: all diff --git a/test/csharp-tableau-loader/buf.gen.yaml b/test/csharp-tableau-loader/buf.gen.yaml new file mode 100644 index 00000000..156e631c --- /dev/null +++ b/test/csharp-tableau-loader/buf.gen.yaml @@ -0,0 +1,9 @@ +version: v2 +plugins: + - protoc_builtin: csharp + out: protoconf + include_imports: true + - local: ["go", "run", "../../cmd/protoc-gen-csharp-tableau-loader"] + out: tableau + opt: paths=source_relative + strategy: all diff --git a/test/go-tableau-loader/buf.gen.yaml b/test/go-tableau-loader/buf.gen.yaml new file mode 100644 index 00000000..d1926bc5 --- /dev/null +++ b/test/go-tableau-loader/buf.gen.yaml @@ -0,0 +1,11 @@ +version: v2 +plugins: + - remote: buf.build/protocolbuffers/go:v1.34.2 + out: protoconf + opt: paths=source_relative + - local: ["go", "run", "../../cmd/protoc-gen-go-tableau-loader"] + out: protoconf/loader + opt: + - paths=source_relative + - pkg=loader + strategy: all \ No newline at end of file From ac07af6499f464148c1ba1a4b4d02d261f4e4fcb Mon Sep 17 00:00:00 2001 From: Kybxd <627940450@qq.com> Date: Thu, 9 Apr 2026 17:22:59 +0800 Subject: [PATCH 07/10] ci: Update protobuf paths and add buf_generate matrix --- .github/workflows/testing-cpp.yml | 4 +++- README.md | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing-cpp.yml b/.github/workflows/testing-cpp.yml index 4288b686..ed2b9430 100644 --- a/.github/workflows/testing-cpp.yml +++ b/.github/workflows/testing-cpp.yml @@ -20,10 +20,12 @@ jobs: - os: ubuntu-latest go-version: 1.21.x init_script: bash init.sh + buf_generate: PATH=../../third_party/_submodules/protobuf/cmake/build:$PATH buf generate .. run_loader: ./bin/loader - os: windows-latest go-version: 1.21.x init_script: cmd /c init.bat + buf_generate: cmd /C "set PATH=..\..\third_party\_submodules\protobuf\cmake\build;%PATH% && buf generate .." run_loader: .\bin\loader.exe name: test (${{ matrix.os }}) @@ -65,7 +67,7 @@ jobs: - name: Generate protoconf working-directory: test/cpp-tableau-loader - run: buf generate .. + run: ${{ matrix.buf_generate }} - name: CMake Configure working-directory: test/cpp-tableau-loader diff --git a/README.md b/README.md index eafd30bd..128934c9 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau). ### Dev at Linux - Change dir: `cd test/cpp-tableau-loader` -- Generate protoconf: `PATH=../third_party/_submodules/protobuf/cmake/build:$PATH buf generate ..` +- Generate protoconf: `PATH=../../third_party/_submodules/protobuf/cmake/build:$PATH buf generate ..` - CMake: - C++17: `cmake -S . -B build` - C++20: `cmake -S . -B build -DCMAKE_CXX_STANDARD=20` @@ -53,7 +53,7 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau). - Initialize MSVC environment (from loader root): `.\prepare.bat` - Change dir: `cd test\cpp-tableau-loader`, or change directory with Drive, e.g.: `cd /D D:\GitHub\loader\test\cpp-tableau-loader` -- Generate protoconf: `cmd /C "set PATH=..\third_party\_submodules\protobuf\cmake\build;%PATH% && buf generate .." ` +- Generate protoconf: `cmd /C "set PATH=..\..\third_party\_submodules\protobuf\cmake\build;%PATH% && buf generate .."` - CMake: - C++17: `cmake -S . -B build -G "Ninja"` - C++20: `cmake -S . -B build -G "Ninja" -DCMAKE_CXX_STANDARD=20` From 53d954574d11118500cd2cde141d81221f4bbd6c Mon Sep 17 00:00:00 2001 From: Kybxd <627940450@qq.com> Date: Wed, 22 Apr 2026 14:33:11 +0800 Subject: [PATCH 08/10] chore: Update buf setup in CI to pinned version --- .github/workflows/testing-cpp.yml | 17 +++++++++++------ .github/workflows/testing-csharp.yml | 7 ++++--- .github/workflows/testing-go.yml | 16 ++++++---------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/testing-cpp.yml b/.github/workflows/testing-cpp.yml index ed2b9430..b66e88a0 100644 --- a/.github/workflows/testing-cpp.yml +++ b/.github/workflows/testing-cpp.yml @@ -3,7 +3,7 @@ name: Testing C++ # Trigger on pushes, PRs (excluding documentation changes), and nightly. on: push: - branches: [master, main] + branches: [ master, main ] pull_request: schedule: - cron: 0 0 * * * # daily at 00:00 @@ -20,12 +20,15 @@ jobs: - os: ubuntu-latest go-version: 1.21.x init_script: bash init.sh - buf_generate: PATH=../../third_party/_submodules/protobuf/cmake/build:$PATH buf generate .. + buf_generate: PATH=../../third_party/_submodules/protobuf/cmake/build:$PATH buf + generate .. run_loader: ./bin/loader - os: windows-latest go-version: 1.21.x init_script: cmd /c init.bat - buf_generate: cmd /C "set PATH=..\..\third_party\_submodules\protobuf\cmake\build;%PATH% && buf generate .." + buf_generate: cmd /C "set + PATH=..\..\third_party\_submodules\protobuf\cmake\build;%PATH% && + buf generate .." run_loader: .\bin\loader.exe name: test (${{ matrix.os }}) @@ -59,10 +62,11 @@ jobs: - name: Init submodules and build protobuf run: ${{ matrix.init_script }} - - name: Setup buf - uses: bufbuild/buf-setup-action@v1.50.0 + - name: Install Buf + uses: bufbuild/buf-action@v1 with: version: 1.67.0 + setup_only: true github_token: ${{ secrets.GITHUB_TOKEN }} - name: Generate protoconf @@ -71,7 +75,8 @@ jobs: - name: CMake Configure working-directory: test/cpp-tableau-loader - run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=17 + run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_CXX_STANDARD=17 - name: CMake Build working-directory: test/cpp-tableau-loader diff --git a/.github/workflows/testing-csharp.yml b/.github/workflows/testing-csharp.yml index 6a907c6d..3937c779 100644 --- a/.github/workflows/testing-csharp.yml +++ b/.github/workflows/testing-csharp.yml @@ -3,7 +3,7 @@ name: Testing C# # Trigger on pushes, PRs (excluding documentation changes), and nightly. on: push: - branches: [master, main] + branches: [ master, main ] pull_request: schedule: - cron: 0 0 * * * # daily at 00:00 @@ -49,10 +49,11 @@ jobs: version: "3.19.3" repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Setup buf - uses: bufbuild/buf-setup-action@v1.50.0 + - name: Install Buf + uses: bufbuild/buf-action@v1 with: version: 1.67.0 + setup_only: true github_token: ${{ secrets.GITHUB_TOKEN }} - name: Generate protoconf diff --git a/.github/workflows/testing-go.yml b/.github/workflows/testing-go.yml index 49a660bf..9c54c255 100644 --- a/.github/workflows/testing-go.yml +++ b/.github/workflows/testing-go.yml @@ -3,7 +3,7 @@ name: Testing Go # Trigger on pushes, PRs (excluding documentation changes), and nightly. on: push: - branches: [master, main] + branches: [ master, main ] pull_request: schedule: - cron: 0 0 * * * # daily at 00:00 @@ -38,16 +38,11 @@ jobs: go-version: ${{ matrix.go-version }} cache: true - - name: Install Protoc - uses: arduino/setup-protoc@v1 - with: - version: "3.19.3" - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup buf - uses: bufbuild/buf-setup-action@v1.50.0 + - name: Install Buf + uses: bufbuild/buf-action@v1 with: version: 1.67.0 + setup_only: true github_token: ${{ secrets.GITHUB_TOKEN }} - name: Generate protoconf @@ -58,7 +53,8 @@ jobs: run: go vet ./... - name: Unittest - run: go test -v -timeout 30m -race ./... -coverprofile=coverage.txt -covermode=atomic + run: go test -v -timeout 30m -race ./... -coverprofile=coverage.txt + -covermode=atomic - name: Run loader working-directory: test/go-tableau-loader From 2e91215cea94e03da5e7415604375ed9f0484856 Mon Sep 17 00:00:00 2001 From: Kybxd <627940450@qq.com> Date: Wed, 22 Apr 2026 15:28:33 +0800 Subject: [PATCH 09/10] chore: Improve YAML formatting and readability across release workflows --- .github/workflows/release-cpp.yml | 9 +++++---- .github/workflows/release-csharp.yml | 9 +++++---- .github/workflows/release-go.yml | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-cpp.yml b/.github/workflows/release-cpp.yml index 34792cca..c843b99b 100644 --- a/.github/workflows/release-cpp.yml +++ b/.github/workflows/release-cpp.yml @@ -2,18 +2,19 @@ name: Release CPP on: release: - types: [published] + types: [ published ] workflow_dispatch: jobs: release: name: Release cmd/protoc-gen-cpp-tableau-loader runs-on: ubuntu-latest - if: startsWith(github.event.release.tag_name, 'cmd/protoc-gen-cpp-tableau-loader/') + if: startsWith(github.event.release.tag_name, + 'cmd/protoc-gen-cpp-tableau-loader/') strategy: matrix: - goos: [linux, darwin, windows] - goarch: [amd64, arm64] + goos: [ linux, darwin, windows ] + goarch: [ amd64, arm64 ] exclude: - goos: linux goarch: arm64 diff --git a/.github/workflows/release-csharp.yml b/.github/workflows/release-csharp.yml index aa718903..e9490733 100644 --- a/.github/workflows/release-csharp.yml +++ b/.github/workflows/release-csharp.yml @@ -2,18 +2,19 @@ name: Release C# on: release: - types: [published] + types: [ published ] workflow_dispatch: jobs: release: name: Release cmd/protoc-gen-csharp-tableau-loader runs-on: ubuntu-latest - if: startsWith(github.event.release.tag_name, 'cmd/protoc-gen-csharp-tableau-loader/') + if: startsWith(github.event.release.tag_name, + 'cmd/protoc-gen-csharp-tableau-loader/') strategy: matrix: - goos: [linux, darwin, windows] - goarch: [amd64, arm64] + goos: [ linux, darwin, windows ] + goarch: [ amd64, arm64 ] exclude: - goos: linux goarch: arm64 diff --git a/.github/workflows/release-go.yml b/.github/workflows/release-go.yml index 68da1559..79ca9389 100644 --- a/.github/workflows/release-go.yml +++ b/.github/workflows/release-go.yml @@ -2,17 +2,18 @@ name: Release Go on: release: - types: [published] + types: [ published ] workflow_dispatch: jobs: release: name: Release cmd/protoc-gen-go-tableau-loader runs-on: ubuntu-latest - if: startsWith(github.event.release.tag_name, 'cmd/protoc-gen-go-tableau-loader/') + if: startsWith(github.event.release.tag_name, + 'cmd/protoc-gen-go-tableau-loader/') strategy: matrix: - goos: [linux, darwin, windows] - goarch: [amd64, arm64] + goos: [ linux, darwin, windows ] + goarch: [ amd64, arm64 ] exclude: - goos: linux goarch: arm64 From aac3a6b2535dc48569ae7ac33bf182435f1e5858 Mon Sep 17 00:00:00 2001 From: Kybxd <627940450@qq.com> Date: Wed, 22 Apr 2026 16:58:01 +0800 Subject: [PATCH 10/10] chore: Update CI buf setup and simplify generate steps --- .github/workflows/testing-cpp.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/testing-cpp.yml b/.github/workflows/testing-cpp.yml index b66e88a0..9229d24f 100644 --- a/.github/workflows/testing-cpp.yml +++ b/.github/workflows/testing-cpp.yml @@ -20,15 +20,10 @@ jobs: - os: ubuntu-latest go-version: 1.21.x init_script: bash init.sh - buf_generate: PATH=../../third_party/_submodules/protobuf/cmake/build:$PATH buf - generate .. run_loader: ./bin/loader - os: windows-latest go-version: 1.21.x init_script: cmd /c init.bat - buf_generate: cmd /C "set - PATH=..\..\third_party\_submodules\protobuf\cmake\build;%PATH% && - buf generate .." run_loader: .\bin\loader.exe name: test (${{ matrix.os }}) @@ -62,6 +57,12 @@ jobs: - name: Init submodules and build protobuf run: ${{ matrix.init_script }} + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: "3.19.3" + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Buf uses: bufbuild/buf-action@v1 with: @@ -71,7 +72,7 @@ jobs: - name: Generate protoconf working-directory: test/cpp-tableau-loader - run: ${{ matrix.buf_generate }} + run: buf generate .. - name: CMake Configure working-directory: test/cpp-tableau-loader