diff --git a/.bazelrc b/.bazelrc index 966b2e52ab..dc05291620 100644 --- a/.bazelrc +++ b/.bazelrc @@ -35,35 +35,28 @@ build:build_cpp --test_tag_filters=+allwpilib-build-cpp --build_tag_filters=+all build:no_example --test_tag_filters=-wpi-example --build_tag_filters=-wpi-example test:no_example --test_tag_filters=-wpi-example --build_tag_filters=-wpi-example -# Artifactory Cache Setup -build:base_remote --remote_timeout=3600 - -# Additional suggestions from buildbuddy for speed -build:base_remote --experimental_remote_cache_compression -build:base_remote --experimental_remote_cache_compression_threshold=100 -build:base_remote --noslim_profile -build:base_remote --experimental_profile_include_target_label -build:base_remote --experimental_profile_include_primary_output -build:base_remote --nolegacy_important_outputs - -common:base_remote_readonly --noremote_upload_local_results -build:artifactory_readonly --config=base_remote_readonly -build:artifactory_readonly --remote_cache=https://frcmaven.wpi.edu/artifactory/wpilib-generic-cache-bazel-local -# workaround for https://github.com/bazelbuild/bazel/issues/17700 -build:artifactory_readonly --remote_cache_header=X-JFrog-Download-Redirect-To=None - # 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 --config=base_remote +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 + +common:build_buddy_readonly --noremote_upload_local_results # This config should be used locally. It downloads more than the CI version -build:remote_user --config=base_remote -build:remote_user --config=artifactory_readonly +build:remote_user --config=build_buddy +build:remote_user --config=build_buddy_readonly build:remote_user --remote_download_toplevel -build:ci --config=base_remote +build:ci --config=build_buddy build:ci --remote_download_minimal build --build_metadata=REPO_URL=https://github.com/wpilibsuite/allwpilib.git diff --git a/.github/actions/setup-artifactory-bazel/action.yml b/.github/actions/setup-artifactory-bazel/action.yml deleted file mode 100644 index f2be1fb149..0000000000 --- a/.github/actions/setup-artifactory-bazel/action.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: "Setup Artifactory Bazel caching" -description: "Sets up the Artifactory Bazel cache to be readonly / writing based on the presence of environment variables" - -inputs: - username: - description: "Artifactory API username" - token: - description: "Artifactory 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=artifactory_readonly" > bazel_auth.rc - - - name: Set with key - env: - API_KEY: ${{ inputs.token }} - if: ${{ env.API_KEY != '' }} - shell: bash - run: | - echo "API Key detected!" - # X-JFrog-Download-Redirect-To is a workaround for https://github.com/bazelbuild/bazel/issues/17700 - echo "build:base_remote --remote_cache=https://${{ inputs.username }}:${{ inputs.token }}@frcmaven.wpi.edu/artifactory/wpilib-generic-cache-bazel-local --remote_cache_header=X-JFrog-Download-Redirect-To=None" > bazel_auth.rc diff --git a/.github/actions/setup-build-buddy/action.yml b/.github/actions/setup-build-buddy/action.yml new file mode 100644 index 0000000000..423398a053 --- /dev/null +++ b/.github/actions/setup-build-buddy/action.yml @@ -0,0 +1,27 @@ +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" > bazel_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 }}" > bazel_auth.rc diff --git a/.github/workflows/aql/wpilib-generic-gradle-cache_unused.aql b/.github/workflows/aql/wpilib-generic-gradle-cache_unused.aql index 21cc781aef..242fcaf693 100644 --- a/.github/workflows/aql/wpilib-generic-gradle-cache_unused.aql +++ b/.github/workflows/aql/wpilib-generic-gradle-cache_unused.aql @@ -5,8 +5,7 @@ "items.find": { "$or":[ { "repo": "wpilib-generic-gradlecache" }, - { "repo": "wpilib-generic-cache-cmake" }, - { "repo": "wpilib-generic-cache-bazel" } + { "repo": "wpilib-generic-cache-cmake" } ], "$or":[ { diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 768000f54d..9bbd3e97f8 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -26,11 +26,10 @@ jobs: java-version: 17 architecture: x64 - - name: Setup Artifactory - uses: ./.github/actions/setup-artifactory-bazel + - id: Setup_build_buddy + uses: ./.github/actions/setup-build-buddy with: - username: ${{ secrets.ARTIFACTORY_USERNAME }} - token: ${{ secrets.ARTIFACTORY_PASSWORD }} + token: ${{ secrets.BUILDBUDDY_API_KEY }} - name: bazel ${{ matrix.action }} run: bazel --output_user_root=C:\\bazelroot ${{ matrix.action }} -k ... --config=ci ${{ matrix.config }} --verbose_failures @@ -43,11 +42,10 @@ jobs: - uses: actions/checkout@v4 with: { fetch-depth: 0 } - - name: Setup Artifactory - uses: ./.github/actions/setup-artifactory-bazel + - id: Setup_build_buddy + uses: ./.github/actions/setup-build-buddy with: - username: ${{ secrets.ARTIFACTORY_USERNAME }} - token: ${{ secrets.ARTIFACTORY_PASSWORD }} + token: ${{ secrets.BUILDBUDDY_API_KEY }} - name: bazel test (release) run: bazel test -k ... --config=ci -c opt --config=macos --nojava_header_compilation --verbose_failures @@ -66,12 +64,12 @@ jobs: steps: - uses: actions/checkout@v4 with: { fetch-depth: 0 } + - uses: bazelbuild/setup-bazelisk@v3 - - name: Setup Artifactory - uses: ./.github/actions/setup-artifactory-bazel + - id: Setup_build_buddy + uses: ./.github/actions/setup-build-buddy with: - username: ${{ secrets.ARTIFACTORY_USERNAME }} - token: ${{ secrets.ARTIFACTORY_PASSWORD }} + token: ${{ secrets.BUILDBUDDY_API_KEY }} - name: bazel ${{ matrix.action }} (release) run: bazel ${{ matrix.action }} ... --config=ci -c opt ${{ matrix.config }} -k --verbose_failures diff --git a/upstream_utils/apriltag.py b/upstream_utils/apriltag.py index 1c3d643848..05ca40655e 100755 --- a/upstream_utils/apriltag.py +++ b/upstream_utils/apriltag.py @@ -69,6 +69,7 @@ def copy_upstream_src(wpilib_root: Path): def main(): name = "apriltag" url = "https://github.com/AprilRobotics/apriltag.git" + # master on 2024-07-07 tag = "3806edf38ac4400153677e510c9f9dcb81f472c8" patch_options = { diff --git a/upstream_utils/gl3w.py b/upstream_utils/gl3w.py index 9b9065877a..49691c21f5 100755 --- a/upstream_utils/gl3w.py +++ b/upstream_utils/gl3w.py @@ -17,6 +17,7 @@ def copy_upstream_src(wpilib_root: Path): def main(): name = "gl3w" url = "https://github.com/skaslev/gl3w" + # master on 2022-03-24 tag = "5f8d7fd191ba22ff2b60c1106d7135bb9a335533" gl3w = Lib(name, url, tag, copy_upstream_src) diff --git a/upstream_utils/glfw.py b/upstream_utils/glfw.py index 30cba25bf8..ddd65c0df4 100755 --- a/upstream_utils/glfw.py +++ b/upstream_utils/glfw.py @@ -56,6 +56,7 @@ def copy_upstream_src(wpilib_root: Path): def main(): name = "glfw" url = "https://github.com/glfw/glfw.git" + # master on 2022-08-22 tag = "6b57e08bb0078c9834889eab871bac2368198c15" glfw = Lib(name, url, tag, copy_upstream_src) diff --git a/upstream_utils/imgui.py b/upstream_utils/imgui.py index 0fd28ef8b7..d93f8e414d 100755 --- a/upstream_utils/imgui.py +++ b/upstream_utils/imgui.py @@ -57,6 +57,7 @@ def copy_upstream_src(wpilib_root: Path): def main(): name = "imgui" url = "https://github.com/ocornut/imgui.git" + # docking on 2023-09-18 tag = "64b1e448d20c9be9275af731c34b4c7bf14a8e95" imgui = Lib(name, url, tag, copy_upstream_src) diff --git a/upstream_utils/implot.py b/upstream_utils/implot.py index c43d3dfef5..db270119d2 100755 --- a/upstream_utils/implot.py +++ b/upstream_utils/implot.py @@ -28,6 +28,7 @@ def copy_upstream_src(wpilib_root: Path): def main(): name = "implot" url = "https://github.com/epezent/implot.git" + # master on 2023-08-19 tag = "18c72431f8265e2b0b5378a3a73d8a883b2175ff" implot = Lib(name, url, tag, copy_upstream_src) diff --git a/upstream_utils/libdogleg.py b/upstream_utils/libdogleg.py index 590df443fa..6102d380fd 100755 --- a/upstream_utils/libdogleg.py +++ b/upstream_utils/libdogleg.py @@ -48,6 +48,7 @@ def copy_upstream_src(wpilib_root: Path): def main(): name = "libdogleg" url = "https://github.com/dkogan/libdogleg" + # master on 2024-06-22 tag = "c971ea43088d286a3683c1039b9a85f761f7df15" libdogleg = Lib(name, url, tag, copy_upstream_src) diff --git a/upstream_utils/mrcal.py b/upstream_utils/mrcal.py index 4af10d908e..2d490cb8d2 100755 --- a/upstream_utils/mrcal.py +++ b/upstream_utils/mrcal.py @@ -55,6 +55,7 @@ def copy_upstream_src(wpilib_root: Path): def main(): name = "mrcal" url = "https://github.com/dkogan/mrcal" + # master on 2024-11-29 tag = "662a539d3cbba4948c31d06a780569173b3fb6e6" mrcal = Lib(name, url, tag, copy_upstream_src) diff --git a/upstream_utils/mrcal_java.py b/upstream_utils/mrcal_java.py index 489df1f78c..11f3e120e9 100755 --- a/upstream_utils/mrcal_java.py +++ b/upstream_utils/mrcal_java.py @@ -62,6 +62,7 @@ def copy_upstream_src(wpilib_root: Path): def main(): name = "mrcal_java" url = "https://github.com/PhotonVision/mrcal-java" + # main on 2024-11-30 tag = "5f9d3168ccf1ecdfca48da13ea07fffa47f95d00" mrcal_java = Lib(name, url, tag, copy_upstream_src) diff --git a/upstream_utils/stb.py b/upstream_utils/stb.py index 3dee40e5cd..69b14ba725 100755 --- a/upstream_utils/stb.py +++ b/upstream_utils/stb.py @@ -39,6 +39,7 @@ def copy_upstream_src(wpilib_root: Path): def main(): name = "stb" url = "https://github.com/nothings/stb.git" + # master on 2021-04-01 tag = "c9064e317699d2e495f36ba4f9ac037e88ee371a" stb = Lib(name, url, tag, copy_upstream_src)