Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI bazel job #1469

Merged
merged 1 commit into from
Dec 11, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ jobs:
working-directory: meson_build
run: |
meson compile

build-bazel-linux:
needs: build-linux
runs-on: ubuntu-latest
Expand All @@ -308,7 +308,7 @@ jobs:
- name: build examples
run: bazel build //examples/...
- name: run tests
run: bazel test //test/...
run: bazel test --test_output=all //test/...

build-bazel-windows:
needs: build-windows
Expand All @@ -322,7 +322,7 @@ jobs:
- name: build examples
run: bazel build //examples/...
- name: run tests
run: bazel test //test/...
run: bazel test --test_output=all //test/...

build-custom:
needs: build-linux
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cc_library(
deps = [":util", ":bake"],
defines = ["__BAKE__", "bake_test_EXPORTS"],

srcs = glob(["drivers/test/src/**/*.c", "drivers/test/src/**/*.h"]),
srcs = glob(["drivers/test/src/**/*.c"]),
hdrs = glob(["drivers/test/include/**/*.h"]),
includes = ["drivers/test/include"],
)
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cc_library(
visibility = ["//visibility:public"],
deps = [":util", ":bake"],

srcs = glob(["drivers/test/src/**/*.c", "drivers/test/src/**/*.h"]),
srcs = glob(["drivers/test/src/**/*.c"]),
hdrs = glob(["drivers/test/include/**/*.h"]),
includes = ["drivers/test/include"],
)
Expand Down
6 changes: 3 additions & 3 deletions examples/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cc_library(
visibility = ["//:__subpackages__"],
deps = ["//:flecs", "@bake//:util"],

srcs = glob(["os_api/flecs-os_api-bake/src/**/*.c", "os_api/flecs-os_api-bake/src/**/*.h"]),
hdrs = glob(["os_api/flecs-os_api-bake/include/**/*.h"]),
includes = ["os_api/flecs-os_api-bake/include"],
srcs = glob(["os_api/bake/src/**/*.c"]),
hdrs = glob(["os_api/bake/include/**/*.h"]),
includes = ["os_api/bake/include"],
)
19 changes: 6 additions & 13 deletions test/BUILD
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
load(":bake_tests.bzl", "persuite_bake_tests")

cc_library(
name = "test-api",
deps = ["//:flecs", "//examples:os-api", "@bake//:driver-test"],

srcs = glob(["api/src/*.c", "api/**/*.h"]),
includes = ["api/include"],
cc_test(
name = "core",
deps = ["//:flecs", "@bake//:driver-test"],
srcs = glob(["core/src/*.c", "core/**/*.h"]),
includes = ["core/include"],
)

persuite_bake_tests("api", [":test-api"], glob(["api/src/*.c"], exclude=["api/src/main.c", "api/src/util.c"]))

cc_test(
name = "collections",
deps = ["//:flecs", "@bake//:driver-test"],

srcs = glob(["collections/src/*.c", "collections/**/*.h"]),
includes = ["collections/include"],

timeout = "short",
)

cc_test(
Expand All @@ -26,6 +21,4 @@ cc_test(

srcs = glob(["cpp/src/*.cpp", "cpp/**/*.h"]),
includes = ["cpp/include"],

timeout = "short",
)
16 changes: 0 additions & 16 deletions test/bake_tests.bzl

This file was deleted.

10 changes: 5 additions & 5 deletions test/core/src/Observer.c
Original file line number Diff line number Diff line change
Expand Up @@ -7455,7 +7455,7 @@ void Observer_register_comp_in_emit_named_entity(void) {
ECS_TAG(world, TagA);
ECS_TAG(world, Event);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {
Expand Down Expand Up @@ -7498,7 +7498,7 @@ void Observer_register_comp_w_macro_in_emit_named_entity(void) {
ECS_TAG(world, TagA);
ECS_TAG(world, Event);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {
Expand Down Expand Up @@ -7544,7 +7544,7 @@ void Observer_add_to_self_in_emit_entity(void) {
ECS_TAG(world, Event);
ECS_TAG_DEFINE(world, Foo);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {
Expand Down Expand Up @@ -7574,7 +7574,7 @@ void Observer_on_set_w_not_tag(void) {
ECS_COMPONENT(world, Position);
ECS_TAG(world, Foo);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {
Expand Down Expand Up @@ -7608,7 +7608,7 @@ void Observer_on_set_w_not_component(void) {
ECS_COMPONENT(world, Position);
ECS_COMPONENT(world, Velocity);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {
Expand Down
2 changes: 1 addition & 1 deletion test/core/src/OnDelete.c
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@ void OnDelete_delete_with_inherited_tag_w_observer(void) {
ecs_entity_t base = ecs_new_w(world, Tag);
ecs_entity_t inst = ecs_new_w_pair(world, EcsIsA, base);

Probe ctx;
Probe ctx = {0};
ecs_entity_t o = ecs_observer_init(world, &(ecs_observer_desc_t){
.query.terms = {{ Tag }},
.events = { EcsOnRemove },
Expand Down
24 changes: 12 additions & 12 deletions test/core/src/Sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ void Sparse_on_add_observer(void) {

ecs_add_id(world, ecs_id(Position), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }},
Expand Down Expand Up @@ -1324,7 +1324,7 @@ void Sparse_on_set_observer_set(void) {

ecs_add_id(world, ecs_id(Position), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }},
Expand Down Expand Up @@ -1355,7 +1355,7 @@ void Sparse_on_set_observer_modified(void) {

ecs_add_id(world, ecs_id(Position), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }},
Expand Down Expand Up @@ -1391,7 +1391,7 @@ void Sparse_on_set_observer_insert(void) {

ecs_add_id(world, ecs_id(Position), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }},
Expand Down Expand Up @@ -1421,7 +1421,7 @@ void Sparse_on_remove_observer_remove(void) {

ecs_add_id(world, ecs_id(Position), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }},
Expand Down Expand Up @@ -1453,7 +1453,7 @@ void Sparse_on_remove_observer_clear(void) {

ecs_add_id(world, ecs_id(Position), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }},
Expand Down Expand Up @@ -1485,7 +1485,7 @@ void Sparse_on_remove_observer_delete(void) {

ecs_add_id(world, ecs_id(Position), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }},
Expand Down Expand Up @@ -1517,7 +1517,7 @@ void Sparse_on_remove_observer_fini(void) {

ecs_add_id(world, ecs_id(Position), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }},
Expand Down Expand Up @@ -1565,7 +1565,7 @@ void Sparse_on_set_after_remove_override(void) {

ecs_set(world, e, Position, {30, 40});

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ ecs_id(Position) }},
Expand Down Expand Up @@ -1618,7 +1618,7 @@ void Sparse_on_add_observer_2_terms(void) {
ecs_add_id(world, ecs_id(Position), EcsSparse);
ecs_add_id(world, ecs_id(Velocity), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }, { .id = ecs_id(Velocity) }},
Expand Down Expand Up @@ -1652,7 +1652,7 @@ void Sparse_on_set_observer_2_terms(void) {
ecs_add_id(world, ecs_id(Position), EcsSparse);
ecs_add_id(world, ecs_id(Velocity), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }, { .id = ecs_id(Velocity) }},
Expand Down Expand Up @@ -1687,7 +1687,7 @@ void Sparse_on_remove_observer_2_terms(void) {
ecs_add_id(world, ecs_id(Position), EcsSparse);
ecs_add_id(world, ecs_id(Velocity), EcsSparse);

Probe ctx;
Probe ctx = {0};

ecs_observer(world, {
.query.terms = {{ .id = ecs_id(Position) }, { .id = ecs_id(Velocity) }},
Expand Down
Loading