Skip to content

Commit

Permalink
Update to 4.6.0-5 (#5)
Browse files Browse the repository at this point in the history
* Regen

* Update version

* Update version

* Add version getter to gen
  • Loading branch information
pjreiniger authored Jun 22, 2023
1 parent 5fa571f commit 844c9c4
Show file tree
Hide file tree
Showing 15 changed files with 180 additions and 89 deletions.
11 changes: 10 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ build:windows --copt=/std:c++20
build:windows --copt=/Zc:preprocessor
build:windows --copt=/wd5105

# Windows Arm
build:windows_arm --copt=/std:c++20
build:windows_arm --copt=/Zc:preprocessor
build:windows_arm --copt=/wd5105
build:windows_arm --cpu=x64_arm64_windows

# Linux
build:linux --copt=-std=c++20
build:linux --linkopt=-pthread
Expand All @@ -13,27 +19,31 @@ build:linux --linkopt=-pthread
build:macos --copt=-std=c++20

# 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
Expand All @@ -43,6 +53,5 @@ build:raspi32 --platform_suffix=raspi32
# Global
import .bazelrc-buildbuddy
test --test_output=errors
build --incompatible_enable_cc_toolchain_resolution
build --java_language_version=11
build --registry=https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/
5 changes: 4 additions & 1 deletion .github/workflows/auto_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
fi;
working-directory: libraries/bzlmodrio-opencv/generate

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

# Create pull requests
- name: Create Pull Request
Expand All @@ -80,4 +83,4 @@ jobs:
token: ${{ secrets.AUTO_UPDATE_KEY }}
reviewers: pjreiniger
branch: autoupdate
title: "Auto-update"
title: "Auto Update to '${{ env.NEW_VERSION }}'"
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@ jobs:
matrix:
include:
# Build standard, native
- { name: "windows - native", os: windows-2019, command: "test", config: "--config=windows", bazel_options: "--output_user_root=C:\\bazelroot", }
- { name: "ubuntu - native", os: ubuntu-latest, command: "test", config: "--config=linux", bazel_options: "", }
- { name: "macos - native", os: macos-latest, command: "test", config: "--config=macos", bazel_options: "", }
- { name: "windows - native", os: windows-2019, command: "test", config: "--config=windows", bazel_options: "--output_user_root=C:\\bazelroot", }
- { name: "windows arm - native", os: windows-2019, command: "build", config: "--config=windows_arm", bazel_options: "--output_user_root=C:\\bazelroot", }
- { name: "ubuntu - native", os: ubuntu-latest, command: "test", config: "--config=linux", bazel_options: "", }
- { name: "macos - native", os: macos-latest, command: "test", config: "--config=macos", bazel_options: "", }

# Build bzlmod, native
- { name: "windows - bzlmod native", os: windows-2019, command: "test", config: "--enable_bzlmod --config=windows", bazel_options: "--output_user_root=C:\\bazelroot", }
- { name: "ubuntu - bzlmod native", os: ubuntu-latest, command: "test", config: "--enable_bzlmod --config=linux", bazel_options: "", }
- { name: "macos - bzlmod native", os: macos-latest, command: "test", config: "--enable_bzlmod --config=macos", bazel_options: "", }
- { name: "windows - bzlmod native", os: windows-2019, command: "test", config: "--enable_bzlmod --config=windows", bazel_options: "--output_user_root=C:\\bazelroot", }
- { name: "windows arm - bzlmod native", os: windows-2019, command: "build", config: "--enable_bzlmod --config=windows_arm", bazel_options: "--output_user_root=C:\\bazelroot", }
- { name: "ubuntu - bzlmod native", os: ubuntu-latest, command: "test", config: "--enable_bzlmod --config=linux", bazel_options: "", }
- { name: "macos - bzlmod native", os: macos-latest, command: "test", config: "--enable_bzlmod --config=macos", bazel_options: "", }

name: "Build - ${{ matrix.name }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} @bzlmodrio-opencv//...
- run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --config=remote @bzlmodrio-opencv//...
working-directory: tests
- run: bazel ${{ matrix.bazel_options }} build -k ${{ matrix.config }} --verbose_failures --config=remote //... || true
working-directory: tests
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ jobs:
- run: bazel run //:publish
working-directory: libraries/bzlmodrio-opencv/generate

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


# Create pull requests
- name: Create Gentool Pull Request
uses: peter-evans/create-pull-request@v4
Expand All @@ -64,7 +69,7 @@ jobs:
token: ${{ secrets.AUTO_UPDATE_KEY }}
reviewers: pjreiniger
branch: autoupdate/bzlmodrio-opencv_update
title: "Auto-update latest bzlmodrio-opencv module release"
title: "Auto Update bzlmodrio-opencv module to '${{ env.NEW_VERSION }}'"

- name: Create BCR Pull Request
uses: peter-evans/create-pull-request@v4
Expand All @@ -76,4 +81,4 @@ jobs:
token: ${{ secrets.AUTO_UPDATE_KEY }}
reviewers: pjreiniger
branch: autoupdate/bzlmodrio-opencv_update
title: "Auto-update latest bzlmodrio-opencv module release"
title: "Auto Update latest bzlmodrio-opencv to '${{ env.NEW_VERSION }}'"
8 changes: 6 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module(
name = "bzlmodrio-opencv",
version = "4.6.0-4",
version = "4.6.0-5",
compatibility_level = 2023,
)

bazel_dep(name = "platforms", version = "0.0.6")
bazel_dep(name = "rules_cc", version = "0.0.6")
bazel_dep(name = "rules_java", version = "6.0.0")
bazel_dep(name = "rules_bazelrio", version = "0.0.10")
bazel_dep(name = "rules_bazelrio", version = "0.0.11")
bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2023-7")

setup_bzlmodrio_opencv_cpp_dependencies = use_extension("//:maven_cpp_deps.bzl", "setup_bzlmodrio_opencv_cpp_dependencies")
Expand Down Expand Up @@ -39,6 +39,10 @@ use_repo(
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversalstatic",
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversalstaticdebug",
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_sources",
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64",
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64debug",
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64static",
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64staticdebug",
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86",
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64",
"bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64debug",
Expand Down
10 changes: 10 additions & 0 deletions generate/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,13 @@ py_binary(
"@bzlmodrio-gentool//bazelrio_gentool",
],
)

py_binary(
name = "get_version",
srcs = ["get_version.py"],
visibility = ["//visibility:public"],
deps = [
":get_opencv_dependencies",
"@bzlmodrio-gentool//bazelrio_gentool",
],
)
4 changes: 3 additions & 1 deletion generate/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def main():
mandatory_dependencies = create_default_mandatory_settings(GenericCliArgs(args))

clean_existing_version(REPO_DIR)
generate_module_project_files(REPO_DIR, group, mandatory_dependencies)
generate_module_project_files(
REPO_DIR, group, mandatory_dependencies, include_windows_arm_compiler=True
)
generate_group(output_dir, group, force_tests=args.force_tests)


Expand Down
3 changes: 2 additions & 1 deletion generate/get_opencv_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def _default_native_shared_platforms():
"osxuniversal",
"windowsx86-64",
"windowsx86",
"windowsarm64",
]


Expand Down Expand Up @@ -45,7 +46,7 @@ def _default_all_platforms():

def get_opencv_dependencies():
year = "2023"
version = "4.6.0-4"
version = "4.6.0-5"
patch = ""

group_id = f"edu.wpi.first.thirdparty.frc{year}.opencv"
Expand Down
10 changes: 10 additions & 0 deletions generate/get_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from get_opencv_dependencies import get_opencv_dependencies


def main():
group = get_opencv_dependencies()
print(group.version)


if __name__ == "__main__":
main()
Loading

0 comments on commit 844c9c4

Please sign in to comment.