_ #841
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: BSD-3-Clause | |
# Copyright (c) Contributors to the OpenEXR Project. | |
# | |
# GitHub Actions workflow file | |
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
name: CI | |
# Run on all changes except: | |
# - doc file changes | |
# - changes to the website, *except* for "website/src", since that | |
# code needs validation. The website has a separate workflow | |
# - changes to the bazel config, since it has its own workflow | |
# - changes to the python bindings | |
# - changes to workflows other than this one | |
on: | |
push: | |
paths: | |
- '**' | |
- '!**.md' | |
- '!website/**' | |
- 'website/src/**' | |
- '!bazel/**' | |
- '!src/wrappers/**' | |
- '!.github/workflows/**' | |
- '.github/workflows/ci_workflow.yml' | |
pull_request: | |
paths: | |
- '**' | |
- '!**.md' | |
- '!website/**' | |
- 'website/src/**' | |
- '!bazel/**' | |
- '!src/wrappers/**' | |
- '!.github/workflows/**' | |
- '.github/workflows/ci_workflow.yml' | |
permissions: | |
contents: read | |
jobs: | |
# Linux jobs run in Docker containers, so the latest OS version is OK. macOS | |
# and Windows jobs need to be locked to specific virtual environment | |
# versions to mitigate issues from OS updates, and will require maintenance | |
# as OS versions are retired. | |
# | |
# GH Actions (Free plan) supports 20 concurrent jobs, with 5 concurrent macOS | |
# jobs. This workflow tries to utilize (but not exceed) that budget to | |
# promote timely CI. | |
# --------------------------------------------------------------------------- | |
# Linux | |
# --------------------------------------------------------------------------- | |
# TODO: Add ARM build. Add sanitize build. | |
linux: | |
name: '${{ matrix.build}}. Linux ${{ matrix.vfx-cy }} | |
${{ matrix.compiler-desc }} | |
C++${{ matrix.cxx-standard }} | |
${{ matrix.build-type }} | |
${{ matrix.label }}' | |
# GH-hosted VM. The build runs in CentOS 7 'container' defined below. | |
runs-on: ubuntu-latest | |
container: | |
# DockerHub: https://hub.docker.com/u/aswf | |
# Source: https://github.com/AcademySoftwareFoundation/aswf-docker | |
image: aswf/ci-openexr:${{ matrix.vfx-cy }} | |
strategy: | |
matrix: | |
build: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
include: | |
- vfx-cy: 2024 | |
- compiler-desc: gcc11.2.1 | |
- cxx-compiler: g++ | |
- cc-compiler: gcc | |
- cxx-standard: 17 | |
- build-type: Release | |
- BUILD_SHARED_LIBS: 'ON' | |
- OPENEXR_ENABLE_THREADING: 'ON' | |
- OPENEXR_INSTALL_PKG_CONFIG: 'ON' | |
- OPENEXR_INSTALL_DOCS: 'ON' | |
- OPENEXR_BUILD_EXAMPLES: 'ON' | |
- OPENEXR_BUILD_TOOLS: 'ON' | |
- OPENEXR_BUILD_PYTHON: 'OFF' | |
- OPENEXR_FORCE_INTERNAL_IMATH: 'OFF' | |
- OPENEXR_FORCE_INTERNAL_DEFLATE: 'OFF' | |
- BUILD_TESTING: 'OFF' | |
# ------------------------------------------------------------------- | |
# VFX CY2024 - GCC | |
# ------------------------------------------------------------------- | |
# | |
- build: 1 | |
build-type: Debug | |
- build: 2 | |
- build: 3 | |
label: Static | |
BUILD_SHARED_LIBS: 'OFF' | |
- build: 4 | |
label: threads=OFF | |
OPENEXR_ENABLE_THREADING: 'OFF' | |
- build: 5 | |
label: pkgconfig=OFF, examples=OFF, tools=OFF, docs=OFF, internal deflate | |
OPENEXR_INSTALL_PKG_CONFIG: 'OFF' | |
OPENEXR_INSTALL_DOCS: 'OFF' | |
OPENEXR_BUILD_EXAMPLES: 'OFF' | |
OPENEXR_BUILD_TOOLS: 'OFF' | |
OPENEXR_FORCE_INTERNAL_IMATH: 'ON' | |
OPENEXR_FORCE_INTERNAL_DEFLATE: 'ON' | |
BUILD_TESTING: 'OFF' | |
- build: 6 | |
compiler-desc: clang15.0 | |
cxx-compiler: clang++ | |
cc-compiler: clang | |
- build: 7 | |
compiler-desc: clang14.0 | |
cxx-compiler: clang++ | |
cc-compiler: clang | |
- build: 8 | |
vfx-cy: 2023 | |
- build: 9 | |
vfx-cy: 2022 | |
compiler-desc: gcc9.3.1 | |
- build: 10 | |
vfx-cy: 2021 | |
compiler-desc: gcc9.3.1 | |
env: | |
CXX: ${{ matrix.cxx-compiler }} | |
CC: ${{ matrix.cc-compiler }} | |
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- name: Install Dependencies | |
run: | | |
share/ci/scripts/install_imath.sh main | |
share/ci/scripts/install_libdeflate.sh master | |
share/ci/scripts/linux/install_help2man.sh | |
- name: Create build directories | |
run: | | |
mkdir _install | |
mkdir _build | |
mkdir _examples | |
- name: Construct CMake command and save it to environment | |
run: | | |
CMAKE_COMMAND="cmake -B _build -S . \ | |
-DCMAKE_INSTALL_PREFIX=_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-DOPENEXR_CXX_STANDARD=${{ matrix.cxx-standard }} \ | |
-DCMAKE_CXX_FLAGS='${{ matrix.cxx-flags }}' \ | |
-DBUILD_SHARED_LIBS=${{ matrix.BUILD_SHARED_LIBS }} \ | |
-DOPENEXR_ENABLE_THREADING=${{ matrix.OPENEXR_ENABLE_THREADING }} \ | |
-DOPENEXR_INSTALL_PKG_CONFIG=${{ matrix.OPENEXR_INSTALL_PKG_CONFIG }} \ | |
-DOPENEXR_INSTALL_DOCS=${{ matrix.OPENEXR_INSTALL_DOCS }} \ | |
-DOPENEXR_BUILD_EXAMPLES=${{ matrix.OPENEXR_BUILD_EXAMPLES }} \ | |
-DOPENEXR_BUILD_TOOLS=${{ matrix.OPENEXR_BUILD_TOOLS }} \ | |
-DOPENEXR_BUILD_PYTHON=${{ matrix.OPENEXR_BUILD_PYTHON }} \ | |
-DOPENEXR_FORCE_INTERNAL_IMATH=${{ matrix.OPENEXR_FORCE_INTERNAL_IMATH }} \ | |
-DOPENEXR_FORCE_INTERNAL_DEFLATE=${{ matrix.OPENEXR_FORCE_INTERNAL_DEFLATE }} \ | |
-DBUILD_TESTING=${{ matrix.BUILD_TESTING }} \ | |
-DOPENEXR_RUN_FUZZ_TESTS='OFF' \ | |
-DCMAKE_VERBOSE_MAKEFILE:BOOL='ON'" | |
echo "CMAKE_COMMAND=$CMAKE_COMMAND" >> $GITHUB_ENV | |
- name: Configure | |
run: $CMAKE_COMMAND | |
- name: Build | |
run: | | |
cmake --build _build \ | |
--target install \ | |
--config ${{ matrix.build-type }} | |
- name: Rename install-manifest.txt | |
run: | | |
echo "# $CMAKE_COMMAND" > _build/install-manifest-${{ matrix.build }}.txt | |
sort _build/install-manifest.txt >> _build/install-manifest-${{ matrix.build }}.txt | |
- name: Upload install-manifest.txt | |
uses: actions/upload-artifact@v3 | |
with: | |
name: install-manifest-${{ matrix.build }} | |
path: _build/install-manifest-${{ matrix.build }}.txt | |
- name: Validate | |
run: | | |
# share/ci/scripts/linux/validate_openexr_libs.sh _install | |
share/ci/scripts/validate_install.py \ | |
_build/install-manifest-${{ matrix.build }}.txt \ | |
share/ci/install-manifest.txt \ | |
$PWD/_install \ | |
${{ matrix.BUILD_SHARED_LIBS }} \ | |
${{ matrix.OPENEXR_INSTALL_PKG_CONFIG }} \ | |
${{ matrix.OPENEXR_INSTALL_DOCS }} \ | |
${{ matrix.OPENEXR_BUILD_EXAMPLES }} \ | |
${{ matrix.OPENEXR_BUILD_TOOLS }} \ | |
${{ matrix.OPENEXR_BUILD_PYTHON }} | |
- name: Test | |
run: | | |
echo ctest -T Test ${{ matrix.exclude-tests }} \ | |
-C ${{ matrix.build-type }} \ | |
--timeout 7200 \ | |
--output-on-failure \ | |
-VV | |
working-directory: _build | |