Skip to content

Commit 111b104

Browse files
Issues/0134 shared and static builds (#137)
* switch CI workflow from Ubuntu 22.10 to 23.10 because Ubuntu 22.10 is out of support window * add the repo's root dockers to the docker CI workflow * add option for shared libraries * set default build type to Release * add mac release workflows that use brew to install dependencies * add static and shared builds with openexr 3.1 to Ubuntu Release and MacOS Release CI workflows
1 parent 876797e commit 111b104

File tree

5 files changed

+372
-3
lines changed

5 files changed

+372
-3
lines changed

.github/workflows/docker_linuxes.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,30 @@ on:
1212

1313
jobs:
1414

15+
Dockerfile-repo-root:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Build the Docker image
22+
run: docker build --no-cache --rm -f ./Dockerfile -t ctl:latest .
23+
24+
- name: Run unit tests (ctest) within the Docker image
25+
run: docker run ctl:latest sh -c "cd ./build && ctest"
26+
27+
Dockerfile_openexr3-repo-root:
28+
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- uses: actions/checkout@v3
33+
- name: Build the Docker image
34+
run: docker build --no-cache --rm -f ./Dockerfile_openexr3 -t ctl:latest .
35+
36+
- name: Run unit tests (ctest) within the Docker image
37+
run: docker run ctl:latest sh -c "cd ./build && ctest"
38+
1539
ubuntu-18-04:
1640

1741
runs-on: ubuntu-latest
@@ -48,14 +72,14 @@ jobs:
4872
- name: Run unit tests (ctest) within the Docker image
4973
run: docker run ctl:latest sh -c "cd ./build && ctest"
5074

51-
ubuntu-22-10:
75+
ubuntu-23-10:
5276

5377
runs-on: ubuntu-latest
5478

5579
steps:
5680
- uses: actions/checkout@v3
5781
- name: Build the Docker image
58-
run: docker build --no-cache --rm -f ./docker/Dockerfile_ubuntu_22.10 -t ctl:latest .
82+
run: docker build --no-cache --rm -f ./docker/Dockerfile_ubuntu_23.10 -t ctl:latest .
5983

6084
- name: Run unit tests (ctest) within the Docker image
6185
run: docker run ctl:latest sh -c "cd ./build && ctest"

.github/workflows/mac_release.yml

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,29 @@ env:
1616

1717
jobs:
1818

19+
build-openexr-brew:
20+
21+
runs-on: macos-latest
22+
23+
steps:
24+
25+
- name: install libtiff
26+
run: brew install libtiff
27+
28+
- name: install openexr
29+
run: brew install openexr
30+
31+
- uses: actions/checkout@v3
32+
33+
- name: Configure CMake
34+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
35+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
36+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
37+
38+
- name: Build
39+
# Build your program with the given configuration
40+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
41+
1942
build-openexr2:
2043

2144
runs-on: macos-latest
@@ -89,7 +112,114 @@ jobs:
89112
- name: Build
90113
# Build your program with the given configuration
91114
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
115+
116+
build-openexr3-static:
117+
runs-on: macos-latest
118+
119+
steps:
120+
121+
- name: install dependencies - imath
122+
run: |
123+
cd ..
124+
git clone https://github.com/AcademySoftwareFoundation/Imath.git &&
125+
cd Imath &&
126+
mkdir build &&
127+
cd build &&
128+
cmake -DBUILD_SHARED_LIBS=OFF .. &&
129+
make &&
130+
make install
131+
132+
- name: install dependencies - openexr v3.1
133+
run: |
134+
cd ..
135+
git clone https://github.com/AcademySoftwareFoundation/openexr.git &&
136+
cd openexr &&
137+
git checkout RB-3.1 &&
138+
mkdir build &&
139+
cd build &&
140+
cmake -DBUILD_SHARED_LIBS=OFF .. &&
141+
make &&
142+
make install
143+
144+
- uses: actions/checkout@v3
145+
146+
- name: Configure CMake
147+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
148+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
149+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF
150+
151+
- name: Build
152+
# Build your program with the given configuration
153+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
154+
155+
build-openexr3-shared:
156+
runs-on: macos-latest
157+
158+
steps:
159+
160+
- name: install dependencies - imath
161+
run: |
162+
cd ..
163+
git clone https://github.com/AcademySoftwareFoundation/Imath.git &&
164+
cd Imath &&
165+
mkdir build &&
166+
cd build &&
167+
cmake -DBUILD_SHARED_LIBS=ON .. &&
168+
make &&
169+
make install
170+
171+
- name: install dependencies - openexr v3.1
172+
run: |
173+
cd ..
174+
git clone https://github.com/AcademySoftwareFoundation/openexr.git &&
175+
cd openexr &&
176+
git checkout RB-3.1 &&
177+
mkdir build &&
178+
cd build &&
179+
cmake -DBUILD_SHARED_LIBS=ON .. &&
180+
make &&
181+
make install
182+
183+
- uses: actions/checkout@v3
184+
185+
- name: Configure CMake
186+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
187+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
188+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=ON
189+
190+
- name: Build
191+
# Build your program with the given configuration
192+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
92193

194+
test-openexr-brew:
195+
196+
runs-on: macos-latest
197+
198+
steps:
199+
200+
- name: install libtiff
201+
run: brew install libtiff
202+
203+
- name: install openexr
204+
run: brew install openexr
205+
206+
- uses: actions/checkout@v3
207+
208+
- name: Configure CMake
209+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
210+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
211+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
212+
213+
- name: Build
214+
# Build your program with the given configuration
215+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
216+
217+
- name: Test
218+
working-directory: ${{github.workspace}}/build
219+
# Execute tests defined by the CMake configuration.
220+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
221+
run: ctest -V --output-on-failure
222+
93223
test-openexr2:
94224

95225
runs-on: macos-latest
@@ -176,3 +306,92 @@ jobs:
176306
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
177307
run: ctest -V --output-on-failure
178308

309+
test-openexr3-static:
310+
runs-on: macos-latest
311+
312+
steps:
313+
314+
- name: install dependencies - imath
315+
run: |
316+
cd ..
317+
git clone https://github.com/AcademySoftwareFoundation/Imath.git &&
318+
cd Imath &&
319+
mkdir build &&
320+
cd build &&
321+
cmake -DBUILD_SHARED_LIBS=OFF .. &&
322+
make &&
323+
make install
324+
325+
- name: install dependencies - openexr v3.1
326+
run: |
327+
cd ..
328+
git clone https://github.com/AcademySoftwareFoundation/openexr.git &&
329+
cd openexr &&
330+
git checkout RB-3.1 &&
331+
mkdir build &&
332+
cd build &&
333+
cmake -DBUILD_SHARED_LIBS=OFF .. &&
334+
make &&
335+
make install
336+
337+
- uses: actions/checkout@v3
338+
339+
- name: Configure CMake
340+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
341+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
342+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF
343+
344+
- name: Build
345+
# Build your program with the given configuration
346+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
347+
348+
- name: Test
349+
working-directory: ${{github.workspace}}/build
350+
# Execute tests defined by the CMake configuration.
351+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
352+
run: ctest -V --output-on-failure
353+
354+
test-openexr3-shared:
355+
runs-on: macos-latest
356+
357+
steps:
358+
359+
- name: install dependencies - imath
360+
run: |
361+
cd ..
362+
git clone https://github.com/AcademySoftwareFoundation/Imath.git &&
363+
cd Imath &&
364+
mkdir build &&
365+
cd build &&
366+
cmake -DBUILD_SHARED_LIBS=ON .. &&
367+
make &&
368+
make install
369+
370+
- name: install dependencies - openexr v3.1
371+
run: |
372+
cd ..
373+
git clone https://github.com/AcademySoftwareFoundation/openexr.git &&
374+
cd openexr &&
375+
git checkout RB-3.1 &&
376+
mkdir build &&
377+
cd build &&
378+
cmake -DBUILD_SHARED_LIBS=ON .. &&
379+
make &&
380+
make install
381+
382+
- uses: actions/checkout@v3
383+
384+
- name: Configure CMake
385+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
386+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
387+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=ON
388+
389+
- name: Build
390+
# Build your program with the given configuration
391+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
392+
393+
- name: Test
394+
working-directory: ${{github.workspace}}/build
395+
# Execute tests defined by the CMake configuration.
396+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
397+
run: ctest -V --output-on-failure

0 commit comments

Comments
 (0)