diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 166f6bbd..69515797 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -47,24 +47,25 @@ jobs: build_system: cmake c_compiler: clang-15 cxx_compiler: clang++15 + os: ubuntu-22.04 - - name: cmake:clang15:asan + - name: cmake:clang:asan build_system: cmake sanitizer: address - c_compiler: clang-15 - cxx_compiler: clang++15 + c_compiler: clang + cxx_compiler: clang++ - - name: cmake:clang15:tsan + - name: cmake:clang:tsan build_system: cmake sanitizer: thread - c_compiler: clang-15 - cxx_compiler: clang++15 + c_compiler: clang + cxx_compiler: clang++ - - name: cmake:clang15:ubsan + - name: cmake:clang:ubsan build_system: cmake sanitizer: undefined - c_compiler: clang-15 - cxx_compiler: clang++-15 + c_compiler: clang + cxx_compiler: clang++ c_flags: -fno-sanitize-recover=undefined,integer - name: cmake:qemu-arm-neon-gcc @@ -98,10 +99,10 @@ jobs: cmake_config: Debug os: windows-latest - - name: fuzz:clang15 + - name: fuzz:clang build_system: fuzz - c_compiler: clang-15 - cxx_compiler: clang++15 + c_compiler: clang + cxx_compiler: clang++ # TODO: consider running this combination in docker #- name: python2.7:gcc5 @@ -131,11 +132,11 @@ jobs: # TODO: consider running this combination in docker #- name: python3.8:gcc5 - - name: python3.10:clang15 + - name: python3.10:clang build_system: python python_version: "3.10" - c_compiler: clang-15 - cxx_compiler: clang++-15 + c_compiler: clang + cxx_compiler: clang++ - name: python3.10-win build_system: python diff --git a/java/BUILD.bazel b/java/BUILD.bazel index d61dce55..f9f76ad6 100644 --- a/java/BUILD.bazel +++ b/java/BUILD.bazel @@ -6,7 +6,7 @@ package( genrule( name = "copy_link_jni_header", - srcs = ["@openjdk_jni_h//file"], + srcs = ["@bazel_tools//tools/jdk:jni_header"], outs = ["jni/jni.h"], cmd = "cp -f $< $@", ) @@ -14,9 +14,11 @@ genrule( genrule( name = "copy_link_jni_md_header", srcs = select({ - "@platforms//os:macos": ["@openjdk_macosx_jni_md_h//file"], - "@platforms//os:windows": ["@openjdk_windows_jni_md_h//file"], - "//conditions:default": ["@openjdk_solaris_jni_md_h//file"], + "@bazel_tools//src/conditions:darwin": ["@bazel_tools//tools/jdk:jni_md_header-darwin"], + "@bazel_tools//src/conditions:freebsd": ["@bazel_tools//tools/jdk:jni_md_header-freebsd"], + "@bazel_tools//src/conditions:openbsd": ["@bazel_tools//tools/jdk:jni_md_header-openbsd"], + "@bazel_tools//src/conditions:windows": ["@bazel_tools//tools/jdk:jni_md_header-windows"], + "//conditions:default": ["@bazel_tools//tools/jdk:jni_md_header-linux"], }), outs = ["jni/jni_md.h"], cmd = "cp -f $< $@", diff --git a/java/MODULE.bazel b/java/MODULE.bazel index 070c34f8..720f76b3 100644 --- a/java/MODULE.bazel +++ b/java/MODULE.bazel @@ -21,14 +21,3 @@ local_path_override( module_name = "brotli", path = "..", ) - -maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") -maven.install( - name = "brotli_maven", - artifacts = ["junit:junit:4.13.2"], - repositories = [ - "https://maven.google.com", - "https://repo1.maven.org/maven2" - ], -) -use_repo(maven, "brotli_maven") diff --git a/java/org/brotli/dec/BUILD.bazel b/java/org/brotli/dec/BUILD.bazel index 8ba1b682..9f8253a1 100644 --- a/java/org/brotli/dec/BUILD.bazel +++ b/java/org/brotli/dec/BUILD.bazel @@ -10,7 +10,6 @@ licenses(["notice"]) # MIT TEST_DEPS = [ ":dec", ":test_utils", - "@maven//:junit_junit", ] java_library( diff --git a/java/org/brotli/pom.xml b/java/org/brotli/pom.xml index 2a208e49..2add993a 100644 --- a/java/org/brotli/pom.xml +++ b/java/org/brotli/pom.xml @@ -80,8 +80,8 @@ maven-compiler-plugin 3.1 - 1.6 - 1.6 + 1.7 + 1.7 diff --git a/java/org/brotli/wrapper/common/BUILD.bazel b/java/org/brotli/wrapper/common/BUILD.bazel index eeaa4749..c5267c96 100644 --- a/java/org/brotli/wrapper/common/BUILD.bazel +++ b/java/org/brotli/wrapper/common/BUILD.bazel @@ -30,7 +30,7 @@ java_library( "//org/brotli/dec", "//org/brotli/integration:brotli_jni_test_base", "//org/brotli/wrapper/dec", - "@maven//:junit_junit", + "@bazel_tools//tools/jdk:TestRunner", ], ) diff --git a/java/org/brotli/wrapper/dec/BUILD.bazel b/java/org/brotli/wrapper/dec/BUILD.bazel index ca902f7e..7ce7a9d7 100644 --- a/java/org/brotli/wrapper/dec/BUILD.bazel +++ b/java/org/brotli/wrapper/dec/BUILD.bazel @@ -30,7 +30,7 @@ java_library( "//org/brotli/integration:brotli_jni_test_base", "//org/brotli/integration:bundle_helper", "//org/brotli/wrapper/enc", - "@maven//:junit_junit", + "@bazel_tools//tools/jdk:TestRunner", ], ) diff --git a/java/org/brotli/wrapper/enc/BUILD.bazel b/java/org/brotli/wrapper/enc/BUILD.bazel index b8500c78..9146f405 100644 --- a/java/org/brotli/wrapper/enc/BUILD.bazel +++ b/java/org/brotli/wrapper/enc/BUILD.bazel @@ -37,7 +37,7 @@ java_library( "//org/brotli/integration:bundle_helper", "//org/brotli/wrapper/common", "//org/brotli/wrapper/dec", - "@maven//:junit_junit", + "@bazel_tools//tools/jdk:TestRunner", ], ) diff --git a/research/BUILD.bazel b/research/BUILD.bazel index ef6967e7..6babeb71 100644 --- a/research/BUILD.bazel +++ b/research/BUILD.bazel @@ -15,7 +15,7 @@ cc_library( name = "durchschlag", srcs = ["durchschlag.cc"], hdrs = ["durchschlag.h"], - deps = ["@divsufsort//:libdivsufsort"], + deps = ["@divsufsort//:divsufsort"], ) cc_library( diff --git a/research/BUILD.libdivsufsort b/research/BUILD.libdivsufsort deleted file mode 100644 index aeea9235..00000000 --- a/research/BUILD.libdivsufsort +++ /dev/null @@ -1,57 +0,0 @@ -package( - default_visibility = ["//visibility:public"], -) - -cc_library( - name = "libdivsufsort", - srcs = [ - "lib/divsufsort.c", - "lib/sssort.c", - "lib/trsort.c", - "lib/utils.c", - ], - hdrs = [ - "include/config.h", - "include/divsufsort.h", - "include/divsufsort_private.h", - ], - copts = [ - "-DHAVE_CONFIG_H=1", - ], - includes = ["include"], - include_prefix = "third_party/libdivsufsort", -) - -commom_awk_replaces = ( - "gsub(/#cmakedefine/, \"#define\"); " + - "gsub(/@DIVSUFSORT_EXPORT@/, \"\"); " + - "gsub(/@DIVSUFSORT_IMPORT@/, \"\"); " + - "gsub(/@INLINE@/, \"inline\"); " + - "gsub(/@INCFILE@/, \"#include \"); " + - "gsub(/@SAUCHAR_TYPE@/, \"uint8_t\"); " + - "gsub(/@SAINT32_TYPE@/, \"int32_t\"); " + - "gsub(/@SAINT_PRId@/, \"PRId32\"); " -) - -genrule( - name = "config_h", - srcs = ["include/config.h.cmake"], - outs = ["include/config.h"], - cmd = ("awk '{ " + - "gsub(/HAVE_IO_H 1/, \"HAVE_IO_H 0\"); " + - "gsub(/HAVE_STRINGS_H 1/, \"HAVE_STRINGS_H 0\"); " + - commom_awk_replaces + - "print; }' $(<) > $(@)"), -) - -genrule( - name = "divsufsort_h", - srcs = ["include/divsufsort.h.cmake"], - outs = ["include/divsufsort.h"], - cmd = ("awk '{ " + - "gsub(/@W64BIT@/, \"\"); " + - "gsub(/@SAINDEX_TYPE@/, \"int32_t\"); " + - "gsub(/@SAINDEX_PRId@/, \"PRId32\"); " + - commom_awk_replaces + - "print; }' $(<) > $(@)"), -) diff --git a/research/MODULE.bazel b/research/MODULE.bazel index 4f5f1da4..fe5aa107 100644 --- a/research/MODULE.bazel +++ b/research/MODULE.bazel @@ -11,6 +11,9 @@ module( repo_name = "org_brotli_research", ) +bazel_dep(name = "divsufsort", version = "2.0.1") +bazel_dep(name = "esaxx", version = "20250106.0") + bazel_dep(name = "brotli", version = "1.1.0", repo_name = "org_brotli") local_path_override( module_name = "brotli", diff --git a/research/MODULE.bazel.lock b/research/MODULE.bazel.lock index 99f9358d..169c8194 100644 --- a/research/MODULE.bazel.lock +++ b/research/MODULE.bazel.lock @@ -34,6 +34,10 @@ "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/source.json": "f121b43eeefc7c29efbd51b83d08631e2347297c95aac9764a701f2a6a2bb953", "https://bcr.bazel.build/modules/buildozer/7.1.2/MODULE.bazel": "2e8dd40ede9c454042645fd8d8d0cd1527966aa5c919de86661e62953cd73d84", "https://bcr.bazel.build/modules/buildozer/7.1.2/source.json": "c9028a501d2db85793a6996205c8de120944f50a0d570438fcae0457a5f9d1f8", + "https://bcr.bazel.build/modules/divsufsort/2.0.1/MODULE.bazel": "0feb8962aa29419e96f03dabccc31671c3b3d76b4669030e2418ac5a4aa366db", + "https://bcr.bazel.build/modules/divsufsort/2.0.1/source.json": "1eabf2d0b005fab9764516471d70bdf6e3cdf87094f895c9fc67268fa80b5150", + "https://bcr.bazel.build/modules/esaxx/20250106.0/MODULE.bazel": "6e48c927b0b978d49c616879f4751d839977ca0fd16622eb7bc6ee2590dd820c", + "https://bcr.bazel.build/modules/esaxx/20250106.0/source.json": "72ee278836653d5ac2e11130d14c88cb5947bcafe11adab34f5185265e876399", "https://bcr.bazel.build/modules/google_benchmark/1.8.2/MODULE.bazel": "a70cf1bba851000ba93b58ae2f6d76490a9feb74192e57ab8e8ff13c34ec50cb", "https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4", "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/MODULE.bazel": "22c31a561553727960057361aa33bf20fb2e98584bc4fec007906e27053f80c6",