Skip to content

Commit

Permalink
Add root package and github CI for Bazel.
Browse files Browse the repository at this point in the history
  • Loading branch information
BYVoid authored and jiahansu committed Aug 21, 2024
1 parent fe7404d commit 5b994e2
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: C++ CI with Bazel

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v3
- run: bazel build //:opencc
- run: bazel test //src/...
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: C/C++ CI
name: C++ CI with CMake

on:
push:
Expand Down
6 changes: 6 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cc_library(
name = "opencc",
deps = [
"//src:opencc",
],
)
10 changes: 10 additions & 0 deletions src/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
cc_library(
name = "opencc",
visibility = ["//visibility:public"],
deps = [
":binary_dict",
":common",
":darts_dict",
],
)

cc_library(
name = "binary_dict",
srcs = ["BinaryDict.cpp"],
Expand Down

0 comments on commit 5b994e2

Please sign in to comment.