Skip to content
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: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
multiplatform-build:
strategy:
matrix:
platform: [ ubuntu-22.04, ubuntu-24.04-arm ]
platform: [ ubuntu-24.04-arm ]

name: Ubuntu Alternate Builds
runs-on: ${{ matrix.platform }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
jobs:
formatting-check:
name: Formatting and FSM diagram generation with pre-commit-ci-lite
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: github.event.pull_request.draft == false
steps:
# checks-out the repository under $GITHUB_WORKSPACE
Expand Down
43 changes: 6 additions & 37 deletions environment_setup/setup_software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ source util.sh
g_arch=$(uname -m) # Global variable. No function should use this name.
print_status_msg "Detected architecture: ${g_arch}"

if [[ $(lsb_release -rs) == "20.04" ]] || [[ $(lsb_release -rs) == "22.04" ]]; then
print_status_msg "This version of ubuntu is not supported anymore, please upgrade your OS version"
exit 1
fi

print_status_msg "Installing Utilities and Dependencies"

sudo apt-get update
Expand Down Expand Up @@ -55,20 +60,13 @@ host_software_packages=(
g++-10
kcachegrind # This lets us view the profiles output by callgrind
libeigen3-dev # A math / numerical library used for things like linear regression
libprotobuf-dev
libudev-dev
libusb-1.0-0-dev
libxcb-cursor0 # This is used as the Linux platform abstraction by Qt
protobuf-compiler # This is required for the "NanoPb" library, which does not
# properly manage this as a bazel dependency, so we have
# to manually install it ourselves
python3.12 # Python 3
python3.12-dev # Python 3 headers
python3.12-venv # Virtual Environment
python3-pip # Required for bazel to install python dependencies for build targets
python3-protobuf # This is required for the "NanoPb" library, which does not
# properly manage this as a bazel dependency, so we have
# to manually install it ourselves
python3-yaml # Load dynamic parameter configuration files
valgrind # Checks for memory leaks
libsqlite3-dev # needed to build Python 3 with sqlite support
Expand All @@ -80,36 +78,16 @@ host_software_packages=(
xvfb # used for CI to run GUI applications
)

if [[ $(lsb_release -rs) == "20.04" ]]; then
# This is required for bazel, we've seen some issues where
# the bazel install hasn't installed it properly
host_software_packages+=(python-is-python3)

# This is to setup the toolchain for bazel to run
host_software_packages+=(clang)
host_software_packages+=(llvm-6.0)
host_software_packages+=(libclang-6.0-dev)
host_software_packages+=(libncurses5)

# This fixes missing headers by notifying the linker
sudo ldconfig
fi

# Clear the download cache
sudo rm -rf /tmp/tbots_download_cache
mkdir /tmp/tbots_download_cache

if [[ $(lsb_release -rs) == "22.04" ]] || [[ $(lsb_release -rs) == "24.04" ]]; then
if [[ $(lsb_release -rs) == "24.04" ]]; then
# This is required because a Braille TTY device that Linux provides a driver for conflicts with the ESP32
wget -nc https://github.com/UBC-Thunderbots/Software-External-Dependencies/blob/main/85-brltty.rules -O /tmp/tbots_download_cache/85-brltty.rules
sudo mv /tmp/tbots_download_cache/85-brltty.rules /usr/lib/udev/rules.d/85-brltty.rules
fi

if [[ $(lsb_release -rs) == "22.04" ]]; then
# This is required for clang-format
host_software_packages+=(libtinfo5)
fi

virtualenv_opt_args=""
if [[ $(lsb_release -rs) == "24.04" ]]; then
host_software_packages+=(python3-pyqt6)
Expand All @@ -135,20 +113,11 @@ if ! sudo /usr/bin/python3.12 -m venv /opt/tbotspython $virtualenv_opt_args ; th
exit 1
fi

if [[ $(lsb_release -rs) == "20.04" ]] || [[ $(lsb_release -rs) == "22.04" ]]; then
# Install pip if it is not a system-managed package
sudo /usr/bin/python3.12 -m ensurepip
fi

if ! sudo /opt/tbotspython/bin/python3 -m pip install --upgrade pip ; then
print_status_msg "Error: Upgrading pip version in venv failed"
exit 1
fi

if [[ $(lsb_release -rs) == "22.04" ]]; then
sudo /opt/tbotspython/bin/pip3 install -r ubuntu22_requirements.txt
fi

if [[ $(lsb_release -rs) == "24.04" ]]; then
sudo /opt/tbotspython/bin/pip3 install -r ubuntu24_requirements.txt
fi
Expand Down
2 changes: 1 addition & 1 deletion src/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ common --features=external_include_paths
build --disk_cache=~/.cache/thunderbots_bazel_disk_cache

build --experimental_remote_merkle_tree_cache # partial repo caching optimization
build --incompatible_enable_proto_toolchain_resolution # protoc caching
common --incompatible_enable_proto_toolchain_resolution # protoc caching

# Ensure that we don't accidentally build gRPC
common --per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
Expand Down
20 changes: 3 additions & 17 deletions src/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@ module(
##############################################################
# Import Dependencies available in the Bazel Central Registry
##############################################################

bazel_dep(name = "googletest", version = "1.15.2")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "pybind11_bazel", version = "2.13.6")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_pkg", version = "1.1.0")
bazel_dep(name = "rules_foreign_cc", version = "0.14.0")
bazel_dep(name = "rules_python", version = "1.4.1")
bazel_dep(name = "protobuf", version = "31.1")
bazel_dep(name = "eigen", version = "3.4.0.bcr.3")
bazel_dep(name = "zlib", version = "1.3.1.bcr.5")
bazel_dep(name = "nanopb", version = "0.4.9.1")
bazel_dep(name = "toolchains_protoc", version = "0.4.1")
bazel_dep(name = "zlib", version = "1.3.1.bcr.6")
bazel_dep(name = "nanopb", version = "0.4.9.1.bcr.2")
bazel_dep(name = "protobuf", version = "31.1")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "yaml-cpp", version = "0.8.0")
bazel_dep(name = "buildifier_prebuilt", version = "8.0.3")
Expand Down Expand Up @@ -79,18 +77,6 @@ use_repo(pip, "nanopb_deps")
pybind11_configure = use_extension("@pybind11_bazel//:internal_configure.bzl", "internal_configure_extension")
use_repo(pybind11_configure, "pybind11")

# Configure proto compiler optimization
# Optional: choose a version of protoc rather than the latest.
protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
protoc.toolchain(
# Creates a repository to satisfy well-known-types dependencies such as
# deps=["@com_google_protobuf//:any_proto"]
google_protobuf = "com_google_protobuf",
# Pin to any version of protoc
version = "v31.1",
)
use_repo(protoc, "com_google_protobuf", "toolchains_protoc_hub")

###########################################################################
# Setup non Bazel Central Registry dependencies & Non MODULE supported deps
###########################################################################
Expand Down
4 changes: 2 additions & 2 deletions src/MODULE.bazel.lock

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

Loading