Skip to content

Commit e4e021d

Browse files
committed
Make stub gamedata targets incompatible so bazel build/test //... works
Add empty stub files and mark all @gamedata targets with target_compatible_with = @platforms//:incompatible in the stub repo. Pipeline targets are cleanly skipped without --override_repository. Add platforms dep to MODULE.bazel.
1 parent 85d4aac commit e4e021d

6 files changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
bazelisk-cache: true
1515
disk-cache: ${{ github.workflow }}
1616
repository-cache: true
17-
- run: bazel test //patcher/dat/types:types_test
17+
- run: bazel test //patcher/...
1818

1919
web-test:
2020
runs-on: ubuntu-latest

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ bazel_dep(name = "ooz", version = "0")
1313
bazel_dep(name = "libunistring", version = "1.3")
1414
bazel_dep(name = "rules_python", version = "1.9.0")
1515
bazel_dep(name = "rules_pkg", version = "1.2.0")
16+
bazel_dep(name = "platforms", version = "1.0.0")
1617
bazel_dep(name = "gamedata", version = "0")
1718

1819
git_override(
Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
1+
# Stub gamedata repository. Override with --override_repository to provide real data.
2+
# All targets are marked incompatible so `bazel build //...` skips pipeline targets
3+
# that depend on @gamedata rather than failing.
4+
5+
_INCOMPATIBLE = ["@platforms//:incompatible"]
6+
17
filegroup(
28
name = "all",
3-
srcs = glob(["**"], exclude = ["BUILD.bazel", "MODULE.bazel"], allow_empty = True),
9+
srcs = glob(["**"], exclude = ["BUILD.bazel", "MODULE.bazel"]),
10+
target_compatible_with = _INCOMPATIBLE,
411
visibility = ["//visibility:public"],
512
)
613

7-
exports_files(
8-
glob(["**"], exclude = ["BUILD.bazel", "MODULE.bazel"], allow_empty = True),
14+
filegroup(
15+
name = "Bundles2/_.index.bin",
16+
srcs = ["Bundles2/_.index.bin"],
17+
target_compatible_with = _INCOMPATIBLE,
18+
visibility = ["//visibility:public"],
19+
)
20+
21+
filegroup(
22+
name = "PathOfExile.exe",
23+
srcs = ["PathOfExile.exe"],
24+
target_compatible_with = _INCOMPATIBLE,
925
visibility = ["//visibility:public"],
1026
)

third_party/empty_gamedata/Bundles2/_.index.bin

Whitespace-only changes.

third_party/empty_gamedata/MODULE.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ module(
22
name = "gamedata",
33
version = "0",
44
)
5+
6+
bazel_dep(name = "platforms", version = "1.0.0")

third_party/empty_gamedata/PathOfExile.exe

Whitespace-only changes.

0 commit comments

Comments
 (0)