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

Prep for ownership transfer #8

Merged
merged 10 commits into from
Sep 25, 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
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.1.1
7.3.1
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# Generated files
MODULE.bazel.lock linguist-generated
maven_cpp_deps.bzl linguist-generated
maven_java_deps.bzl linguist-generated
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.

42 changes: 29 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,24 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
architecture: ${{ matrix.java_arch }}
- run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --config=remote @rules_bzlmodrio_jdk//...
- 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_jdk//...
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 All @@ -62,18 +66,22 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
- uses: actions/setup-java@v4
with:
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 All @@ -94,18 +102,22 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
- uses: actions/setup-java@v4
with:
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 @@ -127,16 +139,20 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
- uses: actions/setup-java@v4
with:
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
7 changes: 4 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: |
git branch -f main origin/main
if: github.ref != 'refs/heads/main'
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
- name: Install clang-format
run: |
Expand All @@ -38,9 +38,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.20.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.20.x
cache: false
id: go

- uses: actions/checkout@v4
Expand All @@ -60,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
Loading