Skip to content
Open
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
22 changes: 1 addition & 21 deletions .bazelci/cache_test.sh
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
#!/bin/bash
# Copyright 2022-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is a CI integation test for a typical eployment of buildfarm.
# It ensures that the buildfarm services can startup and function as expected given PR changes.
# All of the needed buildfarm services are initialized (redis, server, worker).
# We ensure that the system can build a set of bazel targets.

# Run redis container
docker run --rm -d --name buildfarm-redis --network host redis:7.2.4 --bind localhost
docker run -d --name buildfarm-redis --network host redis:7.2.4 --bind localhost

# Build a container for buildfarm services
cp `which bazel` bazel
docker build -t buildfarm .

#Start the servies and do a test build
docker run \
--rm \
-v /tmp:/tmp \
--network host \
--env CACHE_TEST=$CACHE_TEST \
Expand All @@ -37,8 +22,3 @@ docker run \
--env TEST_ARG2=$TEST_ARG2 \
--env SHA1_TOOLS_REMOTE=$SHA1_TOOLS_REMOTE \
buildfarm buildfarm/.bazelci/test_buildfarm_container.sh
status=$?

docker stop buildfarm-redis

exit $status
14 changes: 0 additions & 14 deletions .bazelci/docker_unit_test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2021-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is to run buildfarm's unit tests from within a docker container

# Build a container for unit tests and run them
Expand Down
14 changes: 0 additions & 14 deletions .bazelci/format.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash
# Copyright 2020-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Run from the root of repository.
# This script will format all of the java source files.
# Use the flag --check if you want the script to fail when formatting is not correct.
Expand Down
2 changes: 1 addition & 1 deletion .bazelci/ingest_grpc_logs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/python2
import json
import time
import sys
Expand Down
14 changes: 0 additions & 14 deletions .bazelci/integration_test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2021-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is a CI integation test for a typical deployment of buildfarm.
# It ensures that the buildfarm services can startup and function as expected given PR changes.
# All of the needed buildfarm services are initialized (redis, server, worker).
Expand Down
14 changes: 0 additions & 14 deletions .bazelci/package_name_check.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2021-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Run this from the root of repository.
# The script will check that each java source file has the a package name that matches its file path.
# This is done for more than just consistency. Bazel's code coverage seems to exclude files when the package name does not match.
Expand Down
28 changes: 9 additions & 19 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ tasks:
# Linting jobs
format_check:
name: Code Format
platform: ubuntu2404
platform: ubuntu2204
shell_commands:
- ./.bazelci/format.sh --check
package_layout:
name: Package Layout
platform: ubuntu2404
platform: ubuntu2204
shell_commands:
- ./.bazelci/package_name_check.sh
java_unused_deps_check:
name: Java Unused Dependencies
platform: ubuntu2404
platform: ubuntu2204
shell_commands:
- ./.bazelci/unused_deps.sh --check
static_analysis_check:
name: Static Analysis
platform: ubuntu2404
platform: ubuntu2204
shell_commands:
- ./.bazelci/static_analyze.sh
checkstyle:
name: Check Style
platform: ubuntu2404
platform: ubuntu2204
shell_commands:
- ./.bazelci/run_checkstyle.sh
code_coverage:
Expand All @@ -42,16 +42,6 @@ tasks:
- ./generate_coverage.sh

# Typical unit tests that run across a variety of operating systems.
ubuntu2404:
name: Unit Tests
build_targets:
- '...'
build_flags:
- --build_tag_filters=-container
test_flags:
- --test_tag_filters=-integration,-redis
test_targets:
- '...'
ubuntu2204:
name: Unit Tests
build_targets:
Expand Down Expand Up @@ -96,7 +86,7 @@ tasks:
- '...'
rpm_builds:
name: Rpm Builds
platform: rockylinux8
platform: centos7_java11_devtoolset10
shell_commands:
- bazel build //src/main/java/build/buildfarm/rpms/server:buildfarm-server-rpm //src/main/java/build/buildfarm/rpms/worker:buildfarm-worker-rpm

Expand Down Expand Up @@ -170,9 +160,9 @@ tasks:
- export CACHE_TEST=true
- export RUN_TEST=./.bazelci/run_generative_cc_many_double_test.sh
- export BUILDFARM_CONFIG="/buildfarm/examples/config.minimal.yml"
- export TEST_ARG1=--remote_grpc_log='./grpc.log'
- export TEST_ARG2=--remote_grpc_log='./grpc2.log'
- export SHA1_TOOLS_REMOTE=8abbff48ada653a42dfef977e6ba91d31e900fd5
- export TEST_ARG1=--experimental_remote_grpc_log='./grpc.log'
- export TEST_ARG2=--experimental_remote_grpc_log='./grpc2.log'
- export SHA1_TOOLS_REMOTE=eeddeff416118c86856fd76c95733307256dc855
- export EXECUTION_STAGE_WIDTH=5
- ./.bazelci/cache_test.sh

Expand Down
14 changes: 0 additions & 14 deletions .bazelci/redis_unit_tests.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2022-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Typically our redis implementations are mocked.
# However this runs unit tests that interact directly with redis.

Expand Down
14 changes: 0 additions & 14 deletions .bazelci/run_abseil_test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2021-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Test bazel targets with buildfarm
cd src/test/abseil;
../../../bazel test --jobs=25 $1 --noenable_bzlmod --test_output=errors --incompatible_enable_cc_toolchain_resolution --verbose_failures --verbose_explanations --test_tag_filters=-benchmark --remote_executor=grpc://localhost:8980 @com_google_absl//... -- -@com_google_absl//absl/time/...
14 changes: 0 additions & 14 deletions .bazelci/run_checkstyle.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2023-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Run from the root of repository.
# This script will perform static analysis on all of the java source files.

Expand Down
14 changes: 0 additions & 14 deletions .bazelci/run_generative_cc_many_double_test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2022-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Build bazel targets with buildfarm
cd src/test/many;
MANY_CC_BINARIES=50 MANY_CC_LIBRARIES=2 MANY_CC_LIBRARY_SOURCES=1 ../../../bazel build :cc --remote_executor=grpc://localhost:8980 $1
Expand Down
14 changes: 0 additions & 14 deletions .bazelci/run_generative_cc_many_test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2021-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o xtrace

# Build bazel targets with buildfarm
Expand Down
13 changes: 0 additions & 13 deletions .bazelci/run_server_test.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
#!/bin/bash
# Copyright 2022-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Start redis container
docker run -d --rm --name buildfarm-redis --network host redis:7.2.4 --bind localhost
Expand Down
14 changes: 0 additions & 14 deletions .bazelci/static_analyze.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2021-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Run from the root of repository.
# This script will perform static analysis on all of the java source files.

Expand Down
14 changes: 0 additions & 14 deletions .bazelci/test_buildfarm_container.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2021-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e
set -o pipefail

Expand Down
14 changes: 0 additions & 14 deletions .bazelci/unused_deps.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
# Copyright 2021-2025 The Buildfarm Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Run from the root of repository.
# This script will remove any unused java dependencies
# Use the flag --check if you want the script to fail when the dependencies not correct.
Expand Down
12 changes: 4 additions & 8 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ test --nojava_header_compilation
test --enable_runfiles
test --test_tag_filters=-redis,-integration

# Ensure buildfarm is compatible with future versions of bazel.
# https://buildkite.com/bazel/bazelisk-plus-incompatible-flags
common --incompatible_disallow_empty_glob

# Stop recompiling protoc.
# https://fzakaria.com/2024/10/23/bazel-knowledge-mind-your-path.html
build --incompatible_strict_action_env
Expand All @@ -33,11 +37,3 @@ common --lockfile_mode=off
build:linux --sandbox_add_mount_pair=/tmp
build:macos --sandbox_add_mount_pair=/var/tmp
build:windows --sandbox_add_mount_pair=C:\Temp

# Protobuf will be dropping support for MSVC + Bazel in 34.0.
# To continue using it until then, use the flag --define=protobuf_allow_msvc=true.
# For feedback or discussion, see github.com/protocolbuffers/protobuf/issues/20085.
build:windows --define=protobuf_allow_msvc=true

# Planned to be default in Bazel 9; see https://github.com/bazelbuild/bazel/issues/22080
common --incompatible_disable_native_repo_rules
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.4.1
8.2.1
Loading