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

Regeneration, got working with allwpilib #3

Merged
merged 11 commits into from
May 6, 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
66 changes: 4 additions & 62 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,85 +1,27 @@
try-import user.bazelrc

# build --javacopt=-Werror
build --javacopt=-Xlint:all,-serial,-processing,-options

# Windows
build:windows --copt=/W3
build:windows --copt=/WX
build:windows --copt=/std:c++20
build:windows --copt=/Zc:preprocessor
build:windows --copt=/wd5105
build:windows --cxxopt=/wd4146
build:windows --cxxopt=/wd4267
build:windows --cxxopt=/wd4244

# Windows Arm
build:windows_arm --copt=/W3
build:windows_arm --copt=/WX
build:windows_arm --copt=/std:c++20
build:windows_arm --copt=/Zc:preprocessor
build:windows_arm --copt=/wd5105
build:windows_arm --cxxopt=/wd4146
build:windows_arm --cxxopt=/wd4267
build:windows_arm --cxxopt=/wd4244
build:windows_arm --cpu=x64_arm64_windows

# Linux
build:linux --copt=-Wall
build:linux --copt=-Wextra
build:linux --copt=-Werror
build:linux --copt=-std=c++20
build:linux --linkopt=-pthread

# MacOS
build:macos --copt=-Wall
build:macos --copt=-Wextra
build:macos --copt=-Werror
build:macos --copt=-std=c++20
build:macos --cxxopt=-Wno-unused-parameter
build:macos --cxxopt=-Wno-error=deprecated-declarations
build:macos --cxxopt=-Wno-error=deprecated-enum-enum-conversion
build:macos --cxxopt=-Wno-error=deprecated-anon-enum-enum-conversion
build:macos --cxxopt=-Wno-error=inconsistent-missing-override
build:macos --cxxopt=-Wno-error=overloaded-virtual
import .bazelrc-cc
import .bazelrc-java
import .bazelrc-buildbuddy

# Roborio
build:roborio --incompatible_enable_cc_toolchain_resolution
build:roborio --copt=-std=c++20
build:roborio --platforms=@rules_bzlmodrio_toolchains//platforms/roborio
build:roborio --build_tag_filters=-no-roborio
build:roborio --features=compiler_param_file
build:roborio --platform_suffix=roborio

# bullseye32
build:bullseye32 --incompatible_enable_cc_toolchain_resolution
build:bullseye32 --copt=-std=c++20
build:bullseye32 --platforms=@rules_bzlmodrio_toolchains//platforms/bullseye32
build:bullseye32 --build_tag_filters=-no-bullseye
build:bullseye32 --features=compiler_param_file
build:bullseye32 --platform_suffix=bullseye32

# bullseye64
build:bullseye64 --incompatible_enable_cc_toolchain_resolution
build:bullseye64 --copt=-std=c++20
build:bullseye64 --platforms=@rules_bzlmodrio_toolchains//platforms/bullseye64
build:bullseye64 --build_tag_filters=-no-bullseye
build:bullseye64 --features=compiler_param_file
build:bullseye64 --platform_suffix=bullseye64

# rasppi
build:raspi32 --incompatible_enable_cc_toolchain_resolution
build:raspi32 --copt=-std=c++20
build:raspi32 --platforms=@rules_bzlmodrio_toolchains//platforms/raspi32
build:raspi32 --build_tag_filters=-no-raspi
build:raspi32 --features=compiler_param_file
build:raspi32 --platform_suffix=raspi32

# Global
import .bazelrc-buildbuddy
test --test_output=errors
build --java_language_version=17
build --java_runtime_version=roboriojdk_17
build --tool_java_language_version=17
build --tool_java_runtime_version=roboriojdk_17
build --registry=https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/
common --registry=https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/
59 changes: 59 additions & 0 deletions .bazelrc-cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Windows
build:windows --copt=/W3
build:windows --copt=/WX
build:windows --copt=/std:c++20
build:windows --copt=/Zc:preprocessor
build:windows --copt=/wd5105
build:windows --cxxopt=/wd4146
build:windows --cxxopt=/wd4267
build:windows --cxxopt=/wd4244

# Windows Arm
build:windows_arm --copt=/W3
build:windows_arm --copt=/WX
build:windows_arm --copt=/std:c++20
build:windows_arm --copt=/Zc:preprocessor
build:windows_arm --copt=/wd5105
build:windows_arm --cxxopt=/wd4146
build:windows_arm --cxxopt=/wd4267
build:windows_arm --cxxopt=/wd4244
build:windows_arm --cpu=x64_arm64_windows

# Linux
build:linux --copt=-Wall
build:linux --copt=-Wextra
build:linux --copt=-Werror
build:linux --copt=-std=c++20
build:linux --linkopt=-pthread

# MacOS
build:macos --copt=-Wall
build:macos --copt=-Wextra
build:macos --copt=-Werror
build:macos --copt=-std=c++20
build:macos --cxxopt=-Wno-unused-parameter
build:macos --cxxopt=-Wno-error=deprecated-declarations
build:macos --cxxopt=-Wno-error=deprecated-enum-enum-conversion
build:macos --cxxopt=-Wno-error=deprecated-anon-enum-enum-conversion
build:macos --cxxopt=-Wno-error=inconsistent-missing-override
build:macos --cxxopt=-Wno-error=overloaded-virtual

# Roborio
build:roborio --incompatible_enable_cc_toolchain_resolution
build:roborio --copt=-std=c++20
build:roborio --features=compiler_param_file

# bullseye32
build:bullseye32 --incompatible_enable_cc_toolchain_resolution
build:bullseye32 --copt=-std=c++20
build:bullseye32 --features=compiler_param_file

# bullseye64
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
7 changes: 7 additions & 0 deletions .bazelrc-java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# build --javacopt=-Werror
build --javacopt=-Xlint:all,-processing

build --java_language_version=17
build --java_runtime_version=roboriojdk_17
build --tool_java_language_version=11
build --tool_java_runtime_version=remotejdk_11
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0
7.1.1
12 changes: 8 additions & 4 deletions .github/workflows/auto_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ concurrency:
jobs:
auto_update_module:
name: "Auto Update Module"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.20.x
uses: actions/setup-go@v4
with:
go-version: 1.20.x
id: go

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Buildifier
run: |
cd $(mktemp -d)
GO111MODULE=on go install github.com/bazelbuild/buildtools/buildifier@latest

# Checkout repository
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: rules/rules_bzlmodrio_jdk

# Checkout gentool
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'bzlmodRio/gentool.git'
fetch-depth: 0
Expand Down Expand Up @@ -67,6 +67,10 @@ jobs:
bazel build //... --nobuild --enable_bzlmod --lockfile_mode=update
cd tests
bazel build //... --nobuild --enable_bzlmod --lockfile_mode=update

# Pull requests won't be created if the github actions change. Since for this
# We mostly care about the actual code changes, we will just revert those files
git checkout ../.github/workflows
else
echo "No changes!"
fi;
Expand Down
Loading
Loading