69 Commits
Author SHA1 Message Date
adminandGitHub 6ae78186e2 Rebuild inputs lost from remote cache (#8765) 2026-07-23 22:17:36 -07:00
adminandGitHub 095a29a4a0 Centralize Shardok C++ standard settings (#8197) 2026-06-26 07:28:26 -07:00
adminandGitHub 9ac167e66c Add Shardok sanitizer CI (#8136) 2026-06-24 10:31:07 -07:00
adminandGitHub 0dd7d75878 Improve Shardok C++ safety checks (#7345) 2026-06-19 22:11:02 -07:00
adminandGitHub af1057e7b0 Remove Bazel native C++ autoload shim (#7152) 2026-06-12 08:59:56 -07:00
adminandGitHub a319460f01 Prefer prebuilt protoc toolchain (#7153) 2026-06-12 08:50:44 -07:00
adminandGitHub 3bd3965372 Narrow Bazel autoload compatibility shim (#7121) 2026-06-11 21:47:10 -07:00
adminandGitHub c39a20636c Update protobuf to 35.1 (#7119) 2026-06-11 20:57:32 -07:00
adminandGitHub 815ab5ff0b Remove redundant proto toolchain flag (#7092) 2026-06-11 15:08:51 -07:00
adminandGitHub 0177030c42 Remove redundant bzlmod flag (#7094) 2026-06-11 14:10:06 -07:00
adminandGitHub e7cad6a498 Remove redundant sandbox reuse flag (#7091) 2026-06-11 13:08:38 -07:00
adminandGitHub 0f03b77de4 Remove stale grpc module map workaround (#7083) 2026-06-11 12:24:24 -07:00
adminandGitHub 1f73167221 Trim Bazel 9 compatibility flags (#7075) 2026-06-11 09:40:07 -07:00
adminandGitHub 4f92065e0f Upgrade Bazel to 9.1.1 (#7071) 2026-06-11 07:57:51 -07:00
adminandGitHub 71f0f47da2 Clean up C++ test warnings (#7065)
* Clean up C++ test warnings

* Keep player setup expected map size readable

* Declare direct Bazel module dependencies (#7069)

* Check Shardok map proto parse results

* Prepare Apple and protobuf module resolution

* Declare direct Bazel module dependencies
2026-06-11 07:39:57 -07:00
adminandGitHub 2c5512cd4a Scope Xcode Bazel env to Apple tools (#7068) 2026-06-11 07:26:38 -07:00
adminandGitHub 2536e43e56 Apply Xcode sync to all macOS Bazel builds (#6807) 2026-05-29 18:10:24 -07:00
adminandGitHub 758ae6d44f Ensure Bazel is available in self-hosted workflows (#6785)
* Ensure Bazel is available in self-hosted workflows

* Allow Bazel CI to use Command Line Tools

* Set macOS C++ deployment target for Bazel

* Use Bazel macOS minimum OS flags

* Raise macOS Bazel deployment target for filesystem

* Ensure git-lfs is available for CI fetches

* Authenticate CI LFS fetches with workflow token

* Disable stale LFS hooks during CI checkout

* Disable LFS filters during CI checkout

* Prepare Git LFS before persistent checkout

* Harden generated Bazel rc and LFS auth

* Let Xcode sync skip without full Xcode

* Harden Unity build cache markers

* Require full Xcode for mactools sync
2026-05-29 07:52:17 -07:00
adminandGitHub 39b8c3360e Tidy Bazel rc marker and Mac deploy runner label (#6782) 2026-05-28 20:05:11 -07:00
79c5be3a54 Decouple non-Mac builds from Xcode dependency (#6316)
* Decouple non-Mac builds from Xcode via BAZEL_NO_APPLE_CPP_TOOLCHAIN

Set BAZEL_NO_APPLE_CPP_TOOLCHAIN=1 in .bazelrc so apple_support skips
Xcode detection (xcode-locator) entirely for Scala/C++/Go builds.
Only mactools builds (Mac/Sparkle) re-enable the Apple CC toolchain.

This means Xcode version changes no longer affect Eagle, Shardok, test,
auth, docker, or Unity Windows builds — no expunge, no cache invalidation,
no rebuild. The sync script and its expunge/cache-key logic are now scoped
to mactools only and removed from all non-Mac CI workflows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert BAZEL_NO_APPLE_CPP_TOOLCHAIN; keep Apple CC with stable environ

BAZEL_NO_APPLE_CPP_TOOLCHAIN=1 broke builds because apple_support
registers platforms (e.g. macos_x86_64) that require Apple CC toolchains
for resolution — even in non-Mac builds.

Instead, keep Apple CC enabled but ensure its repo rule never
re-evaluates on non-Mac builds by keeping DEVELOPER_DIR pinned in
common:macos. The sync script only runs for mactools builds and
overrides DEVELOPER_DIR there.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 16:08:28 -08:00
97bf29d4a2 Fix Bazel Xcode version caching in CI (#6309)
* Fix Bazel Xcode version caching causing CI build failures

When Xcode updates on self-hosted runners, Bazel's cached
local_config_xcode still references the old version, causing
"xcode-locator <old_version> failed" errors.

Add sync_bazel_xcode.sh which detects Xcode version changes
and runs `bazel sync --configure` to refresh the config without
nuking the build cache. Added to all 8 CI workflows that use Bazel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use rm of cached repo instead of bazel sync --configure

bazel sync --configure requires WORKSPACE mode and fails with
bzlmod. Instead, delete the stale local_config_xcode from the
output base directly — the next bazel build regenerates it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use bazel clean --expunge instead of targeted repo deletion

Deleting just local_config_xcode is insufficient — the stale Xcode
version is also embedded in cached actions and other toolchain repos.
The only reliable fix is a full expunge. Since Xcode updates are
infrequent, the one-time rebuild cost is acceptable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use action_env to bake Xcode version into cache keys

Instead of expunging the cache (which doesn't help with the remote
cache anyway), write the Xcode build version to .bazelrc.xcode via
--action_env. This makes the version part of every action's cache
key, so stale entries in both local and remote caches are naturally
ignored after an Xcode update — no deletion needed anywhere.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add expunge back alongside action_env for belt-and-suspenders fix

action_env alone isn't enough — local_config_xcode is a cached
repository rule that bakes in the old Xcode version before any
actions run. Need expunge to clear the local toolchain config,
plus action_env to prevent stale remote cache hits afterward.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add Xcode sync to mac_build build-and-sign job

The sync step was only in the deploy job, but build-and-sign calls
bazel via build_protos.sh before that. This runs on the unity-mac
runner which also has the stale Xcode cache.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 12:43:14 -08:00
2a3ad4cad4 Use pre-built protoc binary instead of compiling from source (#6129)
Enable --incompatible_enable_proto_toolchain_resolution and
--prefer_prebuilt_protoc so Bazel downloads a pre-built protoc
binary from official protobuf releases rather than compiling it.
Protoc plugins and the runtime library still build from source.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 16:26:22 -08:00
adminandGitHub 88781d779b Revert "Add persistent Bazel server keepalive for CI runners (#6096)" (#6118)
This reverts commit cccbbb9d37.
2026-02-17 21:23:36 -08:00
cccbbb9d37 Add persistent Bazel server keepalive for CI runners (#6096)
GitHub Actions kills orphan processes after each job, which kills
the Bazel server and forces a cold reload of the skyframe graph on
every CI run (~15-20s for loading+analysis of 1080 packages / 78k
targets). With a warm server this drops to ~2-3s.

Changes:
- .bazelrc: Set startup --max_idle_secs=0 to prevent idle shutdown
- ci/runners/bazel-keepalive.sh: Pings the Bazel server to keep it alive
- ci/runners/install-bazel-keepalive.sh: One-time setup script that
  installs a macOS launchd agent to run the keepalive every 5 minutes

The launchd agent owns the Bazel server process, so GitHub Actions'
orphan cleanup won't kill it. To set up on a new runner:

  ./ci/runners/install-bazel-keepalive.sh /path/to/actions-runner/_work/eagle0/eagle0

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 07:19:46 -08:00
c71a73dc12 Remove global --stamp to fix remote cache sharing across CI workflows (#6050)
The global `common --stamp` in .bazelrc caused every action's cache key
to include workspace status data, preventing cache reuse between the
bazel_test, eagle_build, and shardok_build workflows. Only three Go
binary targets actually use stamped x_defs values (admin_server,
authservice, installer), so --stamp is now passed only in the CI
workflow commands that build those targets.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 17:11:32 -08:00
adminandGitHub a50bfe36b0 Switch compile-time JDK from 21 to 25 (#5889) 2026-02-05 17:33:13 -08:00
a7b7b0e444 Upgrade Scala 3.7.4, rules_scala 7.1.5, protobuf 33.0, grpc 1.76.0, Bazel 7.7.1 (#5871)
* Upgrade rules_scala 7.1.5, Scala 3.7.4, protobuf 32.1

- Update rules_scala from 7.1.1 to 7.1.5
- Update Scala from 3.7.2 to 3.7.4
- Update protobuf from 29.2 to 32.1 (required by rules_scala 7.1.5+)
- Add force_version for Maven dependency conflicts (gson, errorprone, guava)
- Update -Wconf pattern in tools/BUILD.bazel for Bazel 7/8 compatibility
- Add -Wno-deprecated-copy-with-dtor to suppress protobuf 32.x warning

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add grpc 1.76.0, protobuf 33.0, and Bazel 7.7.1 compatibility fixes

- Upgrade grpc from 1.71.0 to 1.76.0.bcr.1 (required for protobuf 33.0)
- Upgrade protobuf from 32.1 to 33.0 (matches grpc 1.76.0 expectations)
- Upgrade Bazel from 7.6.1 to 7.7.1
- Add single_version_override for rules_swift 3.1.2 (grpc needs 3.x, rules_apple needs 2.x)
- Add --features=-module_maps workaround for grpc cf_event_engine macOS build issue

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:01:15 -08:00
aad241ed77 Upgrade Java build toolchain from 17 to 21 (#5866)
Updates .bazelrc to use Java 21 for compilation.

Requires PR #5865 (URL deprecation fix) to be merged first, otherwise
the build will have deprecation warnings from the old URL constructor.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:57:08 -08:00
ddea05514c Add action JSON and build info to admin server (#4927)
- Add action_json, faction_name, and game_date fields to GameHistoryEntry proto
- Serialize ActionResult to JSON in EagleServiceImpl.getGameHistory()
- Display faction name and date columns in history table
- Show full JSON inline when clicking action rows (no separate AJAX call)
- Add build timestamp and git commit to admin header on all pages
- Create workspace_status.sh for Bazel build stamping
- Enable --stamp in .bazelrc

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 07:18:45 -08:00
b7ff76a38e Fix sysroot .so plugins and registry auth (#4784)
* Fix sysroot .so plugins and registry auth

- Exclude GCC plugin .so files from sysroot (Bazel can't handle them)
- Only copy GCC headers and static libs needed for cross-compilation
- Add tarball structure verification to build script
- Fix DO registry auth by setting DOCKER_CONFIG env var for Bazel

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add triple symlinks to sysroot for clang compatibility

Clang uses --target=x86_64-unknown-linux-gnu but Ubuntu's GCC uses
x86_64-linux-gnu (without "unknown"). This caused clang to fail to detect
the GCC installation and couldn't find C++ standard library headers.

Add symlinks in the sysroot:
- /usr/lib/gcc/x86_64-unknown-linux-gnu -> x86_64-linux-gnu
- /lib/x86_64-unknown-linux-gnu -> x86_64-linux-gnu
- /include/x86_64-unknown-linux-gnu -> x86_64-linux-gnu

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix sysroot tarball structure for toolchains_llvm

The tarball was wrapping contents in sysroot/ which caused double nesting
when extracted by the sysroot() repo rule. Changed to tar from inside the
sysroot directory so usr/, lib/, etc. are at the root of the archive.

Before: sysroot/usr/...
After: ./usr/... (or usr/...)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add libgcc_s.so symlink to sysroot

The linker looks for libgcc_s.so but Ubuntu only provides libgcc_s.so.1.
Added a symlink to make -lgcc_s work.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix sysroot for cross-compilation

1. Add ld-linux-x86-64.so.2 symlink in lib/ since libc.so linker script
   references /lib64/ld-linux-x86-64.so.2 as an absolute path

2. Change linkopt to host_linkopt in .bazelrc to avoid passing macOS-specific
   linker flags (-no_warn_duplicate_libraries) to Linux cross-compilation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update sysroot to v3.4 with all required symlinks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add missing includes for cross-compilation portability

These files relied on platform-specific transitive includes that work on
macOS but not on Linux. Added explicit includes for:
- <cstdint> for uint8_t, uint64_t
- <stdexcept> for std::out_of_range
- <cinttypes> for PRIu64 portable format specifier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 13:02:35 -08:00
5d6c2fef90 Fix Xcode version caching in bazel builds (#4678)
Add DEVELOPER_DIR repo_env to .bazelrc so bazel always uses the current
Xcode installation rather than caching the version. This avoids the need
for `bazel clean --expunge` after Xcode updates.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-17 15:07:24 -08:00
adminandGitHub 1b1d290ead Fix code highlighting for C++23 (#4475)
* upgrade bazelrc to c++23

* fix c++23 code highlighting issues
2025-10-16 09:25:46 -07:00
adminandGitHub 678a3a1fbe Build with Scala 3 (#4363)
* getting there

* moar

* progress

* a few more dependency fixes

* a bit more is passing

* weird staging thing

* more fixes

* fix another

* fix another

* more fixes

* BattalionC constructor

* moar

* moar

* more

* try a regex, gulp

* fix a bunch

* another exception

* some more tests

* province converter

* fixed a few more

* this is actually making progress

* another dep

* more deps

* more deps

* more

* so slooow

* a few more

* remove an asInstanceOf

* moar

* server builds maybe

* different reflection

* hmm

* get exceptions

* missing deps

* a few more fixes

* moar tests

* a few more

* Moar test fixes

* almost there

* just reflection issues now

* Fix Scala 3 compatibility issues in UnrequestedTextHandlerTest

- Fix ScalaTest import for Scala 3 compatibility: use shouldBe and the from Matchers
- Resolve build error that was preventing all tests from passing

All 200 tests now pass successfully with Scala 3.

* remove reflectiveSelectable

* remove staging dependency

* upgrade migration doc
2025-08-29 08:42:56 -07:00
adminandGitHub 9619cbfde2 avoid separate flag for test (#3553) 2024-07-08 16:43:01 -07:00
adminandGitHub 0ccb7b11ec try adding local_test_jobs (#3367) 2024-05-22 06:34:40 -07:00
adminandGitHub 912a1d3736 add apple_support and give an opt-out to toolchains_llvm (#3258)
* add apple_support and give an opt-out to toolchains_llvm

* don't revert toolchains_llvm
2024-03-19 06:46:21 -07:00
adminandGitHub eb3524bfcc suppress xlint option warnings for now (#3205) 2024-02-13 19:43:36 -08:00
adminandGitHub b7f3e87192 Ubuntu build (#3170)
* Create bazel_test.yml

* only use no-warn-duplicate-libraries on macos

* use the remote cache

* requires https

* bazel 6.5.0 and add rules_java

* with lockfile

* no yaml yet

* revert the module changes
2024-01-24 08:24:14 -08:00
adminandGitHub 4bb02a9866 Upgrade to bazel 7 with a fork of llvm-toolchain (#3169)
* bailing

* more experiments

* add a comment and get rid of unnecessary bazelrc lines
2024-01-24 07:18:46 -08:00
adminandGitHub bbd62a09b3 experimental sandbox directories (#2984) 2023-10-14 15:39:58 -07:00
adminandGitHub 24fa7af8e4 suppress the duplicate library warnings (#2979) 2023-10-11 21:30:29 -07:00
adminandGitHub b3c99caa56 Revert "link all the test libraries statically" (#2975)
* Revert "Make the test libraries static (#2968)"

This reverts commit 0042c39f13e5c01760d3d0e1a067cbe788d50a7e.

* add support for dynamic linker
2023-10-06 19:46:08 -07:00
adminandGitHub 3c6e4c4770 cleanup (#2967) 2023-10-05 07:52:49 -07:00
adminandGitHub ee1cc8484e Use grailbio/bazel-tools (#2965)
* use my fork of llvm toolchain, currently failing on libunwind

* update bazelrc

* it builds
2023-10-03 21:42:18 -07:00
adminandGitHub ea8c4a9082 enable bzlmod (#2966) 2023-10-03 17:08:49 -07:00
adminandGitHub 1dc90e95be Build and run with Java 17 (#2959)
* try building and running against java17

* missed a digit
2023-09-22 06:38:15 -07:00
adminandGitHub ddd6dbd875 add host_cxxopt for future absl builds (#2956) 2023-09-19 21:51:04 -07:00
adminandGitHub 676f14e6fe raise jobs to 64 (#2709) 2023-06-08 19:04:41 -07:00
adminandGitHub ee292bbbee Bazel 5.1 (#2124)
* upgrade to bazel 5.1.1

* upgrade grpc to 1.49.1

* put std=c++20 into bazelrc, but move Werror into COPTS

* don't upgrade scala yet


Former-commit-id: afcd3fb717b68c7c03b249079f4e9af44a9ff519
2022-10-02 10:42:49 -07:00
adminandGitHub f505747d37 increase test jobs (#1741)
* increase test jobs

* another


Former-commit-id: 39afab281741d33bd11a5916f8c435fcc2fc58e9
2022-06-14 22:16:21 -07:00