From 1c83ed7749852b9a54ed3b6a210474c8b0ebd9ba Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Fri, 6 Dec 2024 19:42:12 -0500 Subject: [PATCH] Update to 2025 toolchains (#19) * Update to 2025 toolchains * Fixup build workflow --- .bazelrc | 10 ++ .bazelrc-cc | 10 ++ .clang-format | 5 + .github/workflows/build.yml | 83 ++++++++++++- .github/workflows/publish.yml | 33 +++++ MODULE.bazel | 18 ++- MODULE.bazel.lock | 8 +- WORKSPACE | 6 + constraints/is_bookworm32/BUILD.bazel | 30 +++++ constraints/is_bookworm64/BUILD.bazel | 30 +++++ maven_deps.bzl | 94 ++++++++++---- platforms/bookworm32/BUILD.bazel | 8 ++ platforms/bookworm64/BUILD.bazel | 8 ++ tests/.bazelrc | 10 ++ tests/.bazelrc-cc | 10 ++ tests/MODULE.bazel.lock | 171 +++++++++++++++++++------- tests/WORKSPACE | 10 +- toolchains/load_toolchains.bzl | 22 +++- 18 files changed, 480 insertions(+), 86 deletions(-) create mode 100644 .clang-format create mode 100644 .github/workflows/publish.yml create mode 100644 constraints/is_bookworm32/BUILD.bazel create mode 100644 constraints/is_bookworm64/BUILD.bazel create mode 100644 platforms/bookworm32/BUILD.bazel create mode 100644 platforms/bookworm64/BUILD.bazel diff --git a/.bazelrc b/.bazelrc index 5a940c3..0c34149 100644 --- a/.bazelrc +++ b/.bazelrc @@ -23,6 +23,16 @@ build:bullseye64 --platforms=@rules_bzlmodrio_toolchains//platforms/bullseye64 build:bullseye64 --build_tag_filters=-no-bullseye build:bullseye64 --platform_suffix=bullseye64 +# bookworm32 +build:bookworm32 --platforms=@rules_bzlmodrio_toolchains//platforms/bookworm32 +build:bookworm32 --build_tag_filters=-no-bullseye +build:bookworm32 --platform_suffix=bookworm32 + +# bookworm64 +build:bookworm64 --platforms=@rules_bzlmodrio_toolchains//platforms/bookworm64 +build:bookworm64 --build_tag_filters=-no-bullseye +build:bookworm64 --platform_suffix=bookworm64 + # rasppi build:raspi32 --platforms=@rules_bzlmodrio_toolchains//platforms/raspi32 build:raspi32 --build_tag_filters=-no-raspi diff --git a/.bazelrc-cc b/.bazelrc-cc index 7ca7094..cfbe70b 100644 --- a/.bazelrc-cc +++ b/.bazelrc-cc @@ -55,6 +55,16 @@ build:bullseye64 --incompatible_enable_cc_toolchain_resolution build:bullseye64 --copt=-std=c++20 build:bullseye64 --features=compiler_param_file +# bookworm32 +build:bookworm32 --incompatible_enable_cc_toolchain_resolution +build:bookworm32 --copt=-std=c++20 +build:bookworm32 --features=compiler_param_file + +# bookworm64 +build:bookworm64 --incompatible_enable_cc_toolchain_resolution +build:bookworm64 --copt=-std=c++20 +build:bookworm64 --features=compiler_param_file + # rasppi build:raspi32 --incompatible_enable_cc_toolchain_resolution build:raspi32 --copt=-std=c++20 diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..d706825 --- /dev/null +++ b/.clang-format @@ -0,0 +1,5 @@ +--- +Language: Cpp +BasedOnStyle: Google +FixNamespaceComments: true +... diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22868bf..dcd11a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,12 +126,12 @@ jobs: fail-fast: false matrix: include: - # Build non-bzlmod, bullseye32: + # Build non-bzlmod, bullseye64: - { name: "windows - bullseye64", os: windows-2022, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bullseye64", bazel_options: "--output_user_root=C:\\bazelroot", } - { name: "ubuntu - bullseye64", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bullseye64", bazel_options: "", } - - { name: "macos - bullseye64", os: macos-14, java_arch: "aarch64", command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "", } + - { name: "macos - bullseye64", os: macos-14, java_arch: "aarch64", command: "build", config: "--noenable_bzlmod --config=bullseye64", bazel_options: "", } - # Build bzlmod, bullseye32: + # Build bzlmod, bullseye64: - { name: "windows - bzlmod bullseye64", os: windows-2022, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bullseye64", bazel_options: "--output_user_root=C:\\bazelroot", } - { name: "ubuntu - bzlmod bullseye64", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bullseye64", bazel_options: "", } - { name: "macos - bzlmod bullseye64", os: macos-14, java_arch: "aarch64", command: "build", config: "--enable_bzlmod --config=bullseye64", bazel_options: "", } @@ -157,6 +157,79 @@ jobs: run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci working-directory: tests + build_bookworm32: + strategy: + fail-fast: false + matrix: + include: + # Build non-bzlmod, bookworm32 + - { name: "windows - bookworm32", os: windows-2022, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bookworm32", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - bookworm32", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bookworm32", bazel_options: "", } + - { name: "macos - bookworm32", os: macos-14, java_arch: "aarch64", command: "build", config: "--noenable_bzlmod --config=bookworm32", bazel_options: "", } + + # Build bzlmod, bookworm32 + - { name: "windows - bzlmod bookworm32", os: windows-2022, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bookworm32", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - bzlmod bookworm32", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bookworm32", bazel_options: "", } + - { name: "macos - bzlmod bookworm32", os: macos-14, java_arch: "aarch64", command: "build", config: "--enable_bzlmod --config=bookworm32", bazel_options: "", } + name: "Build - ${{ matrix.name }}" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@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=ci || true + working-directory: tests + - name: Build + run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci + working-directory: tests + + + build_bookworm64: + strategy: + fail-fast: false + matrix: + include: + # Build non-bzlmod, bookworm64: + - { name: "windows - bookworm64", os: windows-2022, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bookworm64", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - bookworm64", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bookworm64", bazel_options: "", } + - { name: "macos - bookworm64", os: macos-14, java_arch: "aarch64", command: "build", config: "--noenable_bzlmod --config=bookworm64", bazel_options: "", } + + # Build bzlmod, bookworm64: + - { name: "windows - bzlmod bookworm64", os: windows-2022, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bookworm64", bazel_options: "--output_user_root=C:\\bazelroot", } + - { name: "ubuntu - bzlmod bookworm64", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bookworm64", bazel_options: "", } + - { name: "macos - bzlmod bookworm64", os: macos-14, java_arch: "aarch64", command: "build", config: "--enable_bzlmod --config=bookworm64", bazel_options: "", } + name: "Build - ${{ matrix.name }}" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@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=ci || true + working-directory: tests + - name: Build + run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci + working-directory: tests + build_raspi32: @@ -164,12 +237,12 @@ jobs: fail-fast: false matrix: include: - # Build non-bzlmod, bullseye32: + # Build non-bzlmod, raspi32: - { name: "windows - raspi32", os: windows-2022, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=raspi32", bazel_options: "--output_user_root=C:\\bazelroot", } - { name: "ubuntu - raspi32", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=raspi32", bazel_options: "", } - { name: "macos - raspi32", os: macos-14, java_arch: "aarch64", command: "build", config: "--noenable_bzlmod --config=raspi32", bazel_options: "", } - # Build bzlmod, bullseye32: + # Build bzlmod, raspi32: - { name: "windows - bzlmod raspi32", os: windows-2022, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=raspi32", bazel_options: "--output_user_root=C:\\bazelroot", } - { name: "ubuntu - bzlmod raspi32", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=raspi32", bazel_options: "", } - { name: "macos - bzlmod raspi32", os: macos-14, java_arch: "aarch64", command: "build", config: "--enable_bzlmod --config=raspi32", bazel_options: "", } diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..939b15a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Publish Module +on: + workflow_dispatch: + push: + tags: + - '*' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + publish_module: + name: "Publish Module" + runs-on: ubuntu-22.04 + steps: + # Checkout repository + - uses: actions/checkout@v4 + with: + path: rules/rules_bzlmodrio_toolchains + + - name: Create Archive + run: git archive HEAD --format=tar.gz --output="rules_bzlmodrio_toolchains-${GITHUB_REF_NAME}.tar.gz" + working-directory: rules/rules_bzlmodrio_toolchains + + - name: Setup archive name + run: echo "ARCHIVE_NAME=rules/rules_bzlmodrio_toolchains/rules_bzlmodrio_toolchains-${GITHUB_REF_NAME}.tar.gz" >> "$GITHUB_ENV" + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: "${{ env.ARCHIVE_NAME }}" diff --git a/MODULE.bazel b/MODULE.bazel index 781bf87..e39d704 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,7 +1,7 @@ module( name = "rules_bzlmodrio_toolchains", - version = "2024-1.bcr1", - compatibility_level = 2024, + version = "2025-1", + compatibility_level = 2025, ) bazel_dep(name = "platforms", version = "0.0.9") @@ -11,6 +11,12 @@ bazel_dep(name = "bazel_skylib", version = "1.6.1") deps = use_extension("//:maven_deps.bzl", "deps") use_repo( deps, + "bazelrio_bookworm_32_toolchain_linux", + "bazelrio_bookworm_32_toolchain_macos", + "bazelrio_bookworm_32_toolchain_windows", + "bazelrio_bookworm_64_toolchain_linux", + "bazelrio_bookworm_64_toolchain_macos", + "bazelrio_bookworm_64_toolchain_windows", "bazelrio_bullseye_32_toolchain_linux", "bazelrio_bullseye_32_toolchain_macos", "bazelrio_bullseye_32_toolchain_windows", @@ -26,9 +32,15 @@ use_repo( ) sh_configure = use_extension("@rules_bzlmodrio_toolchains//:extensions.bzl", "sh_configure") -use_repo(sh_configure, "local_bullseye_32", "local_bullseye_64", "local_raspi_32", "local_roborio") +use_repo(sh_configure, "local_bookworm_32", "local_bookworm_64", "local_bullseye_32", "local_bullseye_64", "local_raspi_32", "local_roborio") register_toolchains( + "@local_bookworm_32//:macos", + "@local_bookworm_32//:linux", + "@local_bookworm_32//:windows", + "@local_bookworm_64//:macos", + "@local_bookworm_64//:linux", + "@local_bookworm_64//:windows", "@local_bullseye_32//:macos", "@local_bullseye_32//:linux", "@local_bullseye_32//:windows", diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 16ec237..531a6b9 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -34,8 +34,8 @@ "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_cc/0.0.9/source.json": "1f1ba6fea244b616de4a554a0f4983c91a9301640c8fe0dd1d410254115c8430", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/4.0.0/MODULE.bazel": "5a78a7ae82cd1a33cef56dc578c7d2a46ed0dca12643ee45edbb8417899e6f74", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.1/source.json": "8f3f3076554e1558e8e468b2232991c510ecbcbed9e6f8c06ac31c93bcf38362", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.5/MODULE.bazel": "481164be5e02e4cab6e77a36927683263be56b7e36fef918b458d7a8a1ebadb1", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.5/source.json": "a805b889531d1690e3c72a7a7e47a870d00323186a9904b36af83aa3d053ee8d", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_jvm_external/4.4.2/source.json": "a075731e1b46bc8425098512d038d416e966ab19684a10a34f4741295642fc35", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0", @@ -56,8 +56,8 @@ "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/upb/0.0.0-20220923-a547704/source.json": "f1ef7d3f9e0e26d4b23d1c39b5f5de71f584dd7d1b4ef83d9bbba6ec7a6a6459", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.2.12/MODULE.bazel": "3b1a8834ada2a883674be8cbd36ede1b6ec481477ada359cd2d3ddc562340b27", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3/MODULE.bazel": "6a9c02f19a24dcedb05572b2381446e27c272cd383aed11d41d99da9e3167a72", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3/source.json": "b6b43d0737af846022636e6e255fd4a96fee0d34f08f3830e6e0bac51465c37c" + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3.1.bcr.3/MODULE.bazel": "af322bc08976524477c79d1e45e241b6efbeb918c497e8840b8ab116802dda79", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3.1.bcr.3/source.json": "2be409ac3c7601245958cd4fcdff4288be79ed23bd690b4b951f500d54ee6e7d" }, "selectedYankedVersions": {}, "moduleExtensions": { diff --git a/WORKSPACE b/WORKSPACE index 1b880d6..f9dc0fa 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -9,6 +9,12 @@ load("@rules_bzlmodrio_toolchains//toolchains:load_toolchains.bzl", "load_toolch load_toolchains() register_toolchains( + "@local_bookworm_32//:macos", + "@local_bookworm_32//:linux", + "@local_bookworm_32//:windows", + "@local_bookworm_64//:macos", + "@local_bookworm_64//:linux", + "@local_bookworm_64//:windows", "@local_bullseye_32//:macos", "@local_bullseye_32//:linux", "@local_bullseye_32//:windows", diff --git a/constraints/is_bookworm32/BUILD.bazel b/constraints/is_bookworm32/BUILD.bazel new file mode 100644 index 0000000..1506d7b --- /dev/null +++ b/constraints/is_bookworm32/BUILD.bazel @@ -0,0 +1,30 @@ +constraint_setting( + name = "is_bookworm32", + default_constraint_value = ":false", +) + +constraint_value( + name = "true", + constraint_setting = ":is_bookworm32", + visibility = ["//visibility:public"], +) + +constraint_value( + name = "false", + constraint_setting = ":is_bookworm32", +) + +config_setting( + name = "bookworm32", + constraint_values = [":true"], + visibility = ["//visibility:public"], +) + +config_setting( + name = "bookworm32_debug", + constraint_values = [":true"], + values = { + "compilation_mode": "dbg", + }, + visibility = ["//visibility:public"], +) diff --git a/constraints/is_bookworm64/BUILD.bazel b/constraints/is_bookworm64/BUILD.bazel new file mode 100644 index 0000000..b0ce584 --- /dev/null +++ b/constraints/is_bookworm64/BUILD.bazel @@ -0,0 +1,30 @@ +constraint_setting( + name = "is_bookworm64", + default_constraint_value = ":false", +) + +constraint_value( + name = "true", + constraint_setting = ":is_bookworm64", + visibility = ["//visibility:public"], +) + +constraint_value( + name = "false", + constraint_setting = ":is_bookworm64", +) + +config_setting( + name = "bookworm64", + constraint_values = [":true"], + visibility = ["//visibility:public"], +) + +config_setting( + name = "bookworm64_debug", + constraint_values = [":true"], + values = { + "compilation_mode": "dbg", + }, + visibility = ["//visibility:public"], +) diff --git a/maven_deps.bzl b/maven_deps.bzl index cd41c4a..9f8e687 100644 --- a/maven_deps.bzl +++ b/maven_deps.bzl @@ -9,26 +9,72 @@ filegroup_all = """filegroup( """ def __setup_toolchains_dependencies(mctx): + # bookworm-32 + maybe( + http_archive, + "bazelrio_bookworm_32_toolchain_macos", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz", + sha256 = "633fccbe1508478b095a03a05477795825971cdac0860bf3a0f79f5be2f73a5a", + build_file_content = filegroup_all, + ) + maybe( + http_archive, + "bazelrio_bookworm_32_toolchain_linux", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz", + sha256 = "3a0d0b350c359c8a46ce58e654ba4d5e97177833f0181792151401fe110aac32", + build_file_content = filegroup_all, + ) + maybe( + http_archive, + "bazelrio_bookworm_32_toolchain_windows", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip", + sha256 = "d0af53f4191d09c36ba189d9e20d9524dc164847c8c39e4f5ca961fe8d5eb056", + build_file_content = filegroup_all, + ) + + # bookworm-64 + maybe( + http_archive, + "bazelrio_bookworm_64_toolchain_macos", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz", + sha256 = "34af7c9b601bbce1fe5c5e07f70fe8abd7ed3985cc603dbc12ef7f3d8c2f0b9d", + build_file_content = filegroup_all, + ) + maybe( + http_archive, + "bazelrio_bookworm_64_toolchain_linux", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz", + sha256 = "d94005ae516bb43fc85a07ed89cb51bec96ed931ca5c084427f1432a1dbf71e9", + build_file_content = filegroup_all, + ) + maybe( + http_archive, + "bazelrio_bookworm_64_toolchain_windows", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip", + sha256 = "50f26a9b0ae595bd536f5b7003a465b04871005cbe57c18e84f657e83df13f4c", + build_file_content = filegroup_all, + ) + # bullseye-32 maybe( http_archive, "bazelrio_bullseye_32_toolchain_macos", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-bullseye-2024-x86_64-apple-darwin-Toolchain-10.2.0.tgz", - sha256 = "c7febfdb1f01ad7fd7876f8482f50ab4a875aeee77b12818fb97c4a76da789bd", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bullseye-2025-x86_64-apple-darwin-Toolchain-10.2.0.tgz", + sha256 = "d46d8191b8ad04494439bf4d14dc599d8531552e56f25dcd7949dc9cf7b0d512", build_file_content = filegroup_all, ) maybe( http_archive, "bazelrio_bullseye_32_toolchain_linux", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-bullseye-2024-x86_64-linux-gnu-Toolchain-10.2.0.tgz", - sha256 = "0e3544b9cd8602f160e47c4b1593199ac6a600bce0dd9028be78a3ee7cc211fe", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bullseye-2025-x86_64-linux-gnu-Toolchain-10.2.0.tgz", + sha256 = "1cfedd017bab157881f5f81b785152033269e02d4fe72e0c36957263d145041b", build_file_content = filegroup_all, ) maybe( http_archive, "bazelrio_bullseye_32_toolchain_windows", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-bullseye-2024-x86_64-w64-mingw32-Toolchain-10.2.0.zip", - sha256 = "acc64f989c73c72a15e2296a6deee553458a1580e484e93b8ecd02cbf83e6af8", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bullseye-2025-x86_64-w64-mingw32-Toolchain-10.2.0.zip", + sha256 = "6d2d6684ffc8791d2a261fb8ed8b92d8c00408f0b24dcd5557ed3aebdd096c15", build_file_content = filegroup_all, ) @@ -36,22 +82,22 @@ def __setup_toolchains_dependencies(mctx): maybe( http_archive, "bazelrio_bullseye_64_toolchain_macos", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/arm64-bullseye-2024-x86_64-apple-darwin-Toolchain-10.2.0.tgz", - sha256 = "2774f894c59f1c390c4990ffaa6412776ea6a9dafc01accb50b8def72b8e6dbe", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bullseye-2025-x86_64-apple-darwin-Toolchain-10.2.0.tgz", + sha256 = "d0b581e3962b4d23d720ff982e2df05ba516329b135a6b09e5bf292b114aac2b", build_file_content = filegroup_all, ) maybe( http_archive, "bazelrio_bullseye_64_toolchain_linux", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/arm64-bullseye-2024-x86_64-linux-gnu-Toolchain-10.2.0.tgz", - sha256 = "2cd4345315f165f273e21bbcf04638947fb7530a2859b728a564b6b97a7bea69", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bullseye-2025-x86_64-linux-gnu-Toolchain-10.2.0.tgz", + sha256 = "df3b1fa4ca83d61e853fa32620ede3f2402dc3b6088653c1ae85714cd5c566ed", build_file_content = filegroup_all, ) maybe( http_archive, "bazelrio_bullseye_64_toolchain_windows", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/arm64-bullseye-2024-x86_64-w64-mingw32-Toolchain-10.2.0.zip", - sha256 = "6ef1c81fe3fbc5578db111087a3715746bcdc59e67f10a50788c363ab5fb1368", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bullseye-2025-x86_64-w64-mingw32-Toolchain-10.2.0.zip", + sha256 = "d978c2baa757571b3cb413844f3fa26b779259a4f8a680fb2fb872a13c8618b3", build_file_content = filegroup_all, ) @@ -59,22 +105,22 @@ def __setup_toolchains_dependencies(mctx): maybe( http_archive, "bazelrio_raspi_32_toolchain_macos", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-raspi-bullseye-2024-x86_64-apple-darwin-Toolchain-10.2.0.tgz", - sha256 = "2725fd7d1582d8503a2fdd1f7402e579cbbd1091b820b0fd50100d2205b78ba7", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-raspi-bullseye-2025-x86_64-apple-darwin-Toolchain-10.2.0.tgz", + sha256 = "e205a4824a0d6704e968184e52525c5fa200b3e2278177a80d970b2077896f74", build_file_content = filegroup_all, ) maybe( http_archive, "bazelrio_raspi_32_toolchain_linux", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-raspi-bullseye-2024-x86_64-linux-gnu-Toolchain-10.2.0.tgz", - sha256 = "a8b19b6068fcedcae033d3bbefac9ae4a26139ab276304fe49302e4a992a9f7d", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-raspi-bullseye-2025-x86_64-linux-gnu-Toolchain-10.2.0.tgz", + sha256 = "b53465a8d36de937a0f88299f8ab3a97db5af3cdf4f7e52473bf294c5c1da3f6", build_file_content = filegroup_all, ) maybe( http_archive, "bazelrio_raspi_32_toolchain_windows", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-raspi-bullseye-2024-x86_64-w64-mingw32-Toolchain-10.2.0.zip", - sha256 = "69429dc49f2571b2c933e751b8a25f7a3a45b285b3ae49bc6e9b01e065fc8630", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-raspi-bullseye-2025-x86_64-w64-mingw32-Toolchain-10.2.0.zip", + sha256 = "4a891d7a5de1fc3cd03f60b4340f586ad2750fef8baab35c408e23fa539a0213", build_file_content = filegroup_all, ) @@ -82,22 +128,22 @@ def __setup_toolchains_dependencies(mctx): maybe( http_archive, "bazelrio_roborio_toolchain_macos", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/cortexa9_vfpv3-roborio-academic-2024-x86_64-apple-darwin-Toolchain-12.1.0.tgz", - sha256 = "95eed7503f92e17f0e93ed6e5412d3ac6297b6a15773c90ef1a590f47f6fa467", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/cortexa9_vfpv3-roborio-academic-2025-x86_64-apple-darwin-Toolchain-12.1.0.tgz", + sha256 = "5d7021faa2745227adf04ad31f90c64f2b89527dac4283f5a28c0d5c8a227816", build_file_content = filegroup_all, ) maybe( http_archive, "bazelrio_roborio_toolchain_linux", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/cortexa9_vfpv3-roborio-academic-2024-x86_64-linux-gnu-Toolchain-12.1.0.tgz", - sha256 = "10349791e4f9fa33100ee52a84e7f9ba4df581963818334771253369b0d12061", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/cortexa9_vfpv3-roborio-academic-2025-x86_64-linux-gnu-Toolchain-12.1.0.tgz", + sha256 = "0ed7c454eab947166c41177f72f795a408f4b7c5fc0f7fd6ee35dba1871fbfac", build_file_content = filegroup_all, ) maybe( http_archive, "bazelrio_roborio_toolchain_windows", - url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/cortexa9_vfpv3-roborio-academic-2024-x86_64-w64-mingw32-Toolchain-12.1.0.zip", - sha256 = "b367ab5d451603a97cd18a76193e860640230013a99baf216bb97dda1c353990", + url = "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/cortexa9_vfpv3-roborio-academic-2025-x86_64-w64-mingw32-Toolchain-12.1.0.zip", + sha256 = "1395ae04cf5c617683ff8eb473c949740a6bb57c9405668f179c7206ab6ba3f8", build_file_content = filegroup_all, ) diff --git a/platforms/bookworm32/BUILD.bazel b/platforms/bookworm32/BUILD.bazel new file mode 100644 index 0000000..e156bb5 --- /dev/null +++ b/platforms/bookworm32/BUILD.bazel @@ -0,0 +1,8 @@ +platform( + name = "bookworm32", + constraint_values = [ + "@platforms//os:linux", + "@platforms//cpu:armv7", + "//constraints/is_bookworm32:true", + ], +) diff --git a/platforms/bookworm64/BUILD.bazel b/platforms/bookworm64/BUILD.bazel new file mode 100644 index 0000000..5221d3f --- /dev/null +++ b/platforms/bookworm64/BUILD.bazel @@ -0,0 +1,8 @@ +platform( + name = "bookworm64", + constraint_values = [ + "@platforms//os:linux", + "@platforms//cpu:armv7", + "//constraints/is_bookworm64:true", + ], +) diff --git a/tests/.bazelrc b/tests/.bazelrc index 5a940c3..0c34149 100644 --- a/tests/.bazelrc +++ b/tests/.bazelrc @@ -23,6 +23,16 @@ build:bullseye64 --platforms=@rules_bzlmodrio_toolchains//platforms/bullseye64 build:bullseye64 --build_tag_filters=-no-bullseye build:bullseye64 --platform_suffix=bullseye64 +# bookworm32 +build:bookworm32 --platforms=@rules_bzlmodrio_toolchains//platforms/bookworm32 +build:bookworm32 --build_tag_filters=-no-bullseye +build:bookworm32 --platform_suffix=bookworm32 + +# bookworm64 +build:bookworm64 --platforms=@rules_bzlmodrio_toolchains//platforms/bookworm64 +build:bookworm64 --build_tag_filters=-no-bullseye +build:bookworm64 --platform_suffix=bookworm64 + # rasppi build:raspi32 --platforms=@rules_bzlmodrio_toolchains//platforms/raspi32 build:raspi32 --build_tag_filters=-no-raspi diff --git a/tests/.bazelrc-cc b/tests/.bazelrc-cc index 7ca7094..cfbe70b 100644 --- a/tests/.bazelrc-cc +++ b/tests/.bazelrc-cc @@ -55,6 +55,16 @@ build:bullseye64 --incompatible_enable_cc_toolchain_resolution build:bullseye64 --copt=-std=c++20 build:bullseye64 --features=compiler_param_file +# bookworm32 +build:bookworm32 --incompatible_enable_cc_toolchain_resolution +build:bookworm32 --copt=-std=c++20 +build:bookworm32 --features=compiler_param_file + +# bookworm64 +build:bookworm64 --incompatible_enable_cc_toolchain_resolution +build:bookworm64 --copt=-std=c++20 +build:bookworm64 --features=compiler_param_file + # rasppi build:raspi32 --incompatible_enable_cc_toolchain_resolution build:raspi32 --copt=-std=c++20 diff --git a/tests/MODULE.bazel.lock b/tests/MODULE.bazel.lock index 82cb35b..4f10375 100644 --- a/tests/MODULE.bazel.lock +++ b/tests/MODULE.bazel.lock @@ -38,8 +38,8 @@ "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_cc/0.0.9/source.json": "1f1ba6fea244b616de4a554a0f4983c91a9301640c8fe0dd1d410254115c8430", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/4.0.0/MODULE.bazel": "5a78a7ae82cd1a33cef56dc578c7d2a46ed0dca12643ee45edbb8417899e6f74", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.1/source.json": "8f3f3076554e1558e8e468b2232991c510ecbcbed9e6f8c06ac31c93bcf38362", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.5/MODULE.bazel": "481164be5e02e4cab6e77a36927683263be56b7e36fef918b458d7a8a1ebadb1", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.5/source.json": "a805b889531d1690e3c72a7a7e47a870d00323186a9904b36af83aa3d053ee8d", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_jvm_external/4.4.2/source.json": "a075731e1b46bc8425098512d038d416e966ab19684a10a34f4741295642fc35", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0", @@ -60,8 +60,8 @@ "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/upb/0.0.0-20220923-a547704/source.json": "f1ef7d3f9e0e26d4b23d1c39b5f5de71f584dd7d1b4ef83d9bbba6ec7a6a6459", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.2.12/MODULE.bazel": "3b1a8834ada2a883674be8cbd36ede1b6ec481477ada359cd2d3ddc562340b27", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3/MODULE.bazel": "6a9c02f19a24dcedb05572b2381446e27c272cd383aed11d41d99da9e3167a72", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3/source.json": "b6b43d0737af846022636e6e255fd4a96fee0d34f08f3830e6e0bac51465c37c" + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3.1.bcr.3/MODULE.bazel": "af322bc08976524477c79d1e45e241b6efbeb918c497e8840b8ab116802dda79", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3.1.bcr.3/source.json": "2be409ac3c7601245958cd4fcdff4288be79ed23bd690b4b951f500d54ee6e7d" }, "selectedYankedVersions": {}, "moduleExtensions": { @@ -112,8 +112,8 @@ }, "@@rules_bzlmodrio_toolchains~//:extensions.bzl%sh_configure": { "general": { - "bzlTransitiveDigest": "j4O0iFZXZn73f671MC8nnNxQjAgGlUpgGlxBz+nI3Ks=", - "usagesDigest": "D9+w2gU5GrKmrS7HaM4EeTrG1rydVkK9JY//tNjDFOg=", + "bzlTransitiveDigest": "LQy5WwXZjBTqwJHalVfhbKbK9laYAny9ZL/lnK3qa70=", + "usagesDigest": "uonolgw+fRKloO6hqlkUNhn2dgbGC3sUZiZUqJYf9jY=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -137,7 +137,7 @@ "attributes": { "compiler": "roborio", "bin_subfolder": "roborio-academic/bin", - "bin_prefix": "arm-frc2024-linux-gnueabi-", + "bin_prefix": "arm-frc2025-linux-gnueabi-", "sysroot_subfolder": "roborio-academic/arm-nilrt-linux-gnueabi/sysroot", "cxx_version": "12", "sysroot_include_folder": "arm-nilrt-linux-gnueabi", @@ -169,6 +169,32 @@ "sysroot_include_folder": "arm-linux-gnueabihf", "repo_shortname": "raspi_32" } + }, + "local_bookworm_32": { + "bzlFile": "@@rules_bzlmodrio_toolchains~//toolchains:configure_cross_compiler.bzl", + "ruleClassName": "configure_cross_compiler", + "attributes": { + "compiler": "bookworm-32", + "bin_subfolder": "bookworm/bin", + "bin_prefix": "armv7-bookworm-linux-gnueabihf-", + "sysroot_subfolder": "bookworm/arm-linux-gnueabihf/sysroot", + "cxx_version": "12", + "sysroot_include_folder": "arm-linux-gnueabihf", + "repo_shortname": "bookworm_32" + } + }, + "local_bookworm_64": { + "bzlFile": "@@rules_bzlmodrio_toolchains~//toolchains:configure_cross_compiler.bzl", + "ruleClassName": "configure_cross_compiler", + "attributes": { + "compiler": "bookworm-64", + "bin_subfolder": "bookworm/bin", + "bin_prefix": "aarch64-bookworm-linux-gnu-", + "sysroot_subfolder": "bookworm/aarch64-linux-gnu/sysroot", + "cxx_version": "12", + "sysroot_include_folder": "aarch64-linux-gnu", + "repo_shortname": "bookworm_64" + } } }, "recordedRepoMappingEntries": [] @@ -176,8 +202,8 @@ }, "@@rules_bzlmodrio_toolchains~//:maven_deps.bzl%deps": { "general": { - "bzlTransitiveDigest": "jnA2covwRuny+fzZdGPp5/HFuqG9H0FxzSg7dBFf9RE=", - "usagesDigest": "QyJpnT1LOfusCJHPe5Z6jNaG3sH8lzgmIf/rDLOvUns=", + "bzlTransitiveDigest": "PYkNyj+XbBQvHPPHyChfAG63ZQcZiGabDgJ03LgU3ck=", + "usagesDigest": "4/3/JS7eRFlnL/LaNaWtSvAotjn9NVmTvf0dYduyXNo=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -186,110 +212,161 @@ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-raspi-bullseye-2024-x86_64-linux-gnu-Toolchain-10.2.0.tgz", - "sha256": "a8b19b6068fcedcae033d3bbefac9ae4a26139ab276304fe49302e4a992a9f7d", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-raspi-bullseye-2025-x86_64-linux-gnu-Toolchain-10.2.0.tgz", + "sha256": "b53465a8d36de937a0f88299f8ab3a97db5af3cdf4f7e52473bf294c5c1da3f6", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_bullseye_32_toolchain_windows": { + "bazelrio_bookworm_32_toolchain_linux": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-bullseye-2024-x86_64-w64-mingw32-Toolchain-10.2.0.zip", - "sha256": "acc64f989c73c72a15e2296a6deee553458a1580e484e93b8ecd02cbf83e6af8", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz", + "sha256": "3a0d0b350c359c8a46ce58e654ba4d5e97177833f0181792151401fe110aac32", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_roborio_toolchain_macos": { + "bazelrio_bullseye_32_toolchain_linux": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/cortexa9_vfpv3-roborio-academic-2024-x86_64-apple-darwin-Toolchain-12.1.0.tgz", - "sha256": "95eed7503f92e17f0e93ed6e5412d3ac6297b6a15773c90ef1a590f47f6fa467", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bullseye-2025-x86_64-linux-gnu-Toolchain-10.2.0.tgz", + "sha256": "1cfedd017bab157881f5f81b785152033269e02d4fe72e0c36957263d145041b", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_bullseye_32_toolchain_linux": { + "bazelrio_roborio_toolchain_linux": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "urls": [ - "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-bullseye-2024-x86_64-linux-gnu-Toolcfhain-10.2.0.tgz", - "file:///home/pjreiniger/git/bzlmodRio/monorepo/rules/rules_bzlmodrio_toolchains/tests/armhf-bullseye-2024-x86_64-linux-gnu-Toolchain-10.2.0.tgz" - ], - "sha256": "0e3544b9cd8602f160e47c4b1593199ac6a600bce0dd9028be78a3ee7cc211fe", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/cortexa9_vfpv3-roborio-academic-2025-x86_64-linux-gnu-Toolchain-12.1.0.tgz", + "sha256": "0ed7c454eab947166c41177f72f795a408f4b7c5fc0f7fd6ee35dba1871fbfac", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_raspi_32_toolchain_windows": { + "bazelrio_bullseye_64_toolchain_windows": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-raspi-bullseye-2024-x86_64-w64-mingw32-Toolchain-10.2.0.zip", - "sha256": "69429dc49f2571b2c933e751b8a25f7a3a45b285b3ae49bc6e9b01e065fc8630", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bullseye-2025-x86_64-w64-mingw32-Toolchain-10.2.0.zip", + "sha256": "d978c2baa757571b3cb413844f3fa26b779259a4f8a680fb2fb872a13c8618b3", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_roborio_toolchain_linux": { + "bazelrio_bullseye_32_toolchain_macos": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/cortexa9_vfpv3-roborio-academic-2024-x86_64-linux-gnu-Toolchain-12.1.0.tgz", - "sha256": "10349791e4f9fa33100ee52a84e7f9ba4df581963818334771253369b0d12061", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bullseye-2025-x86_64-apple-darwin-Toolchain-10.2.0.tgz", + "sha256": "d46d8191b8ad04494439bf4d14dc599d8531552e56f25dcd7949dc9cf7b0d512", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_roborio_toolchain_windows": { + "bazelrio_bullseye_64_toolchain_linux": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/cortexa9_vfpv3-roborio-academic-2024-x86_64-w64-mingw32-Toolchain-12.1.0.zip", - "sha256": "b367ab5d451603a97cd18a76193e860640230013a99baf216bb97dda1c353990", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bullseye-2025-x86_64-linux-gnu-Toolchain-10.2.0.tgz", + "sha256": "df3b1fa4ca83d61e853fa32620ede3f2402dc3b6088653c1ae85714cd5c566ed", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_bullseye_64_toolchain_macos": { + "bazelrio_bookworm_32_toolchain_windows": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/arm64-bullseye-2024-x86_64-apple-darwin-Toolchain-10.2.0.tgz", - "sha256": "2774f894c59f1c390c4990ffaa6412776ea6a9dafc01accb50b8def72b8e6dbe", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip", + "sha256": "d0af53f4191d09c36ba189d9e20d9524dc164847c8c39e4f5ca961fe8d5eb056", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_bullseye_64_toolchain_windows": { + "bazelrio_bookworm_32_toolchain_macos": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/arm64-bullseye-2024-x86_64-w64-mingw32-Toolchain-10.2.0.zip", - "sha256": "6ef1c81fe3fbc5578db111087a3715746bcdc59e67f10a50788c363ab5fb1368", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz", + "sha256": "633fccbe1508478b095a03a05477795825971cdac0860bf3a0f79f5be2f73a5a", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_raspi_32_toolchain_macos": { + "bazelrio_bullseye_32_toolchain_windows": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-raspi-bullseye-2024-x86_64-apple-darwin-Toolchain-10.2.0.tgz", - "sha256": "2725fd7d1582d8503a2fdd1f7402e579cbbd1091b820b0fd50100d2205b78ba7", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-bullseye-2025-x86_64-w64-mingw32-Toolchain-10.2.0.zip", + "sha256": "6d2d6684ffc8791d2a261fb8ed8b92d8c00408f0b24dcd5557ed3aebdd096c15", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_bullseye_32_toolchain_macos": { + "bazelrio_bookworm_64_toolchain_linux": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/armhf-bullseye-2024-x86_64-apple-darwin-Toolchain-10.2.0.tgz", - "sha256": "c7febfdb1f01ad7fd7876f8482f50ab4a875aeee77b12818fb97c4a76da789bd", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz", + "sha256": "d94005ae516bb43fc85a07ed89cb51bec96ed931ca5c084427f1432a1dbf71e9", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } }, - "bazelrio_bullseye_64_toolchain_linux": { + "bazelrio_roborio_toolchain_macos": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/cortexa9_vfpv3-roborio-academic-2025-x86_64-apple-darwin-Toolchain-12.1.0.tgz", + "sha256": "5d7021faa2745227adf04ad31f90c64f2b89527dac4283f5a28c0d5c8a227816", + "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" + } + }, + "bazelrio_bookworm_64_toolchain_windows": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip", + "sha256": "50f26a9b0ae595bd536f5b7003a465b04871005cbe57c18e84f657e83df13f4c", + "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" + } + }, + "bazelrio_raspi_32_toolchain_windows": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-raspi-bullseye-2025-x86_64-w64-mingw32-Toolchain-10.2.0.zip", + "sha256": "4a891d7a5de1fc3cd03f60b4340f586ad2750fef8baab35c408e23fa539a0213", + "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" + } + }, + "bazelrio_roborio_toolchain_windows": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/cortexa9_vfpv3-roborio-academic-2025-x86_64-w64-mingw32-Toolchain-12.1.0.zip", + "sha256": "1395ae04cf5c617683ff8eb473c949740a6bb57c9405668f179c7206ab6ba3f8", + "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" + } + }, + "bazelrio_bookworm_64_toolchain_macos": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz", + "sha256": "34af7c9b601bbce1fe5c5e07f70fe8abd7ed3985cc603dbc12ef7f3d8c2f0b9d", + "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" + } + }, + "bazelrio_bullseye_64_toolchain_macos": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/arm64-bullseye-2025-x86_64-apple-darwin-Toolchain-10.2.0.tgz", + "sha256": "d0b581e3962b4d23d720ff982e2df05ba516329b135a6b09e5bf292b114aac2b", + "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" + } + }, + "bazelrio_raspi_32_toolchain_macos": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/arm64-bullseye-2024-x86_64-linux-gnu-Toolchain-10.2.0.tgz", - "sha256": "2cd4345315f165f273e21bbcf04638947fb7530a2859b728a564b6b97a7bea69", + "url": "https://github.com/wpilibsuite/opensdk/releases/download/v2025-1/armhf-raspi-bullseye-2025-x86_64-apple-darwin-Toolchain-10.2.0.tgz", + "sha256": "e205a4824a0d6704e968184e52525c5fa200b3e2278177a80d970b2077896f74", "build_file_content": "filegroup(\n name = \"all\",\n srcs = glob([\"**\"]),\n visibility = [\"//visibility:public\"],\n)\n" } } diff --git a/tests/WORKSPACE b/tests/WORKSPACE index 09cd361..14aba75 100644 --- a/tests/WORKSPACE +++ b/tests/WORKSPACE @@ -22,6 +22,12 @@ load("@rules_bzlmodrio_toolchains//toolchains:load_toolchains.bzl", "load_toolch load_toolchains() register_toolchains( + "@local_bookworm_32//:macos", + "@local_bookworm_32//:linux", + "@local_bookworm_32//:windows", + "@local_bookworm_64//:macos", + "@local_bookworm_64//:linux", + "@local_bookworm_64//:windows", "@local_bullseye_32//:macos", "@local_bullseye_32//:linux", "@local_bullseye_32//:windows", @@ -39,8 +45,8 @@ register_toolchains( # Styleguide http_archive( name = "rules_wpiformat", - sha256 = "af167c15cfc3430901b0d6a19ed949b306887b1b079eabb24789a54d82371a62", - url = "https://github.com/bzlmodRio/rules_wpiformat/releases/download/2024.34/rules_wpiformat-2024.34.tar.gz", + sha256 = "0d77c34bf0283cebff00c6fb89c57318150944e4a5ec927df024cf5da7baf75a", + url = "https://github.com/bzlmodRio/rules_wpiformat/releases/download/2024.45/rules_wpiformat-2024.45.tar.gz", ) http_archive( diff --git a/toolchains/load_toolchains.bzl b/toolchains/load_toolchains.bzl index 0ac9e05..04b5edc 100644 --- a/toolchains/load_toolchains.bzl +++ b/toolchains/load_toolchains.bzl @@ -1,6 +1,26 @@ load("//toolchains:configure_cross_compiler.bzl", "configure_cross_compiler") def load_toolchains(): + configure_cross_compiler( + name = "local_bookworm_32", + compiler = "bookworm-32", + bin_subfolder = "bookworm/bin", + bin_prefix = "armv7-bookworm-linux-gnueabihf-", + sysroot_subfolder = "bookworm/arm-linux-gnueabihf/sysroot", + cxx_version = "12", + sysroot_include_folder = "arm-linux-gnueabihf", + repo_shortname = "bookworm_32", + ) + configure_cross_compiler( + name = "local_bookworm_64", + compiler = "bookworm-64", + bin_subfolder = "bookworm/bin", + bin_prefix = "aarch64-bookworm-linux-gnu-", + sysroot_subfolder = "bookworm/aarch64-linux-gnu/sysroot", + cxx_version = "12", + sysroot_include_folder = "aarch64-linux-gnu", + repo_shortname = "bookworm_64", + ) configure_cross_compiler( name = "local_bullseye_32", compiler = "bullseye-32", @@ -35,7 +55,7 @@ def load_toolchains(): name = "local_roborio", compiler = "roborio", bin_subfolder = "roborio-academic/bin", - bin_prefix = "arm-frc2024-linux-gnueabi-", + bin_prefix = "arm-frc2025-linux-gnueabi-", sysroot_subfolder = "roborio-academic/arm-nilrt-linux-gnueabi/sysroot", cxx_version = "12", sysroot_include_folder = "arm-nilrt-linux-gnueabi",