Skip to content

Commit

Permalink
Merge branch 'AcademySoftwareFoundation:main' into ZSTD-Compression
Browse files Browse the repository at this point in the history
  • Loading branch information
TodicaIonut authored Oct 15, 2024
2 parents 98a4976 + bfbb035 commit cfa20e7
Show file tree
Hide file tree
Showing 25 changed files with 454 additions and 179 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.3.1
7.3.2
8 changes: 4 additions & 4 deletions .github/workflows/bazel_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Mount Bazel cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: "/home/runner/.cache/bazel"
key: bazel-ubuntu-22
Expand All @@ -60,7 +60,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Mount Bazel cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: "/home/runner/.cache/bazel"
key: bazel-windows-2022
Expand All @@ -78,7 +78,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Mount Bazel cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: "/home/runner/.cache/bazel"
key: bazel-macos-13
Expand All @@ -96,7 +96,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Mount Bazel cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: "/home/runner/.cache/bazel"
key: bazel-macos-14
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# cary: Pin the version to the SHA for 2.18.0, since there appears to
# be a problem with 2.18.1 leading to a "No space left on
# device" failure
uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
# cary: the "linked" setting is necessary to force the run to pick up
# the version specified in the action.
Expand Down Expand Up @@ -93,6 +93,6 @@ jobs:
- name: Perform CodeQL Analysis
# Pin the version to the SHA for 2.18.0
uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/ossfuzz_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
dry-run: false
language: c++
- name: Upload Crash
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/python-wheels-publish-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,23 @@ jobs:
run: pipx run build --sdist . --outdir wheelhouse

- name: Build wheel
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3
with:
output-dir: wheelhouse
env:
CIBW_ARCHS_LINUX: x86_64
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
# Build Python 3.7 through 3.11.
# Build Python 3.7 through 3.12.
# Skip python 3.6 since scikit-build-core requires 3.7+
# Skip 32-bit wheels builds on Windows
# Also skip the PyPy builds, since they fail the unit tests
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-*"
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*"
CIBW_SKIP: "*-win32 *_i686"
CIBW_TEST_SKIP: "*-macosx_universal2:arm64"
CIBW_ENVIRONMENT: OPENEXR_RELEASE_CANDIDATE_TAG="${{ github.ref_name }}"

- name: Upload artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: wheels-${{ matrix.os }}
path: |
Expand Down Expand Up @@ -101,6 +101,6 @@ jobs:
name: wheels-windows-latest
path: dist
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@897895f1e160c830e369f9779632ebc134688e1b # v1.10.2
uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3
with:
repository-url: https://test.pypi.org/legacy/
10 changes: 5 additions & 5 deletions .github/workflows/python-wheels-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ jobs:
run: pipx run build --sdist . --outdir wheelhouse

- name: Build wheel
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3
with:
output-dir: wheelhouse
env:
CIBW_ARCHS_LINUX: x86_64
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
# Build Python 3.7 through 3.11.
# Build Python 3.7 through 3.12.
# Skip python 3.6 since scikit-build-core requires 3.7+
# Skip 32-bit wheels builds on Windows
# Also skip the PyPy builds, since they fail the unit tests
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-*"
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*"
CIBW_SKIP: "*-win32 *_i686"
CIBW_TEST_SKIP: "*arm64"

- name: Upload artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: wheels-${{ matrix.os }}
path: |
Expand Down Expand Up @@ -94,4 +94,4 @@ jobs:
name: wheels-windows-latest
path: dist
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@897895f1e160c830e369f9779632ebc134688e1b # v1.10.2
uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3
8 changes: 4 additions & 4 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ jobs:
run: pipx run build --sdist . --outdir wheelhouse

- name: Build wheel
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3
env:
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
# Build Python 3.7 through 3.11.
# Build Python 3.7 through 3.12.
# Skip python 3.6 since scikit-build-core requires 3.7+
# Skip 32-bit wheels builds on Windows
# Also skip the PyPy builds, since they fail the unit tests
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-*"
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*"
CIBW_SKIP: "*-win32 *_i686"
CIBW_TEST_SKIP: "*-macosx*arm64"
OPENEXR_TEST_IMAGE_REPO: "https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/main"

- name: Upload artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: wheels-${{ matrix.os }}
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-notice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel: "#release-announcements"
project_logo: "https://artwork.aswf.io/projects/openexr/icon/color/openexr-icon-color.png"
uses: jmertic/slack-release-notifier@fbbf40c3020ca7707ae09ff9160206381c592fd7 # main
uses: jmertic/slack-release-notifier@7ed1272d4b089a8987b4c6880604cf63287b68b8 # main

- name: 'Notify Slack #openexr'
id: slack2
Expand All @@ -34,5 +34,5 @@ jobs:
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel: "#openexr"
project_logo: "https://artwork.aswf.io/projects/openexr/icon/color/openexr-icon-color.png"
uses: jmertic/slack-release-notifier@fbbf40c3020ca7707ae09ff9160206381c592fd7 # main
uses: jmertic/slack-release-notifier@7ed1272d4b089a8987b4c6880604cf63287b68b8 # main

4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ jobs:

# Upload the results as artifacts (optional)
- name: "Upload artifact"
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
with:
sarif_file: results.sarif
24 changes: 22 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ module(
)

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "imath", version = "3.1.12")
bazel_dep(name = "libdeflate", version = "1.21")
bazel_dep(name = "imath")
bazel_dep(name = "libdeflate")
bazel_dep(name = "platforms", version = "0.0.10")

archive_override(
module_name = "imath",
patches = [
"//bazel:imath_add_build_file.patch",
"//bazel:imath_module_dot_bazel.patch",
],
strip_prefix = "Imath-main",
urls = ["https://github.com/AcademySoftwareFoundation/Imath/archive/refs/heads/main.zip"],
)

archive_override(
module_name = "libdeflate",
patches = [
"//bazel:libdeflate_add_build_file.patch",
"//bazel:libdeflate_module_dot_bazel.patch",
],
strip_prefix = "libdeflate-master",
urls = ["https://github.com/ebiggers/libdeflate/archive/refs/heads/master.zip"],
)
1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ rapidly and post patches within 14 days if possible.

These vulnerabilities are present in the given versions:

* [CVE-2023-5841](https://nvd.nist.gov/vuln/detail/CVE-2023-5841) 3.1.0, 3.1.1, 3.1.2, 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.1.10 3.1.11 3.2.0 3.2.1
* [CVE-2021-45942](https://nvd.nist.gov/vuln/detail/CVE-2021-45942) 3.1.0, 3.1.1, 3.1.2, 3.1.3
* [CVE-2021-20296](https://nvd.nist.gov/vuln/detail/CVE-2021-20296) 2.4.0, 2.4.1, 2.4.2, 2.5.0, 2.5.1, 2.5.2, 2.5.3
* [CVE-2021-3479](https://nvd.nist.gov/vuln/detail/CVE-2021-3479) 2.4.0, 2.4.1, 2.4.2, 2.5.0, 2.5.1, 2.5.2, 2.5.3
Expand Down
1 change: 1 addition & 0 deletions bazel/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Empty by intend
86 changes: 86 additions & 0 deletions bazel/imath_add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) Contributors to the OpenEXR Project.
+
+load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
+
+expand_template(
+ name = "ImathConfig",
+ out = "src/Imath/ImathConfig.h",
+ substitutions = {
+ "@IMATH_INTERNAL_NAMESPACE@": "Imath_3_1",
+ "@IMATH_LIB_VERSION@": "3.1.12",
+ "@IMATH_NAMESPACE_CUSTOM@": "0",
+ "@IMATH_NAMESPACE@": "Imath",
+ "@IMATH_PACKAGE_NAME@": "Imath 3.1.12",
+ "@Imath_VERSION_MAJOR@": "3",
+ "@Imath_VERSION_MINOR@": "1",
+ "@Imath_VERSION_PATCH@": "12",
+ "@IMATH_VERSION@": "3.1.12",
+ "#cmakedefine IMATH_HALF_USE_LOOKUP_TABLE": "#define IMATH_HALF_USE_LOOKUP_TABLE",
+ "#cmakedefine IMATH_ENABLE_API_VISIBILITY": "#define IMATH_ENABLE_API_VISIBILITY",
+ "#cmakedefine IMATH_HAVE_LARGE_STACK": "/* #undef IMATH_HAVE_LARGE_STACK */",
+ "#cmakedefine01 IMATH_USE_NOEXCEPT": "#define IMATH_USE_NOEXCEPT 1",
+ },
+ template = "config/ImathConfig.h.in",
+ visibility = ["//visibility:public"],
+)
+
+cc_library(
+ name = "Imath",
+ srcs = [
+ "src/Imath/ImathColorAlgo.cpp",
+ "src/Imath/ImathFun.cpp",
+ "src/Imath/ImathMatrixAlgo.cpp",
+ "src/Imath/ImathRandom.cpp",
+ "src/Imath/half.cpp",
+ "src/Imath/toFloat.h",
+ ],
+ hdrs = [
+ "src/Imath/ImathBox.h",
+ "src/Imath/ImathBoxAlgo.h",
+ "src/Imath/ImathColor.h",
+ "src/Imath/ImathColorAlgo.h",
+ "src/Imath/ImathConfig.h",
+ "src/Imath/ImathEuler.h",
+ "src/Imath/ImathExport.h",
+ "src/Imath/ImathForward.h",
+ "src/Imath/ImathFrame.h",
+ "src/Imath/ImathFrustum.h",
+ "src/Imath/ImathFrustumTest.h",
+ "src/Imath/ImathFun.h",
+ "src/Imath/ImathGL.h",
+ "src/Imath/ImathGLU.h",
+ "src/Imath/ImathInt64.h",
+ "src/Imath/ImathInterval.h",
+ "src/Imath/ImathLine.h",
+ "src/Imath/ImathLineAlgo.h",
+ "src/Imath/ImathMath.h",
+ "src/Imath/ImathMatrix.h",
+ "src/Imath/ImathMatrixAlgo.h",
+ "src/Imath/ImathNamespace.h",
+ "src/Imath/ImathPlane.h",
+ "src/Imath/ImathPlatform.h",
+ "src/Imath/ImathQuat.h",
+ "src/Imath/ImathRandom.h",
+ "src/Imath/ImathRoots.h",
+ "src/Imath/ImathShear.h",
+ "src/Imath/ImathSphere.h",
+ "src/Imath/ImathTypeTraits.h",
+ "src/Imath/ImathVec.h",
+ "src/Imath/ImathVecAlgo.h",
+ "src/Imath/half.h",
+ "src/Imath/halfFunction.h",
+ "src/Imath/halfLimits.h",
+ ],
+ includes = ["src/Imath"],
+ visibility = ["//visibility:public"],
+)
+
+alias(
+ name = "imath",
+ actual = ":Imath",
+ visibility = ["//visibility:public"],
+)
9 changes: 9 additions & 0 deletions bazel/imath_module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,6 @@
+module(
+ name = "imath",
+ compatibility_level = 1,
+)
+
+bazel_dep(name = "bazel_skylib", version = "1.7.1")
55 changes: 55 additions & 0 deletions bazel/libdeflate_add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) Contributors to the OpenEXR Project.
+
+cc_library(
+ name = "deflate",
+ srcs = [
+ "common_defs.h",
+ "lib/adler32.c",
+ "lib/arm/adler32_impl.h",
+ "lib/arm/cpu_features.c",
+ "lib/arm/cpu_features.h",
+ "lib/arm/crc32_impl.h",
+ "lib/arm/crc32_pmull_helpers.h",
+ "lib/arm/crc32_pmull_wide.h",
+ "lib/arm/matchfinder_impl.h",
+ "lib/bt_matchfinder.h",
+ "lib/cpu_features_common.h",
+ "lib/crc32_multipliers.h",
+ "lib/crc32_tables.h",
+ "lib/decompress_template.h",
+ "lib/deflate_compress.c",
+ "lib/deflate_compress.h",
+ "lib/deflate_constants.h",
+ "lib/deflate_decompress.c",
+ "lib/gzip_constants.h",
+ "lib/hc_matchfinder.h",
+ "lib/ht_matchfinder.h",
+ "lib/lib_common.h",
+ "lib/matchfinder_common.h",
+ "lib/utils.c",
+ "lib/x86/adler32_impl.h",
+ "lib/x86/adler32_template.h",
+ "lib/x86/cpu_features.c",
+ "lib/x86/cpu_features.h",
+ "lib/x86/crc32_impl.h",
+ "lib/x86/crc32_pclmul_template.h",
+ "lib/x86/decompress_impl.h",
+ "lib/x86/matchfinder_impl.h",
+ "lib/zlib_compress.c",
+ "lib/zlib_constants.h",
+ "lib/zlib_decompress.c",
+ ],
+ hdrs = ["libdeflate.h"],
+ includes = ["."],
+ visibility = ["//visibility:public"],
+)
+
+alias(
+ name = "libdeflate",
+ actual = ":deflate",
+ visibility = ["//visibility:public"],
+)
7 changes: 7 additions & 0 deletions bazel/libdeflate_module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,4 @@
+module(
+ name = "libdeflate",
+ compatibility_level = 1,
+)
Loading

0 comments on commit cfa20e7

Please sign in to comment.