Skip to content

Commit

Permalink
Add bazel build definitions for examples and add bazel build/test to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
reutermj authored and SanderMertens committed Aug 24, 2024
1 parent 43cb8ca commit 4d506fe
Show file tree
Hide file tree
Showing 171 changed files with 1,898 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,34 @@ jobs:
working-directory: meson_build
run: |
meson compile
build-bazel-linux:
needs: build-linux
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- name: build flecs
run: bazel build //:flecs
- name: build examples
run: bazel build //examples/...
- name: run tests
run: bazel test //test/...

build-bazel-windows:
needs: build-windows
runs-on: windows-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- name: build flecs
run: bazel build //:flecs
- name: build examples
run: bazel build //examples/...
- name: run tests
run: bazel test //test/...

build-custom:
needs: build-linux
Expand Down
11 changes: 11 additions & 0 deletions examples/c/entities/basics/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "basics",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/entities/fwd_declare_component/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "fwd_declare_component",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/entities/hierarchy/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "hierarchy",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/entities/hooks/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "hooks",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/entities/iterate_components/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "iterate_components",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/explorer/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "explorer",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/hello_world/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "hello_world",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/modules/simple_module/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "simple_module",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/observers/basics/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "basics",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/observers/custom_event/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "custom_event",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/observers/enqueue_entity_event/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "enqueue_entity_event",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/observers/enqueue_event/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "enqueue_event",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/observers/entity_event/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "entity_event",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/observers/monitor/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "monitor",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/observers/propagate/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "propagate",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/observers/two_components/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "two_components",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/observers/yield_existing/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "yield_existing",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/prefabs/basics/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "basics",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/prefabs/hierarchy/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "hierarchy",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/prefabs/nested_prefabs/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "nested_prefabs",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/prefabs/override/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "override",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/prefabs/slots/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "slots",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/prefabs/variant/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "variant",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/queries/basics/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "basics",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/queries/change_tracking/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "change_tracking",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/queries/component_inheritance/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "component_inheritance",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/queries/cyclic_variables/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "cyclic_variables",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/queries/facts/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "facts",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/queries/group_by/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "group_by",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
11 changes: 11 additions & 0 deletions examples/c/queries/group_by_callbacks/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cc_binary(
name = "group_by_callbacks",
srcs = glob([
"src/*.c",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"//:flecs",
],
)
Loading

0 comments on commit 4d506fe

Please sign in to comment.