Skip to content

Commit

Permalink
Prep for ownership transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreiniger committed Sep 23, 2024
1 parent 42ccdab commit 90f986f
Show file tree
Hide file tree
Showing 26 changed files with 244 additions and 2,552 deletions.
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
try-import user.bazelrc
try-import .buildbuddy-auth.rc

import .bazelrc-cc
import .bazelrc-java
import .bazelrc-buildbuddy
Expand Down
31 changes: 24 additions & 7 deletions .bazelrc-buildbuddy
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
build:remote --bes_results_url=https://app.buildbuddy.io/invocation/
build:remote --bes_backend=grpcs://remote.buildbuddy.io
build:remote --remote_cache=grpcs://remote.buildbuddy.io
build:remote --remote_download_toplevel # Helps remove network bottleneck if caching is enabled
build:remote --remote_timeout=3600

build --experimental_inmemory_jdeps_files
build --experimental_inmemory_dotd_files

# Build Buddy Cache Setup
build:build_buddy --bes_results_url=https://app.buildbuddy.io/invocation/
build:build_buddy --bes_backend=grpcs://remote.buildbuddy.io
build:build_buddy --remote_cache=grpcs://remote.buildbuddy.io
build:build_buddy --remote_timeout=3600

# Additional suggestions from buildbuddy for speed
build:build_buddy --experimental_remote_cache_compression
build:build_buddy --experimental_remote_cache_compression_threshold=100
build:build_buddy --noslim_profile
build:build_buddy --experimental_profile_include_target_label
build:build_buddy --experimental_profile_include_primary_output
build:build_buddy --nolegacy_important_outputs

build:build_buddy_readonly --config=build_buddy
build:build_buddy_readonly --noremote_upload_local_results

# This config should be used locally. It downloads more than the CI version
build:remote_user --config=build_buddy
build:remote_user --config=build_buddy_readonly
build:remote_user --remote_download_toplevel

build:ci --config=build_buddy
build:ci --remote_download_minimal
build:ci --build_metadata=ROLE=CI
2 changes: 2 additions & 0 deletions .bazelrc-cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ build:windows --copt=/wd5105
build:windows --cxxopt=/wd4146
build:windows --cxxopt=/wd4267
build:windows --cxxopt=/wd4244
build:windows --cxxopt=/utf-8

# Windows Arm
build:windows_arm --copt=/W3
Expand All @@ -17,6 +18,7 @@ build:windows_arm --copt=/wd5105
build:windows_arm --cxxopt=/wd4146
build:windows_arm --cxxopt=/wd4267
build:windows_arm --cxxopt=/wd4244
build:windows_arm --cxxopt=/utf-8
build:windows_arm --cpu=arm64_windows

# Linux
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.0
7.3.1
29 changes: 29 additions & 0 deletions .github/actions/setup-build-buddy/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Setup BuildBuddy acache'
description: 'Sets up the build buddy cache to be readonly / writing based on the presence of environment variables'

inputs:
token:
description: 'Build Buddy API token'

runs:
using: "composite"
steps:
- name: Setup without key
env:
API_KEY: ${{ inputs.token }}
if: ${{ env.API_KEY == '' }}
shell: bash
run: |
echo "No API key secret detected, will setup readonly cache"
echo "build:ci --config=build_buddy_readonly" > .buildbuddy-auth.rc
echo "build:ci --config=build_buddy_readonly"" > tests/.buildbuddy-auth.rc
- name: Set with key
env:
API_KEY: ${{ inputs.token }}
if: ${{ env.API_KEY != '' }}
shell: bash
run: |
echo "API Key detected!"
echo "build:build_buddy --remote_header=x-buildbuddy-api-key=${{ env.API_KEY }}" > .buildbuddy-auth.rc
echo "build:build_buddy --remote_header=x-buildbuddy-api-key=${{ env.API_KEY }}" > tests/.buildbuddy-auth.rc
94 changes: 0 additions & 94 deletions .github/workflows/auto_update.yml

This file was deleted.

36 changes: 26 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ jobs:
distribution: 'zulu'
java-version: 17
architecture: ${{ matrix.java_arch }}
- run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --config=remote @rules_bzlmodrio_toolchains//...
- id: setup_build_buddy
uses: ./.github/actions/setup-build-buddy
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --config=ci @rules_bzlmodrio_toolchains//...
working-directory: tests
- name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around
run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --verbose_failures --config=remote //... || true
run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --verbose_failures --config=ci //... || true
working-directory: tests
- name: Build
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci
working-directory: tests


Expand Down Expand Up @@ -69,11 +73,15 @@ jobs:
distribution: 'zulu'
java-version: 17
architecture: ${{ matrix.java_arch }}
- id: setup_build_buddy
uses: ./.github/actions/setup-build-buddy
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
- name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote || true
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci || true
working-directory: tests
- name: Build
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci
working-directory: tests

build_bullseye32:
Expand Down Expand Up @@ -101,11 +109,15 @@ jobs:
distribution: 'zulu'
java-version: 17
architecture: ${{ matrix.java_arch }}
- id: setup_build_buddy
uses: ./.github/actions/setup-build-buddy
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
- name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote || true
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci || true
working-directory: tests
- name: Build
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci
working-directory: tests


Expand Down Expand Up @@ -134,11 +146,15 @@ jobs:
distribution: 'zulu'
java-version: 17
architecture: ${{ matrix.java_arch }}
- id: setup_build_buddy
uses: ./.github/actions/setup-build-buddy
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
- name: Build and allow failure # TODO Sometimes symlinks don't get created correctly the first time around
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote || true
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci || true
working-directory: tests
- name: Build
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci
working-directory: tests


Expand All @@ -161,5 +177,5 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=remote
- run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci
working-directory: tests
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: git diff HEAD > buildifier-fixes.patch
if: ${{ failure() }}

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: buildifier fixes
path: buildifier-fixes.patch
Expand Down
82 changes: 0 additions & 82 deletions .github/workflows/publish.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
bazel-*
*.pyc
user.bazelrc
.buildbuddy-auth.rc
.DS_Store
1 change: 0 additions & 1 deletion generate/.bazelversion

This file was deleted.

Loading

0 comments on commit 90f986f

Please sign in to comment.