Skip to content

Commit 72cdf40

Browse files
authored
feat: add bazel tests + remove autolinking (#2)
1 parent 613cb5e commit 72cdf40

10 files changed

Lines changed: 6076 additions & 4 deletions

File tree

.bazelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
21
common --enable_bzlmod
3-
build --incompatible_use_platforms_repo_for_constraints
42
build --incompatible_enable_cc_toolchain_resolution
53
build --incompatible_strict_action_env
64
build --enable_runfiles
75
build --registry=https://raw.githubusercontent.com/bazelboost/registry/main
86
build --registry=https://bcr.bazel.build
7+
query --registry=https://raw.githubusercontent.com/bazelboost/registry/main
8+
query --registry=https://bcr.bazel.build
99

1010
try-import %workspace%/user.bazelrc

.github/workflows/bazel.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: bazel
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os:
11+
- ubuntu-latest
12+
- windows-latest
13+
- macos-latest
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- run: bazelisk test ... -k
18+
working-directory: test

BUILD.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ package(default_visibility = ["//visibility:public"])
44

55
cc_library(
66
name = "boost.program_options",
7+
srcs = glob([
8+
"src/**/*.cpp",
9+
"src/**/*.ipp",
10+
]),
711
hdrs = glob([
812
"include/**/*.hpp",
913
"include/**/*.h",
14+
"include/**/*.ipp",
1015
]),
16+
defines = ["BOOST_ALL_NO_LIB"],
1117
includes = ["include"],
1218
deps = [
1319
"@boost.any",

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ module(
44
compatibility_level = 108300,
55
)
66

7-
bazel_dep(name = "rules_cc", version = "0.0.8")
7+
bazel_dep(name = "rules_cc", version = "0.0.9")
88
bazel_dep(name = "boost.any", version = "1.83.0.bzl.1")
99
bazel_dep(name = "boost.bind", version = "1.83.0.bzl.1")
1010
bazel_dep(name = "boost.config", version = "1.83.0.bzl.6")
1111
bazel_dep(name = "boost.core", version = "1.83.0.bzl.1")
12-
bazel_dep(name = "boost.detail", version = "1.83.0.bzl.1")
12+
bazel_dep(name = "boost.detail", version = "1.83.0.bzl.2")
1313
bazel_dep(name = "boost.function", version = "1.83.0.bzl.1")
1414
bazel_dep(name = "boost.iterator", version = "1.83.0.bzl.1")
1515
bazel_dep(name = "boost.lexical_cast", version = "1.83.0.bzl.1")

0 commit comments

Comments
 (0)