Skip to content

Commit

Permalink
Merge remote-tracking branch 'aswf/main' into main
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Leprince <[email protected]>
  • Loading branch information
pleprince committed Mar 13, 2024
2 parents 1d2cd0c + f0da5b7 commit 48fa372
Show file tree
Hide file tree
Showing 134 changed files with 6,013 additions and 1,432 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.2
7.0.2
2 changes: 1 addition & 1 deletion .github/workflows/analysis_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner -X -Dsonar.login=$SONAR_TOKEN
run: sonar-scanner -X

# ------------------------------------------------------------------------------
# Valgrind memcheck test
Expand Down
39 changes: 24 additions & 15 deletions .github/workflows/bazel_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1

- name: Mount Bazel cache
uses: actions/cache@v3
uses: actions/cache@v4.0.0
with:
path: "/home/runner/.cache/bazel"
key: bazel-ubuntu-22
Expand All @@ -57,19 +57,16 @@ jobs:
run: |
bazelisk build //...
bazelisk test //...
# Test bzlmod
bazelisk build --enable_bzlmod -- //...
bazelisk test --enable_bzlmod -- //...
build_and_test_windows:
name: Windows Server 2022 build <Visual Studio 2022>
runs-on: windows-2022

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1

- name: Mount Bazel cache
uses: actions/cache@v3
uses: actions/cache@v4.0.0
with:
path: "/home/runner/.cache/bazel"
key: bazel-windows-2022
Expand All @@ -78,19 +75,16 @@ jobs:
run: |
bazelisk build //...
bazelisk test //...
# Test bzlmod
bazelisk build --enable_bzlmod -- //...
bazelisk test --enable_bzlmod -- //...
build_and_test_macos:
name: macOS 13 Bazel build <Apple Clang14>
runs-on: macos-13

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1

- name: Mount Bazel cache
uses: actions/cache@v3
uses: actions/cache@v4.0.0
with:
path: "/home/runner/.cache/bazel"
key: bazel-macos-13
Expand All @@ -99,6 +93,21 @@ jobs:
run: |
bazelisk build //...
bazelisk test //...
# Test bzlmod
bazelisk build --enable_bzlmod -- //...
bazelisk test --enable_bzlmod -- //...
build_and_test_macos_M1:
name: macOS 14 Bazel build <Apple Clang14>
runs-on: macos-14

steps:
- uses: actions/[email protected]

- name: Mount Bazel cache
uses: actions/[email protected]
with:
path: "/home/runner/.cache/bazel"
key: bazel-macos-14

- name: Build
run: |
bazelisk build //...
bazelisk test //...
10 changes: 5 additions & 5 deletions .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
- 'website/src/**'
- '!bazel/**'
- '!src/wrappers/**'
- '!.github/workflows/python-**.yml'
pull_request:
branches-ignore:
- RB-2.*
Expand All @@ -38,6 +39,7 @@ on:
- 'website/src/**'
- '!bazel/**'
- '!src/wrappers/**'
- '!.github/workflows/python-**.yml'

permissions:
contents: read
Expand Down Expand Up @@ -238,8 +240,8 @@ jobs:
run: yum install -y help2man
- name: Configure
run: |
cmake .. \
-DCMAKE_INSTALL_PREFIX=../_install \
cmake -B _build -S . \
-DCMAKE_INSTALL_PREFIX=_install \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \
-DCMAKE_CXX_FLAGS=${{ matrix.cxx-flags }} \
Expand All @@ -249,13 +251,11 @@ jobs:
-DOPENEXR_INSTALL_DOCS='ON' \
-DOPENEXR_RUN_FUZZ_TESTS='OFF' \
-DOPENEXR_ENABLE_THREADING=${{ matrix.threads-enabled }}
working-directory: _build
- name: Build
run: |
cmake --build . \
cmake --build _build \
--target install \
--config ${{ matrix.build-type }}
working-directory: _build
- name: Validate
run: |
share/ci/scripts/linux/validate_openexr_libs.sh _install
Expand Down
104 changes: 104 additions & 0 deletions .github/workflows/python-wheels-publish-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) Contributors to the OpenEXR Project.

name: Publish python distribution 📦 to TestPyPI

on:

# Publish python wheels to test.pypi when a release candidate is tagged,
# e.g. v3.4.5-rc, v3.4.5-rc6, etc.

push:
tags:
- v3.[0-9]+.[0-9]+-rc*
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: Python Wheels - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

environment:
name: testpypi
url: https://test.pypi.org/p/openexr

permissions:
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Create sdist
# Only create it once.
if: ${{ matrix.os == 'ubuntu-latest' }}
env:
OPENEXR_RELEASE_CANDIDATE_TAG: ${{ github.ref_name }}
run: pipx run build --sdist . --outdir wheelhouse

- name: Build wheel
uses: pypa/[email protected]
with:
output-dir: wheelhouse
env:
CIBW_ARCHS_LINUX: x86_64
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
# 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_SKIP: cp36-* *-win32 *_i686 pp*
CIBW_TEST_SKIP: "*-macosx_universal2:arm64"
CIBW_ENVIRONMENT: OPENEXR_RELEASE_CANDIDATE_TAG="${{ github.ref_name }}"

- name: Upload artifact
uses: actions/[email protected]
with:
name: wheels-${{ matrix.os }}
path: |
./wheelhouse/*.whl
./wheelhouse/*.tar.gz
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/openexr

permissions:
id-token: write

steps:
- name: Download Linux artifacts
uses: actions/[email protected]
with:
name: wheels-ubuntu-latest
path: dist
- name: Download macOS artifacts
uses: actions/[email protected]
with:
name: wheels-macos-latest
path: dist
- name: Download Windows artifacts
uses: actions/[email protected]
with:
name: wheels-windows-latest
path: dist
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
96 changes: 96 additions & 0 deletions .github/workflows/python-wheels-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) Contributors to the OpenEXR Project.

name: Publish python distribution 📦 to PyPI

on:
# Publish wheels to pypi on release
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: Python Wheels - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

environment:
name: pypi
url: https://pypi.org/p/openexr

permissions:
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Create sdist
# Only create it once.
if: ${{ matrix.os == 'ubuntu-latest' }}
run: pipx run build --sdist . --outdir wheelhouse

- name: Build wheel
uses: pypa/[email protected]
with:
output-dir: wheelhouse
env:
CIBW_BUILD: cp312-*
CIBW_ARCHS_LINUX: x86_64
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
# 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_SKIP: cp36-* *-win32 *_i686 pp*
CIBW_TEST_SKIP: "*arm64"

- name: Upload artifact
uses: actions/[email protected]
with:
name: wheels-${{ matrix.os }}
path: |
./wheelhouse/*.whl
./wheelhouse/*.tar.gz
publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/openexr

permissions:
id-token: write

steps:
- name: Download Linux artifacts
uses: actions/[email protected]
with:
name: wheels-ubuntu-latest
path: dist
- name: Download macOS artifacts
uses: actions/[email protected]
with:
name: wheels-macos-latest
path: dist
- name: Download Windows artifacts
uses: actions/[email protected]
with:
name: wheels-windows-latest
path: dist
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading

0 comments on commit 48fa372

Please sign in to comment.