Skip to content

Commit

Permalink
Update to 2025.2.0 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreiniger authored Jan 4, 2025
1 parent 0c17a14 commit 8b19e6e
Show file tree
Hide file tree
Showing 17 changed files with 467 additions and 113 deletions.
29 changes: 25 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,31 @@ build:bullseye64 --platforms=@rules_bzlmodrio_toolchains//platforms/bullseye64
build:bullseye64 --build_tag_filters=-no-bullseye
build:bullseye64 --platform_suffix=bullseye64

# rasppi
build:raspi32 --platforms=@rules_bzlmodrio_toolchains//platforms/raspi32
build:raspi32 --build_tag_filters=-no-raspi
build:raspi32 --platform_suffix=raspi32
# bookworm32
build:bookworm32 --platforms=@rules_bzlmodrio_toolchains//platforms/bookworm32
build:bookworm32 --build_tag_filters=-no-bookworm
build:bookworm32 --platform_suffix=bookworm32

# bookworm64
build:bookworm64 --platforms=@rules_bzlmodrio_toolchains//platforms/bookworm64
build:bookworm64 --build_tag_filters=-no-bookworm
build:bookworm64 --platform_suffix=bookworm64

# rasppi bullseye
build:raspibullseye32 --platforms=@rules_bzlmodrio_toolchains//platforms/raspibullseye32
build:raspibullseye32 --build_tag_filters=-no-raspi
build:raspibullseye32 --platform_suffix=raspibullseye32

# rasppi bookworm
build:raspibookworm32 --platforms=@rules_bzlmodrio_toolchains//platforms/raspibookworm32
build:raspibookworm32 --build_tag_filters=-no-raspi
build:raspibookworm32 --platform_suffix=raspibookworm32

# Alias toolchain names to what wpilibsuite uses for CI/Artifact naming
build:athena --config=roborio
build:systemcore --config=bookworm64
build:linuxarm32 --config=raspibookworm32
build:linuxarm64 --config=bookworm64

test --test_output=errors
common --registry=https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/
23 changes: 19 additions & 4 deletions .bazelrc-cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,22 @@ build:bullseye64 --incompatible_enable_cc_toolchain_resolution
build:bullseye64 --copt=-std=c++20
build:bullseye64 --features=compiler_param_file

# rasppi
build:raspi32 --incompatible_enable_cc_toolchain_resolution
build:raspi32 --copt=-std=c++20
build:raspi32 --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 bullseye
build:raspibullseye32 --incompatible_enable_cc_toolchain_resolution
build:raspibullseye32 --copt=-std=c++20
build:raspibullseye32 --features=compiler_param_file

# rasppi bookworm
build:raspibookworm32 --incompatible_enable_cc_toolchain_resolution
build:raspibookworm32 --copt=-std=c++20
build:raspibookworm32 --features=compiler_param_file
5 changes: 5 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
Language: Cpp
BasedOnStyle: Google
FixNamespaceComments: true
...
55 changes: 9 additions & 46 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,57 +84,20 @@ jobs:
run: bazel ${{ matrix.bazel_options }} ${{ matrix.command }} //... -k ${{ matrix.config }} --verbose_failures --config=ci
working-directory: tests

build_bullseye32:
build_linuxarm32:
strategy:
fail-fast: false
matrix:
include:
# Build non-bzlmod, bullseye32
- { name: "windows - bullseye32", os: windows-2022, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "--output_user_root=C:\\bazelroot", }
- { name: "ubuntu - bullseye32", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "", }
- { name: "macos - bullseye32", os: macos-14, java_arch: "aarch64", command: "build", config: "--noenable_bzlmod --config=bullseye32", bazel_options: "", }
# Build non-bzlmod, linuxarm32
- { name: "windows - linuxarm32", os: windows-2022, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=linuxarm32", bazel_options: "--output_user_root=C:\\bazelroot", }
- { name: "ubuntu - linuxarm32", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--noenable_bzlmod --config=linuxarm32", bazel_options: "", }
- { name: "macos - linuxarm32", os: macos-14, java_arch: "aarch64", command: "build", config: "--noenable_bzlmod --config=linuxarm32", bazel_options: "", }

# Build bzlmod, bullseye32
- { name: "windows - bzlmod bullseye32", os: windows-2022, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bullseye32", bazel_options: "--output_user_root=C:\\bazelroot", }
- { name: "ubuntu - bzlmod bullseye32", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=bullseye32", bazel_options: "", }
- { name: "macos - bzlmod bullseye32", os: macos-14, java_arch: "aarch64", command: "build", config: "--enable_bzlmod --config=bullseye32", 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_bullseye64:
strategy:
fail-fast: false
matrix:
include:
# Build non-bzlmod, bullseye32:
- { 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: "", }

# Build bzlmod, bullseye32:
- { 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: "", }
# Build bzlmod, linuxarm32
# - { name: "windows - bzlmod linuxarm32", os: windows-2022, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=linuxarm32", bazel_options: "--output_user_root=C:\\bazelroot", }
- { name: "ubuntu - bzlmod linuxarm32", os: ubuntu-22.04, java_arch: "x64", command: "build", config: "--enable_bzlmod --config=linuxarm32", bazel_options: "", }
- { name: "macos - bzlmod linuxarm32", os: macos-14, java_arch: "aarch64", command: "build", config: "--enable_bzlmod --config=linuxarm32", bazel_options: "", }
name: "Build - ${{ matrix.name }}"
runs-on: ${{ matrix.os }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module(
name = "bzlmodrio-ni",
version = "2025.0.0",
version = "2025.2.0",
compatibility_level = 2025,
)

bazel_dep(name = "platforms", version = "0.0.9")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_java", version = "7.6.5")
bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1.bcr1")
bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2025-1.bcr1")

setup_bzlmodrio_ni_cpp_dependencies = use_extension("//:maven_cpp_deps.bzl", "setup_bzlmodrio_ni_cpp_dependencies")
use_repo(
Expand Down
28 changes: 14 additions & 14 deletions maven_cpp_deps.bzl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions private/cpp/chipobject/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ cc_library(
"@bazel_tools//src/conditions:darwin": ["@platforms//:incompatible"],
"@bazel_tools//src/conditions:linux_x86_64": ["@platforms//:incompatible"],
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye32:bullseye32": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye64:bullseye64": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_raspi32:raspi32": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bookworm64:bookworm64": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_raspibookworm32:raspibookworm32": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
visibility = ["@bzlmodrio-ni//:__subpackages__"],
Expand Down
5 changes: 2 additions & 3 deletions private/cpp/netcomm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ cc_library(
"@bazel_tools//src/conditions:darwin": ["@platforms//:incompatible"],
"@bazel_tools//src/conditions:linux_x86_64": ["@platforms//:incompatible"],
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye32:bullseye32": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye64:bullseye64": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_raspi32:raspi32": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bookworm64:bookworm64": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_raspibookworm32:raspibookworm32": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
visibility = ["@bzlmodrio-ni//:__subpackages__"],
Expand Down
5 changes: 2 additions & 3 deletions private/cpp/runtime/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ cc_library(
"@bazel_tools//src/conditions:darwin": ["@platforms//:incompatible"],
"@bazel_tools//src/conditions:linux_x86_64": ["@platforms//:incompatible"],
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye32:bullseye32": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye64:bullseye64": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_raspi32:raspi32": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bookworm64:bookworm64": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_raspibookworm32:raspibookworm32": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
visibility = ["@bzlmodrio-ni//:__subpackages__"],
Expand Down
5 changes: 2 additions & 3 deletions private/cpp/visa/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ cc_library(
"@bazel_tools//src/conditions:darwin": ["@platforms//:incompatible"],
"@bazel_tools//src/conditions:linux_x86_64": ["@platforms//:incompatible"],
"@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye32:bullseye32": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye64:bullseye64": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_raspi32:raspi32": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_bookworm64:bookworm64": ["@platforms//:incompatible"],
"@rules_bzlmodrio_toolchains//constraints/is_raspibookworm32:raspibookworm32": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
visibility = ["@bzlmodrio-ni//:__subpackages__"],
Expand Down
4 changes: 2 additions & 2 deletions private/non_bzlmod_dependencies/download_dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def download_dependencies():
# Roborio Toolchain
http_archive(
name = "rules_bzlmodrio_toolchains",
sha256 = "2ef1cafce7f4fd4e909bb5de8b0dc771a934646afd55d5f100ff31f6b500df98",
url = "https://github.com/wpilibsuite/rules_bzlmodRio_toolchains/releases/download/2024-1.bcr1/rules_bzlmodRio_toolchains-2024-1.bcr1.tar.gz",
sha256 = "559ff5ddc402dca6266a765770c3a65db23e2060c45355c57612737bcc592b78",
url = "https://github.com/wpilibsuite/rules_bzlmodRio_toolchains/releases/download/2025-1.bcr1/rules_bzlmodRio_toolchains-2025-1.bcr1.tar.gz",
)

########################
Expand Down
15 changes: 12 additions & 3 deletions private/non_bzlmod_dependencies/setup_dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,24 @@ def _setup_toolchains():
"@local_roborio//:macos",
"@local_roborio//:linux",
"@local_roborio//:windows",
"@local_raspi_32//:macos",
"@local_raspi_32//:linux",
"@local_raspi_32//:windows",
"@local_raspi_bookworm_32//:macos",
"@local_raspi_bookworm_32//:linux",
"@local_raspi_bookworm_32//:windows",
"@local_raspi_bookworm_32//:macos",
"@local_raspi_bookworm_32//:linux",
"@local_raspi_bookworm_32//:windows",
"@local_bullseye_32//:macos",
"@local_bullseye_32//:linux",
"@local_bullseye_32//:windows",
"@local_bullseye_64//:macos",
"@local_bullseye_64//:linux",
"@local_bullseye_64//:windows",
"@local_bookworm_32//:macos",
"@local_bookworm_32//:linux",
"@local_bookworm_32//:windows",
"@local_bookworm_64//:macos",
"@local_bookworm_64//:linux",
"@local_bookworm_64//:windows",
)

def _setup_cpp_dependencies():
Expand Down
29 changes: 25 additions & 4 deletions tests/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,31 @@ build:bullseye64 --platforms=@rules_bzlmodrio_toolchains//platforms/bullseye64
build:bullseye64 --build_tag_filters=-no-bullseye
build:bullseye64 --platform_suffix=bullseye64

# rasppi
build:raspi32 --platforms=@rules_bzlmodrio_toolchains//platforms/raspi32
build:raspi32 --build_tag_filters=-no-raspi
build:raspi32 --platform_suffix=raspi32
# bookworm32
build:bookworm32 --platforms=@rules_bzlmodrio_toolchains//platforms/bookworm32
build:bookworm32 --build_tag_filters=-no-bookworm
build:bookworm32 --platform_suffix=bookworm32

# bookworm64
build:bookworm64 --platforms=@rules_bzlmodrio_toolchains//platforms/bookworm64
build:bookworm64 --build_tag_filters=-no-bookworm
build:bookworm64 --platform_suffix=bookworm64

# rasppi bullseye
build:raspibullseye32 --platforms=@rules_bzlmodrio_toolchains//platforms/raspibullseye32
build:raspibullseye32 --build_tag_filters=-no-raspi
build:raspibullseye32 --platform_suffix=raspibullseye32

# rasppi bookworm
build:raspibookworm32 --platforms=@rules_bzlmodrio_toolchains//platforms/raspibookworm32
build:raspibookworm32 --build_tag_filters=-no-raspi
build:raspibookworm32 --platform_suffix=raspibookworm32

# Alias toolchain names to what wpilibsuite uses for CI/Artifact naming
build:athena --config=roborio
build:systemcore --config=bookworm64
build:linuxarm32 --config=raspibookworm32
build:linuxarm64 --config=bookworm64

test --test_output=errors
common --registry=https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/
Loading

0 comments on commit 8b19e6e

Please sign in to comment.