Skip to content

Version 3.2.1, built against zlib 1.3.1. #11

Version 3.2.1, built against zlib 1.3.1.

Version 3.2.1, built against zlib 1.3.1. #11

Workflow file for this run

name: OpenEXR
on: [push, pull_request]
# Cancel in-progress builds on push to same branch / PR
# https://stackoverflow.com/a/72408109
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
ZLIB_VERSION: 1.3.1
OPENEXR_VERSION: 3.2.1
# For testing on the magnum-plugins CI we deliberately want older versions
# -- the stock version on Ubuntu 18.04 is 2.2, which is too old and leaky,
# so can't use that, but using version 3 would mean we lose the possibility
# of testing against older versions
OPENEXR_VERSION_25: 2.5.5
jobs:
windows:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019]
steps:
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Set up Visual Studio environment
uses: seanmiddleditch/gha-setup-vsdevenv@master
- name: Clone OpenEXR
uses: actions/checkout@v3
with:
repository: AcademySoftwareFoundation/openexr
ref: v${{ env.OPENEXR_VERSION }}
path: openexr
- name: Download prebuilt zlib
# Built on the `zlib` branch but hosted manually to avoid having to mess
# with access permissions
run: |
Invoke-WebRequest https://ci.magnum.graphics/zlib-${{ env.ZLIB_VERSION }}-${{ matrix.os }}.zip -OutFile zlib.zip
7z x zlib.zip -o${{ github.workspace }}/deps
- name: Build & install Debug
shell: cmd
run: |
cmake ^
-DCMAKE_C_COMPILER=cl.exe ^
-DCMAKE_CXX_COMPILER=cl.exe ^
-DCMAKE_PREFIX_PATH=$%CD:\=/%/deps ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/install-debug ^
-DCMAKE_BUILD_TYPE=Debug ^
-DPYILMBASE_ENABLE=OFF ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF ^
-DOPENEXR_BUILD_TOOLS=OFF ^
-DOPENEXR_CXX_STANDARD=11 ^
-DOPENEXR_INSTALL_EXAMPLES=OFF ^
-DOPENEXR_INSTALL_PKG_CONFIG=OFF ^
-DOPENEXR_INSTALL_TOOLS=OFF ^
-DOPENEXR_FORCE_INTERNAL_IMATH=ON ^
-G Ninja -S openexr -B build-debug
ninja -C build-debug install
- name: Build & install Release
shell: cmd
# Same comment as above.
run: |
cmake ^
-DCMAKE_C_COMPILER=cl.exe ^
-DCMAKE_CXX_COMPILER=cl.exe ^
-DCMAKE_PREFIX_PATH=%CD:\=/%/deps ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/install ^
-DCMAKE_BUILD_TYPE=Release ^
-DPYILMBASE_ENABLE=OFF ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF ^
-DOPENEXR_BUILD_TOOLS=OFF ^
-DOPENEXR_CXX_STANDARD=11 ^
-DOPENEXR_INSTALL_EXAMPLES=OFF ^
-DOPENEXR_INSTALL_TOOLS=OFF ^
-DOPENEXR_FORCE_INTERNAL_IMATH=ON ^
-G Ninja -S openexr -B build
ninja -C build install
- name: Upload Debug artifacts
uses: actions/upload-artifact@v1
with:
name: openexr-${{ env.OPENEXR_VERSION }}-${{ matrix.os }}-debug
path: install-debug
- name: Upload Release artifacts
uses: actions/upload-artifact@v1
with:
name: openexr-${{ env.OPENEXR_VERSION }}-${{ matrix.os }}
path: install
windows-mingw:
name: windows-mingw
runs-on: windows-2019
steps:
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Set up MinGW environment
uses: msys2/setup-msys2@v2
- name: Clone OpenEXR
uses: actions/checkout@v3
with:
repository: AcademySoftwareFoundation/openexr
ref: v${{ env.OPENEXR_VERSION }}
path: openexr
- name: Download prebuilt zlib
# Built on the `zlib` branch but hosted manually to avoid having to mess
# with access permissions
run: |
Invoke-WebRequest https://ci.magnum.graphics/zlib-${{ env.ZLIB_VERSION }}-windows-mingw.zip -OutFile zlib.zip
7z x zlib.zip -o${{ github.workspace }}/deps
- name: Build & install
shell: cmd
run: |
cmake ^
-DCMAKE_C_COMPILER=gcc.exe ^
-DCMAKE_CXX_COMPILER=g++.exe ^
-DCMAKE_PREFIX_PATH=%CD:\=/%/deps ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/install ^
-DCMAKE_BUILD_TYPE=Release ^
-DPYILMBASE_ENABLE=OFF ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF ^
-DOPENEXR_BUILD_TOOLS=OFF ^
-DOPENEXR_CXX_STANDARD=11 ^
-DOPENEXR_INSTALL_EXAMPLES=OFF ^
-DOPENEXR_INSTALL_TOOLS=OFF ^
-DOPENEXR_FORCE_INTERNAL_IMATH=ON ^
-G Ninja -S openexr -B build
ninja -C build install/strip
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: openexr-${{ env.OPENEXR_VERSION }}-windows-mingw
path: install
ubuntu:
name: ${{ matrix.os }}
runs-on: ${{ matrix.runs-on }}
container: ${{ matrix.container }}
strategy:
matrix:
include:
- os: ubuntu-18.04
runs-on: ubuntu-latest
container: ubuntu:bionic-20220427
steps:
- name: Install base build tools
run: |
apt update
apt install -y ninja-build g++ wget unzip git
mkdir -p deps
# It needs CMake 3.12, 18.04 has 3.10
- name: Download CMake 3.12
run: |
mkdir -p $HOME/cmake && cd $HOME/cmake
wget --no-check-certificate https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.tar.gz
tar --strip-components=1 -xzf cmake-3.12.4-Linux-x86_64.tar.gz
echo "$HOME/cmake/bin" >> $GITHUB_PATH
- name: Fetch prebuilt zlib
run: |
mkdir -p deps && cd deps
wget https://ci.magnum.graphics/zlib-${{ env.ZLIB_VERSION }}-${{ matrix.os }}.zip
unzip zlib-${{ env.ZLIB_VERSION }}-${{ matrix.os }}.zip
- name: Clone OpenEXR
uses: actions/checkout@v3
with:
repository: AcademySoftwareFoundation/openexr
ref: v${{ env.OPENEXR_VERSION }}
path: openexr
- name: Build & install
run: |
mkdir build && cd build
cmake ../openexr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$(pwd)/../install \
-DCMAKE_PREFIX_PATH=$(pwd)/../deps \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DOPENEXR_BUILD_TOOLS=OFF \
-DOPENEXR_CXX_STANDARD=11 \
-DOPENEXR_INSTALL_EXAMPLES=OFF \
-DOPENEXR_INSTALL_TOOLS=OFF \
-DOPENEXR_INSTALL_PKG_CONFIG=OFF \
-DOPENEXR_FORCE_INTERNAL_IMATH=ON \
-G Ninja
ninja install/strip
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: openexr-${{ env.OPENEXR_VERSION }}-${{ matrix.os }}
path: install
ubuntu-25:
name: 25-${{ matrix.os }}-gcc${{ matrix.env.GCC }}
runs-on: ${{ matrix.runs-on }}
container: ${{ matrix.container }}
strategy:
matrix:
include:
- os: ubuntu-18.04
runs-on: ubuntu-latest
container: ubuntu:bionic-20220427
env:
GCC: 4.8
- os: ubuntu-18.04
runs-on: ubuntu-latest
container: ubuntu:bionic-20220427
env:
GCC: 7
steps:
- name: Install base build tools
run: |
apt update
apt install -y ninja-build cmake g++ wget zlib1g-dev
mkdir -p deps
- name: Install GCC 4.8
run: apt-get install -y g++-4.8
if: ${{ matrix.env.GCC == '4.8' }}
# No (static) zlib used here -- we want it to depend on the system version
- name: Clone OpenEXR
uses: actions/checkout@v3
with:
repository: AcademySoftwareFoundation/openexr
ref: v${{ env.OPENEXR_VERSION_25 }}
path: openexr
- name: Build & install
run: |
mkdir build && cd build
cmake ../openexr \
-DCMAKE_C_COMPILER=gcc-${{ matrix.env.GCC }} \
-DCMAKE_CXX_COMPILER=g++-${{ matrix.env.GCC }} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$(pwd)/../install \
-DPYILMBASE_ENABLE=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DINSTALL_OPENEXR_DOCS=OFF \
-DINSTALL_OPENEXR_EXAMPLES=OFF \
-DOPENEXR_BUILD_UTILS=OFF \
-DOPENEXR_CXX_STANDARD=11 \
-DILMBASE_INSTALL_PKG_CONFIG=OFF \
-DOPENEXR_INSTALL_PKG_CONFIG=OFF \
-DPYILMBASE_INSTALL_PKG_CONFIG=OFF \
-G Ninja
ninja install/strip
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: openexr-${{ env.OPENEXR_VERSION_25 }}-${{ matrix.os }}-gcc${{ matrix.env.GCC }}
path: install