Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/release-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release-csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/testing-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Testing C++
# Trigger on pushes, PRs (excluding documentation changes), and nightly.
on:
push:
branches: [master, main]
branches: [ master, main ]
Comment thread
wenchy marked this conversation as resolved.
pull_request:
schedule:
- cron: 0 0 * * * # daily at 00:00
Expand All @@ -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 }})
Expand Down Expand Up @@ -59,13 +57,27 @@ 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:
version: 1.67.0
setup_only: true
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Generate protoconf
working-directory: test/cpp-tableau-loader
run: ${{ matrix.gen_script }}
run: buf generate ..

- 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
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/testing-csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -51,9 +49,16 @@ jobs:
version: "3.19.3"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Buf
uses: bufbuild/buf-action@v1
with:
version: 1.67.0
setup_only: true
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Generate protoconf
working-directory: test/csharp-tableau-loader
run: ${{ matrix.gen_script }}
run: buf generate ..

- name: Build
working-directory: test/csharp-tableau-loader
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/testing-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -40,24 +38,23 @@ jobs:
go-version: ${{ matrix.go-version }}
cache: true

- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Install Buf
uses: bufbuild/buf-action@v1
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
setup_only: true
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Generate protoconf
working-directory: test/go-tableau-loader
run: ${{ matrix.gen_script }}
run: buf generate ..

- name: Vet
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
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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`
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions test/buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/tableauio/tableau
commit: 04b3a2c59b6644318d341d4f2220a578
digest: b5:59bca610664e985502469393a4d47370da9d40d874312a76db4fe133fe61e27fc23b72d2ad45d67c3af76e6620ab1c86c3de0bd13d3517abf6e8b75a346b78fd
5 changes: 5 additions & 0 deletions test/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: v2
deps:
- buf.build/tableauio/tableau:v0.15.1
modules:
- path: proto
11 changes: 11 additions & 0 deletions test/cpp-tableau-loader/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -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
82 changes: 0 additions & 82 deletions test/cpp-tableau-loader/gen.bat

This file was deleted.

Loading
Loading