Skip to content

Commit 844c9c4

Browse files
authored
Update to 4.6.0-5 (#5)
* Regen * Update version * Update version * Add version getter to gen
1 parent 5fa571f commit 844c9c4

15 files changed

+180
-89
lines changed

.bazelrc

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ build:windows --copt=/std:c++20
55
build:windows --copt=/Zc:preprocessor
66
build:windows --copt=/wd5105
77

8+
# Windows Arm
9+
build:windows_arm --copt=/std:c++20
10+
build:windows_arm --copt=/Zc:preprocessor
11+
build:windows_arm --copt=/wd5105
12+
build:windows_arm --cpu=x64_arm64_windows
13+
814
# Linux
915
build:linux --copt=-std=c++20
1016
build:linux --linkopt=-pthread
@@ -13,27 +19,31 @@ build:linux --linkopt=-pthread
1319
build:macos --copt=-std=c++20
1420

1521
# Roborio
22+
build:roborio --incompatible_enable_cc_toolchain_resolution
1623
build:roborio --copt=-std=c++20
1724
build:roborio --platforms=@rules_bzlmodrio_toolchains//platforms/roborio
1825
build:roborio --build_tag_filters=-no-roborio
1926
build:roborio --features=compiler_param_file
2027
build:roborio --platform_suffix=roborio
2128

2229
# bullseye32
30+
build:bullseye32 --incompatible_enable_cc_toolchain_resolution
2331
build:bullseye32 --copt=-std=c++20
2432
build:bullseye32 --platforms=@rules_bzlmodrio_toolchains//platforms/bullseye32
2533
build:bullseye32 --build_tag_filters=-no-bullseye
2634
build:bullseye32 --features=compiler_param_file
2735
build:bullseye32 --platform_suffix=bullseye32
2836

2937
# bullseye64
38+
build:bullseye64 --incompatible_enable_cc_toolchain_resolution
3039
build:bullseye64 --copt=-std=c++20
3140
build:bullseye64 --platforms=@rules_bzlmodrio_toolchains//platforms/bullseye64
3241
build:bullseye64 --build_tag_filters=-no-bullseye
3342
build:bullseye64 --features=compiler_param_file
3443
build:bullseye64 --platform_suffix=bullseye64
3544

3645
# rasppi
46+
build:raspi32 --incompatible_enable_cc_toolchain_resolution
3747
build:raspi32 --copt=-std=c++20
3848
build:raspi32 --platforms=@rules_bzlmodrio_toolchains//platforms/raspi32
3949
build:raspi32 --build_tag_filters=-no-raspi
@@ -43,6 +53,5 @@ build:raspi32 --platform_suffix=raspi32
4353
# Global
4454
import .bazelrc-buildbuddy
4555
test --test_output=errors
46-
build --incompatible_enable_cc_toolchain_resolution
4756
build --java_language_version=11
4857
build --registry=https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/

.github/workflows/auto_update.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ jobs:
6868
fi;
6969
working-directory: libraries/bzlmodrio-opencv/generate
7070

71+
- name: Store new version
72+
run: echo "NEW_VERSION=$(bazel run //:get_version)" >> $GITHUB_ENV
73+
working-directory: libraries/bzlmodrio-opencv/generate
7174

7275
# Create pull requests
7376
- name: Create Pull Request
@@ -80,4 +83,4 @@ jobs:
8083
token: ${{ secrets.AUTO_UPDATE_KEY }}
8184
reviewers: pjreiniger
8285
branch: autoupdate
83-
title: "Auto-update"
86+
title: "Auto Update to '${{ env.NEW_VERSION }}'"

.github/workflows/build.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@ jobs:
1212
matrix:
1313
include:
1414
# Build standard, native
15-
- { name: "windows - native", os: windows-2019, command: "test", config: "--config=windows", bazel_options: "--output_user_root=C:\\bazelroot", }
16-
- { name: "ubuntu - native", os: ubuntu-latest, command: "test", config: "--config=linux", bazel_options: "", }
17-
- { name: "macos - native", os: macos-latest, command: "test", config: "--config=macos", bazel_options: "", }
15+
- { name: "windows - native", os: windows-2019, command: "test", config: "--config=windows", bazel_options: "--output_user_root=C:\\bazelroot", }
16+
- { name: "windows arm - native", os: windows-2019, command: "build", config: "--config=windows_arm", bazel_options: "--output_user_root=C:\\bazelroot", }
17+
- { name: "ubuntu - native", os: ubuntu-latest, command: "test", config: "--config=linux", bazel_options: "", }
18+
- { name: "macos - native", os: macos-latest, command: "test", config: "--config=macos", bazel_options: "", }
1819

1920
# Build bzlmod, native
20-
- { name: "windows - bzlmod native", os: windows-2019, command: "test", config: "--enable_bzlmod --config=windows", bazel_options: "--output_user_root=C:\\bazelroot", }
21-
- { name: "ubuntu - bzlmod native", os: ubuntu-latest, command: "test", config: "--enable_bzlmod --config=linux", bazel_options: "", }
22-
- { name: "macos - bzlmod native", os: macos-latest, command: "test", config: "--enable_bzlmod --config=macos", bazel_options: "", }
21+
- { name: "windows - bzlmod native", os: windows-2019, command: "test", config: "--enable_bzlmod --config=windows", bazel_options: "--output_user_root=C:\\bazelroot", }
22+
- { name: "windows arm - bzlmod native", os: windows-2019, command: "build", config: "--enable_bzlmod --config=windows_arm", bazel_options: "--output_user_root=C:\\bazelroot", }
23+
- { name: "ubuntu - bzlmod native", os: ubuntu-latest, command: "test", config: "--enable_bzlmod --config=linux", bazel_options: "", }
24+
- { name: "macos - bzlmod native", os: macos-latest, command: "test", config: "--enable_bzlmod --config=macos", bazel_options: "", }
2325

2426
name: "Build - ${{ matrix.name }}"
2527
runs-on: ${{ matrix.os }}
2628
steps:
2729
- uses: actions/checkout@v3
2830
- uses: actions/setup-python@v4
29-
- run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} @bzlmodrio-opencv//...
31+
- run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --config=remote @bzlmodrio-opencv//...
3032
working-directory: tests
3133
- run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --verbose_failures --config=remote //... || true
3234
working-directory: tests

.github/workflows/publish.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ jobs:
5353
- run: bazel run //:publish
5454
working-directory: libraries/bzlmodrio-opencv/generate
5555

56+
- name: Store version
57+
run: echo "NEW_VERSION=$(bazel run //:get_version)" >> $GITHUB_ENV
58+
working-directory: libraries/bzlmodrio-opencv/generate
59+
60+
5661
# Create pull requests
5762
- name: Create Gentool Pull Request
5863
uses: peter-evans/create-pull-request@v4
@@ -64,7 +69,7 @@ jobs:
6469
token: ${{ secrets.AUTO_UPDATE_KEY }}
6570
reviewers: pjreiniger
6671
branch: autoupdate/bzlmodrio-opencv_update
67-
title: "Auto-update latest bzlmodrio-opencv module release"
72+
title: "Auto Update bzlmodrio-opencv module to '${{ env.NEW_VERSION }}'"
6873

6974
- name: Create BCR Pull Request
7075
uses: peter-evans/create-pull-request@v4
@@ -76,4 +81,4 @@ jobs:
7681
token: ${{ secrets.AUTO_UPDATE_KEY }}
7782
reviewers: pjreiniger
7883
branch: autoupdate/bzlmodrio-opencv_update
79-
title: "Auto-update latest bzlmodrio-opencv module release"
84+
title: "Auto Update latest bzlmodrio-opencv to '${{ env.NEW_VERSION }}'"

MODULE.bazel

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module(
22
name = "bzlmodrio-opencv",
3-
version = "4.6.0-4",
3+
version = "4.6.0-5",
44
compatibility_level = 2023,
55
)
66

77
bazel_dep(name = "platforms", version = "0.0.6")
88
bazel_dep(name = "rules_cc", version = "0.0.6")
99
bazel_dep(name = "rules_java", version = "6.0.0")
10-
bazel_dep(name = "rules_bazelrio", version = "0.0.10")
10+
bazel_dep(name = "rules_bazelrio", version = "0.0.11")
1111
bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2023-7")
1212

1313
setup_bzlmodrio_opencv_cpp_dependencies = use_extension("//:maven_cpp_deps.bzl", "setup_bzlmodrio_opencv_cpp_dependencies")
@@ -39,6 +39,10 @@ use_repo(
3939
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversalstatic",
4040
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversalstaticdebug",
4141
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_sources",
42+
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64",
43+
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64debug",
44+
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64static",
45+
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64staticdebug",
4246
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86",
4347
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64",
4448
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64debug",

generate/BUILD.bazel

+10
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,13 @@ py_binary(
3535
"@bzlmodrio-gentool//bazelrio_gentool",
3636
],
3737
)
38+
39+
py_binary(
40+
name = "get_version",
41+
srcs = ["get_version.py"],
42+
visibility = ["//visibility:public"],
43+
deps = [
44+
":get_opencv_dependencies",
45+
"@bzlmodrio-gentool//bazelrio_gentool",
46+
],
47+
)

generate/generate.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ def main():
2525
mandatory_dependencies = create_default_mandatory_settings(GenericCliArgs(args))
2626

2727
clean_existing_version(REPO_DIR)
28-
generate_module_project_files(REPO_DIR, group, mandatory_dependencies)
28+
generate_module_project_files(
29+
REPO_DIR, group, mandatory_dependencies, include_windows_arm_compiler=True
30+
)
2931
generate_group(output_dir, group, force_tests=args.force_tests)
3032

3133

generate/get_opencv_dependencies.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def _default_native_shared_platforms():
1010
"osxuniversal",
1111
"windowsx86-64",
1212
"windowsx86",
13+
"windowsarm64",
1314
]
1415

1516

@@ -45,7 +46,7 @@ def _default_all_platforms():
4546

4647
def get_opencv_dependencies():
4748
year = "2023"
48-
version = "4.6.0-4"
49+
version = "4.6.0-5"
4950
patch = ""
5051

5152
group_id = f"edu.wpi.first.thirdparty.frc{year}.opencv"

generate/get_version.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from get_opencv_dependencies import get_opencv_dependencies
2+
3+
4+
def main():
5+
group = get_opencv_dependencies()
6+
print(group.version)
7+
8+
9+
if __name__ == "__main__":
10+
main()

0 commit comments

Comments
 (0)