Skip to content

Commit 13f0d5b

Browse files
committed
add more CI platforms
Signed-off-by: Anton Dukhovnikov <[email protected]>
1 parent e258943 commit 13f0d5b

File tree

13 files changed

+125
-16
lines changed

13 files changed

+125
-16
lines changed

.github/workflows/ci.yml

Lines changed: 92 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,75 @@ on:
99
#branches: [ "master" ]
1010

1111
jobs:
12+
aswf_old:
13+
name: "VFX${{matrix.vfxyear}} ${{matrix.desc}}"
14+
strategy:
15+
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
16+
fail-fast: false
17+
18+
matrix:
19+
include:
20+
- desc: gcc11
21+
nametag: linux-vfx2022-gcc11
22+
os: ubuntu-latest
23+
container: aswf/ci-osl:2022-clang11
24+
vfxyear: 2022
25+
cxx_std: 17
26+
- desc: clang14
27+
nametag: linux-vfx2022-clang14
28+
os: ubuntu-latest
29+
container: aswf/ci-osl:2022-clang11
30+
vfxyear: 2022
31+
cc_compiler: clang
32+
cxx_compiler: clang++
33+
cxx_std: 17
34+
35+
runs-on: ${{ matrix.os }}
36+
container:
37+
image: ${{ matrix.container }}
38+
volumes:
39+
- /node20217:/node20217:rw,rshared
40+
- /node20217:/__e/node20:ro,rshared
41+
env:
42+
CXX: ${{matrix.cxx_compiler}}
43+
CC: ${{matrix.cc_compiler}}
44+
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
45+
OPENEXR_VERSION: ${{matrix.openexr_ver}}
46+
steps:
47+
- name: install nodejs20glibc2.17
48+
run: |
49+
curl --silent https://unofficial-builds.nodejs.org/download/release/v20.18.1/node-v20.18.1-linux-x64-glibc-217.tar.xz | tar -xJ --strip-components 1 -C /node20217 -f -
50+
51+
- name: Checkout repo
52+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
53+
with:
54+
fetch-depth: '0'
55+
56+
- name: Yum config
57+
shell: bash
58+
run: |
59+
yum-config-manager --disable centos-sclo-rh || true
60+
sed -i 's,^mirrorlist=,#,; s,^#baseurl=http://mirror\.centos\.org/centos/$releasever,baseurl=https://vault.centos.org/7.9.2009,' /etc/yum.repos.d/CentOS-Base.repo
61+
62+
- name: Dependencies
63+
shell: bash
64+
run: |
65+
build_scripts/install_aces_container.bash
66+
sudo yum install --setopt=tsflags=nodocs -y eigen3-devel ceres-solver-devel LibRaw-devel
67+
68+
- name: Configure CMake
69+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
70+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
71+
run: >
72+
cmake -B build -S . -DRTA_CENTOS7_CERES_HACK=ON
73+
74+
- name: Build
75+
run: sudo cmake --build build
76+
77+
- name: Test
78+
working-directory: build
79+
run: ctest --rerun-failed --output-on-failure
80+
1281
aswf:
1382
name: "VFX${{matrix.vfxyear}} ${{matrix.desc}}"
1483
runs-on: ${{ matrix.os }}
@@ -28,17 +97,34 @@ jobs:
2897
vfxyear: 2023
2998
cxx_std: 17
3099
- desc: clang15 # /C++17 boost1.8 exr3.1
31-
nametag: linux-vfx2022-clang13
100+
nametag: linux-vfx2022-clang15
32101
os: ubuntu-latest
33102
container: aswf/ci-osl:2023-clang15
34103
vfxyear: 2023
35104
cc_compiler: clang
36105
cxx_compiler: clang++
37106
cxx_std: 17
107+
108+
- desc: gcc11
109+
nametag: linux-vfx2024
110+
os: ubuntu-latest
111+
container: aswf/ci-osl:2024-clang17
112+
vfxyear: 2024
113+
cxx_std: 17
114+
- desc: clang17
115+
nametag: linux-vfx2024-clang17
116+
os: ubuntu-latest
117+
container: aswf/ci-osl:2024-clang17
118+
vfxyear: 2024
119+
cc_compiler: clang
120+
cxx_compiler: clang++
121+
cxx_std: 17
122+
38123
env:
39124
CXX: ${{matrix.cxx_compiler}}
40125
CC: ${{matrix.cc_compiler}}
41126
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
127+
42128
steps:
43129
- uses: actions/checkout@v4
44130

@@ -96,14 +182,17 @@ jobs:
96182
c_compiler: gcc
97183
cpp_compiler: g++
98184
install_deps: install_deps_linux
185+
build_shared_libs: ON
99186
- os: ubuntu-latest
100187
c_compiler: clang
101188
cpp_compiler: clang++
102189
install_deps: install_deps_linux
190+
build_shared_libs: ON
103191
- os: macos-latest
104192
c_compiler: clang
105193
cpp_compiler: clang++
106194
install_deps: install_deps_mac
195+
build_shared_libs: ON
107196
exclude:
108197
- os: windows-latest
109198
c_compiler: gcc
@@ -115,7 +204,7 @@ jobs:
115204
c_compiler: cl
116205
- os: macos-latest
117206
c_compiler: gcc
118-
207+
119208
steps:
120209
- uses: actions/checkout@v4
121210

@@ -139,7 +228,7 @@ jobs:
139228
cmake
140229
-B ${{ steps.strings.outputs.build-output-dir }}
141230
-S ${{ github.workspace }}
142-
-DCXX_STANDARD=C++14
231+
-DCXX_STANDARD=C++17
143232
-DCMAKE_TOOLCHAIN_FILE="${{ matrix.toolchain_file }}"
144233
-DENABLE_SHARED="${{ matrix.build_shared_libs }}"
145234

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ foreach( p LIB BIN INCLUDE CMAKE )
5757
endforeach()
5858

5959
option( ENABLE_SHARED "Enable Shared Libraries" ON )
60+
option( RTA_CENTOS7_CERES_HACK "Work around broken config in ceres-solver 1.12" OFF )
6061

6162
if ( ENABLE_SHARED )
6263
set ( DO_SHARED SHARED )

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ To build `rawtoaces` you would need to sutisfy these dependencies:
3838
| Library | Min Version| Purpose | Link to installation instruction |
3939
| ------- | -----------| -------- | -------------------------------- |
4040
| `cmake` | `3.10` | | [CMake download](https://cmake.org/download/)|
41-
| `ceres` | `1.14.0` | Ceres Solver is an open source library for solving Non-linear Least Squares problems with bounds constraints and unconstrained optimization problems. It processes non-linear regression for rawtoaces. | [Ceres Solver installation](http://ceres-solver.org/installation.html)|
41+
| `ceres` | `1.12.0` | Ceres Solver is an open source library for solving Non-linear Least Squares problems with bounds constraints and unconstrained optimization problems. It processes non-linear regression for rawtoaces. | [Ceres Solver installation](http://ceres-solver.org/installation.html)|
4242
| `imath` | `3.1.8` | Provides the half data type used for representing 16-bit floating-point values. It's used by rawtoaces for storing high dynamic range (HDR) data in a compact format. | [Imath installation](https://imath.readthedocs.io/en/latest/install.html#install)|
43-
| `libraw` | `0.19.5` | LibRaw is a library that processes RAW files from digital cameras. It handles image pre-processing for rawtoaces. | [LibRaw download](http://www.libraw.org/download) |
44-
| `boost` | `1.80.0` | Boost has multiple C++ libraries that support tasks related to linear algebra, multithreading, image processing, unit testing, etc. It handles data loading and unit testing for rawtoaces. | [Boost download](http://www.boost.org/) |
43+
| `libraw` | `0.19.4` | LibRaw is a library that processes RAW files from digital cameras. It handles image pre-processing for rawtoaces. | [LibRaw download](http://www.libraw.org/download) |
44+
| `boost` | `1.76.0` | Boost has multiple C++ libraries that support tasks related to linear algebra, multithreading, image processing, unit testing, etc. It handles data loading and unit testing for rawtoaces. | [Boost download](http://www.boost.org/) |
4545
| `aces_container` | `latest` | ACES Container is the reference implementation for a file writer intended to be used with the Academy Color Encoding System (ACES). `rawtoaces` relies on it to produce images that comply with the ACES container specification (SMPTE S2065-4). | [ACES Container installation](https://github.com/ampas/aces_container?tab=readme-ov-file#installation) |
4646

4747

cmake/modules/FindCeres.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# This is a hack to make rawtoaces build on Centos 7 on CI.
3+
# ceres-solver-1.12 which is available via yum on Centos 7 comes with
4+
# broken Config.cmake file. This hack works around that. It requires that
5+
# ceres-solver-1.12 is already installed via yum.
6+
#
7+
8+
set (Ceres_VERSION_MAJOR 0)
9+
set (CERES_INCLUDE_DIRS "/usr/include")
10+
set (CERES_LIBRARIES "/usr/lib64/libceres.so")
11+
set (Ceres_FOUND 1)

configure.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_INSTALL_PREFIX}/share/CMake"
66
find_package ( AcesContainer CONFIG REQUIRED )
77
find_package ( Eigen3 CONFIG REQUIRED )
88
find_package ( Imath CONFIG REQUIRED )
9-
find_package ( Ceres REQUIRED )
109
find_package ( Boost REQUIRED
1110
COMPONENTS
1211
system
1312
filesystem
1413
unit_test_framework
1514
)
1615

16+
if (RTA_CENTOS7_CERES_HACK)
17+
find_package ( Ceres MODULE REQUIRED )
18+
else ()
19+
find_package ( Ceres CONFIG REQUIRED )
20+
endif ()
21+
1722
find_package (libraw CONFIG QUIET )
1823

1924
if (libraw_FOUND )

src/rawtoaces_idt/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ target_link_libraries(
1818
Boost::filesystem
1919
Imath::Imath
2020
Imath::ImathConfig
21+
Eigen3::Eigen
2122
)
2223

2324
if ( ${Ceres_VERSION_MAJOR} GREATER 1 )

src/rawtoaces_idt/rta.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,13 +1028,15 @@ void Idt::loadCMF( const string &path )
10281028
BOOST_FOREACH (
10291029
ptree::value_type &row, pt.get_child( "spectral_data.data.main" ) )
10301030
{
1031-
_cmf[i]._wl = atoi( ( row.first ).c_str() );
1031+
uint16_t wl = atoi( ( row.first ).c_str() );
10321032

1033-
if ( _cmf[i]._wl < 380 || _cmf[i]._wl % 5 )
1033+
if ( wl < 380 || wl % 5 )
10341034
continue;
1035-
else if ( _cmf[i]._wl > 780 )
1035+
else if ( wl > 780 )
10361036
break;
10371037

1038+
_cmf[i]._wl = wl;
1039+
10381040
vector<double> data;
10391041
BOOST_FOREACH ( ptree::value_type &cell, row.second )
10401042
data.push_back( cell.second.get_value<double>() );

unittest/testDNGIdt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#define BOOST_TEST_MAIN
5656
#include <boost/test/unit_test.hpp>
5757
#include <boost/filesystem.hpp>
58-
#include <boost/test/floating_point_comparison.hpp>
58+
#include <boost/test/tools/floating_point_comparison.hpp>
5959

6060
#include <rawtoaces/rta.h>
6161

unittest/testIDT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
#define BOOST_TEST_MAIN
6161
#include <boost/test/unit_test.hpp>
6262
#include <boost/filesystem.hpp>
63-
#include <boost/test/floating_point_comparison.hpp>
63+
#include <boost/test/tools/floating_point_comparison.hpp>
6464

6565
#include <rawtoaces/mathOps.h>
6666
#include <rawtoaces/rta.h>

unittest/testIllum.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
#define BOOST_TEST_MAIN
6161
#include <boost/test/unit_test.hpp>
6262
#include <boost/filesystem.hpp>
63-
#include <boost/test/floating_point_comparison.hpp>
63+
#include <boost/test/tools/floating_point_comparison.hpp>
6464

6565
#include <rawtoaces/mathOps.h>
6666
#include <rawtoaces/rta.h>

0 commit comments

Comments
 (0)