Skip to content

Commit

Permalink
Update for toolchain update (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreiniger authored Oct 2, 2024
1 parent ec1b580 commit 9a157ed
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 55 deletions.
1 change: 0 additions & 1 deletion .bazelrc-buildbuddy
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ build:remote_user --remote_download_toplevel
build:ci --config=build_buddy
build:ci --remote_download_minimal
build:ci --build_metadata=ROLE=CI
build:ci --remote_download_minimal
2 changes: 1 addition & 1 deletion .github/actions/setup-build-buddy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
run: |
echo "No API key secret detected, will setup readonly cache"
echo "build:ci --config=build_buddy_readonly" > .buildbuddy-auth.rc
echo "build:ci --config=build_buddy_readonly"" > tests/.buildbuddy-auth.rc
echo "build:ci --config=build_buddy_readonly" > tests/.buildbuddy-auth.rc
- name: Set with key
env:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Module
on:
workflow_dispatch:
push:
tags:
- '*'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
publish_module:
name: "Publish Module"
runs-on: ubuntu-22.04
steps:
# Checkout repository
- uses: actions/checkout@v4
with:
path: libraries/bzlmodrio-opencv

- name: Create Archive
run: git archive HEAD --format=tar.gz --output="bzlmodrio-opencv-${GITHUB_REF_NAME}.tar.gz"
working-directory: libraries/bzlmodrio-opencv

- name: Setup archive name
run: echo "ARCHIVE_NAME=libraries/bzlmodrio-opencv/bzlmodrio-opencv-${GITHUB_REF_NAME}.tar.gz" >> "$GITHUB_ENV"

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: "${{ env.ARCHIVE_NAME }}"
3 changes: 1 addition & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ module(
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_bazelrio", version = "0.0.14")
bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1")
bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1.bcr1")

setup_bzlmodrio_opencv_cpp_dependencies = use_extension("//:maven_cpp_deps.bzl", "setup_bzlmodrio_opencv_cpp_dependencies")
use_repo(
Expand Down
12 changes: 6 additions & 6 deletions MODULE.bazel.lock

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

58 changes: 29 additions & 29 deletions private/cpp/opencv/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ alias(
cc_library(
name = "shared_interface",
srcs = select({
"@rules_bazelrio//conditions:windows": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64//:shared_interface"],
"@rules_bazelrio//conditions:windows_arm64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64//:shared_interface"],
"@rules_bazelrio//conditions:windows_arm64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64debug//:shared_interface"],
"@rules_bazelrio//conditions:windows_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64debug//:shared_interface"],
"@rules_bzlmodrio_toolchains//conditions:windows": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64//:shared_interface"],
"@rules_bzlmodrio_toolchains//conditions:windows_arm64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64//:shared_interface"],
"@rules_bzlmodrio_toolchains//conditions:windows_arm64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64debug//:shared_interface"],
"@rules_bzlmodrio_toolchains//conditions:windows_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64debug//:shared_interface"],
}),
linkstatic = True,
tags = ["manual"],
Expand All @@ -27,14 +27,14 @@ cc_library(
filegroup(
name = "shared_raw",
srcs = select({
"@rules_bazelrio//conditions:linux_x86_64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64//:shared"],
"@rules_bazelrio//conditions:linux_x86_64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64debug//:shared"],
"@rules_bazelrio//conditions:osx": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversal//:shared"],
"@rules_bazelrio//conditions:osx_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversaldebug//:shared"],
"@rules_bazelrio//conditions:windows": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64//:shared"],
"@rules_bazelrio//conditions:windows_arm64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64//:shared"],
"@rules_bazelrio//conditions:windows_arm64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64debug//:shared"],
"@rules_bazelrio//conditions:windows_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64debug//:shared"],
"@rules_bzlmodrio_toolchains//conditions:linux_x86_64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64//:shared"],
"@rules_bzlmodrio_toolchains//conditions:linux_x86_64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64debug//:shared"],
"@rules_bzlmodrio_toolchains//conditions:osx": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversal//:shared"],
"@rules_bzlmodrio_toolchains//conditions:osx_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversaldebug//:shared"],
"@rules_bzlmodrio_toolchains//conditions:windows": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64//:shared"],
"@rules_bzlmodrio_toolchains//conditions:windows_arm64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64//:shared"],
"@rules_bzlmodrio_toolchains//conditions:windows_arm64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64debug//:shared"],
"@rules_bzlmodrio_toolchains//conditions:windows_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64debug//:shared"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye32:bullseye32": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxarm32//:shared"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye32:bullseye32_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxarm32debug//:shared"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye64:bullseye64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxarm64//:shared"],
Expand All @@ -55,7 +55,7 @@ cc_library(
}),
visibility = ["@bzlmodrio-opencv//:__subpackages__"],
deps = [] + select({
"@rules_bazelrio//conditions:windows": [":shared_interface"],
"@rules_bzlmodrio_toolchains//conditions:windows": [":shared_interface"],
"//conditions:default": [],
}) + ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_headers//:headers"],
alwayslink = 1,
Expand All @@ -70,14 +70,14 @@ cc_library(
}),
visibility = ["@bzlmodrio-opencv//:__subpackages__"],
deps = ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_headers//:headers"] + select({
"@rules_bazelrio//conditions:linux_x86_64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64static//:static_libs"],
"@rules_bazelrio//conditions:linux_x86_64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64staticdebug//:static_libs"],
"@rules_bazelrio//conditions:osx": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversalstatic//:static_libs"],
"@rules_bazelrio//conditions:osx_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversalstaticdebug//:static_libs"],
"@rules_bazelrio//conditions:windows": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64static//:static_libs"],
"@rules_bazelrio//conditions:windows_arm64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64static//:static_libs"],
"@rules_bazelrio//conditions:windows_arm64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64staticdebug//:static_libs"],
"@rules_bazelrio//conditions:windows_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64staticdebug//:static_libs"],
"@rules_bzlmodrio_toolchains//conditions:linux_x86_64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64static//:static_libs"],
"@rules_bzlmodrio_toolchains//conditions:linux_x86_64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64staticdebug//:static_libs"],
"@rules_bzlmodrio_toolchains//conditions:osx": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversalstatic//:static_libs"],
"@rules_bzlmodrio_toolchains//conditions:osx_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversalstaticdebug//:static_libs"],
"@rules_bzlmodrio_toolchains//conditions:windows": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64static//:static_libs"],
"@rules_bzlmodrio_toolchains//conditions:windows_arm64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64static//:static_libs"],
"@rules_bzlmodrio_toolchains//conditions:windows_arm64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64staticdebug//:static_libs"],
"@rules_bzlmodrio_toolchains//conditions:windows_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64staticdebug//:static_libs"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye32:bullseye32": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxarm32static//:static_libs"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye32:bullseye32_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxarm32staticdebug//:static_libs"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye64:bullseye64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxarm64static//:static_libs"],
Expand All @@ -90,14 +90,14 @@ cc_library(
cc_library(
name = "jni",
srcs = select({
"@rules_bazelrio//conditions:linux_x86_64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64//:jni"],
"@rules_bazelrio//conditions:linux_x86_64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64debug//:jni"],
"@rules_bazelrio//conditions:osx": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversal//:jni"],
"@rules_bazelrio//conditions:osx_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversaldebug//:jni"],
"@rules_bazelrio//conditions:windows": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64//:jni"],
"@rules_bazelrio//conditions:windows_arm64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64//:jni"],
"@rules_bazelrio//conditions:windows_arm64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64debug//:jni"],
"@rules_bazelrio//conditions:windows_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64debug//:jni"],
"@rules_bzlmodrio_toolchains//conditions:linux_x86_64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64//:jni"],
"@rules_bzlmodrio_toolchains//conditions:linux_x86_64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxx86-64debug//:jni"],
"@rules_bzlmodrio_toolchains//conditions:osx": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversal//:jni"],
"@rules_bzlmodrio_toolchains//conditions:osx_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_osxuniversaldebug//:jni"],
"@rules_bzlmodrio_toolchains//conditions:windows": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64//:jni"],
"@rules_bzlmodrio_toolchains//conditions:windows_arm64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64//:jni"],
"@rules_bzlmodrio_toolchains//conditions:windows_arm64_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsarm64debug//:jni"],
"@rules_bzlmodrio_toolchains//conditions:windows_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_windowsx86-64debug//:jni"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye32:bullseye32": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxarm32//:jni"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye32:bullseye32_debug": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxarm32debug//:jni"],
"@rules_bzlmodrio_toolchains//constraints/is_bullseye64:bullseye64": ["@bazelrio_edu_wpi_first_thirdparty_frc_opencv_opencv-cpp_linuxarm64//:jni"],
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 = "cd3ff046427e9c6dbc0c86a458c8cf081b8045fc3fb4265d08c0ebfc17f9cb30",
url = "https://github.com/bzlmodRio/rules_bzlmodRio_toolchains/releases/download/2024-1/rules_bzlmodRio_toolchains-2024-1.tar.gz",
sha256 = "2ef1cafce7f4fd4e909bb5de8b0dc771a934646afd55d5f100ff31f6b500df98",
url = "https://github.com/wpilibsuite/rules_bzlmodRio_toolchains/releases/download/2024-1.bcr1/rules_bzlmodRio_toolchains-2024-1.bcr1.tar.gz",
)

########################
Expand Down
1 change: 0 additions & 1 deletion tests/.bazelrc-buildbuddy
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ build:remote_user --remote_download_toplevel
build:ci --config=build_buddy
build:ci --remote_download_minimal
build:ci --build_metadata=ROLE=CI
build:ci --remote_download_minimal
2 changes: 1 addition & 1 deletion tests/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_java", version = "7.6.5")
bazel_dep(name = "rules_jvm_external", version = "6.1")
bazel_dep(name = "rules_bazelrio", version = "0.0.14")
bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1")
bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1.bcr1")
bazel_dep(name = "rules_pmd", version = "7.2.0")
bazel_dep(name = "rules_checkstyle", version = "10.12.2")
bazel_dep(name = "rules_wpiformat", version = "2024.34")
Expand Down
Loading

0 comments on commit 9a157ed

Please sign in to comment.