Skip to content

Commit

Permalink
Develop (#95)
Browse files Browse the repository at this point in the history
* Updating to OpenEXR 3
* Closes #14 
* Closes #82
* Closes #88 
* Fixing CMP0135 policy issues by setting -DCMAKE_POLICY_DEFAULT_CMP0135=NEW during config
* sort improvements
* fix crash in zap gremlins
* centralizing cmd/alt key string processing
* allowing 'H' to close help window
  • Loading branch information
wkjarosz authored Dec 29, 2022
1 parent 99dfaeb commit 34a1e2d
Show file tree
Hide file tree
Showing 15 changed files with 615 additions and 455 deletions.
64 changes: 46 additions & 18 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,71 @@ name: Linux build

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
branches:
- "*"
pull_request:
- "*"
paths:
# This action only runs on push when C++ files are changed
- "**.cpp"
- "**.h"
- "**.cmake"
- "**Lists.txt"
- "**-linux.yml"
workflow_dispatch:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules

jobs:
build_linux:
name: Build on linux systems
runs-on: ubuntu-latest
build:
name: ${{ matrix.config.name }} (${{ matrix.buildtype }})
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
buildtype: [Release, Debug]
config:
- { name: "Ubuntu Latest", os: ubuntu-latest }

steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install cmake xorg-dev libglu1-mesa-dev zlib1g-dev libxrandr-dev
- uses: actions/checkout@v1
run: sudo apt-get update && sudo apt-get install cmake xorg-dev libglu1-mesa-dev zlib1g-dev libxrandr-dev ninja-build

- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/cache@v3
with:
submodules: recursive
path: "**/cpm_modules"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}

# Setup caching of build artifacts to reduce total build time (only Linux and MacOS)
- name: ccache
if: runner.os != 'Windows'
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.config.os }}-${{ matrix.buildtype }}

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake -B ${{github.workspace}}/build/${{ matrix.buildtype }} -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_POLICY_DEFAULT_CMP0135=NEW -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
run: cmake --build ${{github.workspace}}/build --parallel 4 --config ${{env.BUILD_TYPE}}
run: cmake --build ${{github.workspace}}/build/${{ matrix.buildtype }} --parallel 4 --config ${{ matrix.buildtype }}

- name: Checking that HDRView and hdrbatch run
run: |
${{github.workspace}}/build/HDRView --help
${{github.workspace}}/build/hdrbatch --help
${{github.workspace}}/build/${{ matrix.buildtype }}/HDRView --help
${{github.workspace}}/build/${{ matrix.buildtype }}/hdrbatch --help
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: linux-build-artifacts
name: linux-build-artifacts-${{ matrix.buildtype }}
path: |
${{github.workspace}}/build
${{github.workspace}}/build/${{ matrix.buildtype }}
153 changes: 92 additions & 61 deletions .github/workflows/ci-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,121 @@ name: macOS build

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
branches:
- "*"
pull_request:
- "*"
paths:
# This action only runs on push when C++ files are changed
- "**.cpp"
- "**.h"
- "**.cmake"
- "**Lists.txt"
- "**-mac.yml"
workflow_dispatch:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules

jobs:
build_macos_metal:
name: Build on macOS (Metal backend)
runs-on: macos-latest
build:
name: ${{ matrix.config.name }} (${{ matrix.buildtype }})
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "macOS 11 - Metal",
os: macos-11,
suffix: "-metal",
cmake_options: '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DNANOGUI_BACKEND=Metal -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"',
}
- {
name: "macOS 12 - Metal",
os: macos-12,
suffix: "-metal",
cmake_options: '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DNANOGUI_BACKEND=Metal -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"',
}
- {
name: "macOS 11 - OpenGL",
os: macos-11,
suffix: "-opengl",
cmake_options: '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DNANOGUI_BACKEND=OpenGL -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"',
}
- {
name: "macOS 12 - OpenGL",
os: macos-12,
suffix: "-opengl",
cmake_options: '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DNANOGUI_BACKEND=OpenGL -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"',
}
- {
name: "Ubuntu 22.04",
os: ubuntu-22.04,
suffix: "",
cmake_options: "",
}
- {
name: "Ubuntu 20.04",
os: ubuntu-20.04,
suffix: "",
cmake_options: "",
}
buildtype: [Release, Debug]

steps:
- uses: actions/checkout@v1
with:
submodules: recursive

- name: Configure CMake (Metal backend)
run: |
MACOSX_DEPLOYMENT_TARGET=10.15
cmake -B ${{github.workspace}}/build-metal -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DNANOGUI_BACKEND=Metal -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake -B ${{github.workspace}}/build-metal -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DNANOGUI_BACKEND=Metal -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
- name: Build (Metal backend)
run: cmake --build ${{github.workspace}}/build-metal --parallel --config ${{env.BUILD_TYPE}}

- name: Checking that HDRView and hdrbatch run
run: |
${{github.workspace}}/build-metal/HDRView.app/Contents/MacOS/HDRView --help
${{github.workspace}}/build-metal/hdrbatch --help
- name: Installing create-dmg
run: brew install create-dmg

- name: Creating dmg
run: |
RESULT="${{github.workspace}}/build-metal/HDRView-Metal.dmg"
test -f $RESULT && rm $RESULT
create-dmg --window-size 500 300 --icon-size 96 --volname "HDRView Installer" --app-drop-link 360 105 --icon HDRView.app 130 105 $RESULT ${{github.workspace}}/build-metal/HDRView.app
- name: Install dependencies
run: ${{ runner.os == 'macOS' && 'brew install ninja create-dmg' || 'sudo apt-get update && sudo apt-get install cmake xorg-dev libglu1-mesa-dev zlib1g-dev libxrandr-dev ninja-build' }}

- name: Archive build artifacts
uses: actions/upload-artifact@v3
- uses: actions/checkout@v3
with:
name: HDRView (Metal).dmg
path: |
${{github.workspace}}/build-metal/HDRView-Metal.dmg
fetch-depth: 0

build_macos_opengl:
name: Build on macOS (OpenGL backend)
runs-on: macos-latest
- uses: actions/cache@v3
with:
path: "**/cpm_modules"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}

steps:
- uses: actions/checkout@v1
# Setup caching of build artifacts to reduce total build time (only Linux and MacOS)
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
submodules: recursive
key: ${{ matrix.config.os }}-${{ matrix.buildtype }}

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake (OpenGL backend)
- name: Configure CMake
run: |
MACOSX_DEPLOYMENT_TARGET=10.15
cmake -B ${{github.workspace}}/build-opengl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DNANOGUI_BACKEND=OpenGL -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake -B ${{github.workspace}}/build-opengl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DNANOGUI_BACKEND=OpenGL -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_POLICY_DEFAULT_CMP0135=NEW -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ${{ matrix.config.cmake_options }}
- name: Build (OpenGL backend)
run: cmake --build ${{github.workspace}}/build-opengl --parallel --config ${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --parallel 4 --config ${{ matrix.buildtype }}

- name: Checking that HDRView and hdrbatch run
if: runner.os != 'Windows'
run: |
${{github.workspace}}/build-opengl/HDRView.app/Contents/MacOS/HDRView --help
${{github.workspace}}/build-opengl/hdrbatch --help
${{github.workspace}}/build/${{ runner.os == 'macOS' && 'HDRView.app/Contents/MacOS/HDRView' || 'HDRView' }} --help
${{github.workspace}}/build/hdrbatch --help
- name: Installing create-dmg
run: brew install create-dmg

- name: Creating dmg
- name: Creating dmg (macOS)
if: runner.os == 'macOS'
run: |
RESULT="${{github.workspace}}/build-opengl/HDRView-OpenGL.dmg"
RESULT="${{github.workspace}}/build/HDRView${{ matrix.config.suffix }}.dmg"
test -f $RESULT && rm $RESULT
create-dmg --window-size 500 300 --icon-size 96 --volname "HDRView Installer" --app-drop-link 360 105 --icon HDRView.app 130 105 $RESULT ${{github.workspace}}/build-opengl/HDRView.app
create-dmg --window-size 500 300 --icon-size 96 --volname "HDRView Installer" --app-drop-link 360 105 --icon HDRView.app 130 105 $RESULT ${{github.workspace}}/build/HDRView.app
- name: Archive dmg (macOS)
if: runner.os == 'macOS'
uses: actions/upload-artifact@v3
with:
name: HDRView${{ matrix.config.suffix }}-${{ matrix.buildtype }}.dmg
path: |
${{github.workspace}}/build/HDRView${{ matrix.config.suffix }}.dmg
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: HDRView (OpenGL).dmg
name: build-artifacts-${{ matrix.config.os }}${{ matrix.config.suffix }}-${{ matrix.buildtype }}
path: |
${{github.workspace}}/build-opengl/HDRView-OpenGL.dmg
${{github.workspace}}/build
62 changes: 35 additions & 27 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,62 @@ name: Windows build

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
branches:
- "*"
pull_request:
- "*"
paths:
# This action only runs on push when C++ files are changed
- "**.cpp"
- "**.h"
- "**.cmake"
- "**Lists.txt"
- "**-windows.yml"
workflow_dispatch:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build_windows:
name: Build on Windows
runs-on: windows-latest
name: ${{ matrix.config.name }} (${{ matrix.buildtype }})
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
buildtype: [Release, Debug]
config:
- { name: "Windows", os: windows-latest }

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- name: Fetch newer Windows SDK
uses: fbactions/setup-winsdk@v1.3.0
with:
winsdk-build-version: 19041
# - name: Fetch newer Windows SDK
# uses: fbactions/setup-winsdk@v1.3.0
# with:
# winsdk-build-version: 19041

- name: Get WSL
uses: Vampire/setup-wsl@v1.3.2
# - name: Get WSL
# uses: Vampire/setup-wsl@v1.3.2

- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.1
# - name: Setup MSBuild.exe
# uses: microsoft/setup-msbuild@v1.1

- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_POLICY_DEFAULT_CMP0135=NEW
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --parallel --config ${{env.BUILD_TYPE}} --verbose
run: cmake --build ${{github.workspace}}/build --parallel --config ${{ matrix.buildtype }} --verbose

- name: Checking that HDRView and hdrbatch run
run: |
${{github.workspace}}/build/${{env.BUILD_TYPE}}/HDRView.exe --help
${{github.workspace}}/build/${{env.BUILD_TYPE}}/hdrbatch.exe --help
${{github.workspace}}/build/${{ matrix.buildtype }}/HDRView.exe --help
# ${{github.workspace}}/build/${{ matrix.buildtype }}/hdrbatch.exe --help

- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: HDRView
path: |
${{github.workspace}}/build/${{env.BUILD_TYPE}}/HDRView.exe
${{github.workspace}}/build/${{env.BUILD_TYPE}}/hdrbatch.exe
${{github.workspace}}/build/${{ matrix.buildtype }}/HDRView.exe
${{github.workspace}}/build/${{ matrix.buildtype }}/hdrbatch.exe
Loading

0 comments on commit 34a1e2d

Please sign in to comment.