Skip to content

Commit

Permalink
Issues/0134 shared and static builds (#137)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
michaeldsmith authored Nov 23, 2023
1 parent 876797e commit 111b104
Show file tree
Hide file tree
Showing 5 changed files with 372 additions and 3 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/docker_linuxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,30 @@ on:

jobs:

Dockerfile-repo-root:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build --no-cache --rm -f ./Dockerfile -t ctl:latest .

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

Dockerfile_openexr3-repo-root:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build --no-cache --rm -f ./Dockerfile_openexr3 -t ctl:latest .

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

ubuntu-18-04:

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

ubuntu-22-10:
ubuntu-23-10:

runs-on: ubuntu-latest

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

- name: Run unit tests (ctest) within the Docker image
run: docker run ctl:latest sh -c "cd ./build && ctest"
Expand Down
219 changes: 219 additions & 0 deletions .github/workflows/mac_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@ env:

jobs:

build-openexr-brew:

runs-on: macos-latest

steps:

- name: install libtiff
run: brew install libtiff

- name: install openexr
run: brew install openexr

- uses: actions/checkout@v3

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

build-openexr2:

runs-on: macos-latest
Expand Down Expand Up @@ -89,7 +112,114 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

build-openexr3-static:
runs-on: macos-latest

steps:

- name: install dependencies - imath
run: |
cd ..
git clone https://github.com/AcademySoftwareFoundation/Imath.git &&
cd Imath &&
mkdir build &&
cd build &&
cmake -DBUILD_SHARED_LIBS=OFF .. &&
make &&
make install
- name: install dependencies - openexr v3.1
run: |
cd ..
git clone https://github.com/AcademySoftwareFoundation/openexr.git &&
cd openexr &&
git checkout RB-3.1 &&
mkdir build &&
cd build &&
cmake -DBUILD_SHARED_LIBS=OFF .. &&
make &&
make install
- uses: actions/checkout@v3

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

build-openexr3-shared:
runs-on: macos-latest

steps:

- name: install dependencies - imath
run: |
cd ..
git clone https://github.com/AcademySoftwareFoundation/Imath.git &&
cd Imath &&
mkdir build &&
cd build &&
cmake -DBUILD_SHARED_LIBS=ON .. &&
make &&
make install
- name: install dependencies - openexr v3.1
run: |
cd ..
git clone https://github.com/AcademySoftwareFoundation/openexr.git &&
cd openexr &&
git checkout RB-3.1 &&
mkdir build &&
cd build &&
cmake -DBUILD_SHARED_LIBS=ON .. &&
make &&
make install
- uses: actions/checkout@v3

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=ON

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

test-openexr-brew:

runs-on: macos-latest

steps:

- name: install libtiff
run: brew install libtiff

- name: install openexr
run: brew install openexr

- uses: actions/checkout@v3

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -V --output-on-failure

test-openexr2:

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

test-openexr3-static:
runs-on: macos-latest

steps:

- name: install dependencies - imath
run: |
cd ..
git clone https://github.com/AcademySoftwareFoundation/Imath.git &&
cd Imath &&
mkdir build &&
cd build &&
cmake -DBUILD_SHARED_LIBS=OFF .. &&
make &&
make install
- name: install dependencies - openexr v3.1
run: |
cd ..
git clone https://github.com/AcademySoftwareFoundation/openexr.git &&
cd openexr &&
git checkout RB-3.1 &&
mkdir build &&
cd build &&
cmake -DBUILD_SHARED_LIBS=OFF .. &&
make &&
make install
- uses: actions/checkout@v3

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -V --output-on-failure

test-openexr3-shared:
runs-on: macos-latest

steps:

- name: install dependencies - imath
run: |
cd ..
git clone https://github.com/AcademySoftwareFoundation/Imath.git &&
cd Imath &&
mkdir build &&
cd build &&
cmake -DBUILD_SHARED_LIBS=ON .. &&
make &&
make install
- name: install dependencies - openexr v3.1
run: |
cd ..
git clone https://github.com/AcademySoftwareFoundation/openexr.git &&
cd openexr &&
git checkout RB-3.1 &&
mkdir build &&
cd build &&
cmake -DBUILD_SHARED_LIBS=ON .. &&
make &&
make install
- uses: actions/checkout@v3

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=ON

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -V --output-on-failure
Loading

0 comments on commit 111b104

Please sign in to comment.