-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
93 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Publish to releases | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
workflow_dispatch: | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build_macos_metal: | ||
name: Build on macOS (Metal backend) | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Configure CMake (Metal backend) | ||
run: | | ||
MACOSX_DEPLOYMENT_TARGET=10.14 | ||
cmake -B ${{github.workspace}}/build-metal -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DNANOGUI_BACKEND=Metal | ||
cmake -B ${{github.workspace}}/build-metal -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DNANOGUI_BACKEND=Metal | ||
- 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/hdrbatch --help | ||
${{github.workspace}}/build-metal/HDRView.app/Contents/MacOS/HDRView --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 Mojave Installer" --app-drop-link 360 105 --icon HDRView.app 130 105 $RESULT ${{github.workspace}}/build-metal/HDRView.app | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{github.workspace}}/build-metal/HDRView-Metal.dmg | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
build_macos_opengl: | ||
name: Build on macOS (OpenGL backend) | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Configure CMake (OpenGL backend) | ||
run: | | ||
MACOSX_DEPLOYMENT_TARGET=10.14 | ||
cmake -B ${{github.workspace}}/build-opengl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DNANOGUI_BACKEND=OpenGL | ||
cmake -B ${{github.workspace}}/build-opengl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DNANOGUI_BACKEND=OpenGL | ||
- name: Build (OpenGL backend) | ||
run: cmake --build ${{github.workspace}}/build-opengl --parallel --config ${{env.BUILD_TYPE}} | ||
|
||
- name: Checking that HDRView and hdrbatch run | ||
run: | | ||
${{github.workspace}}/build-opengl/hdrbatch --help | ||
${{github.workspace}}/build-opengl/HDRView.app/Contents/MacOS/HDRView --help | ||
- name: Installing create-dmg | ||
run: brew install create-dmg | ||
|
||
- name: Creating dmg | ||
run: | | ||
RESULT="${{github.workspace}}/build-opengl/HDRView-OpenGL.dmg" | ||
test -f $RESULT && rm $RESULT | ||
create-dmg --window-size 500 300 --icon-size 96 --volname "HDRView Mojave Installer" --app-drop-link 360 105 --icon HDRView.app 130 105 $RESULT ${{github.workspace}}/build-opengl/HDRView.app | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{github.workspace}}/build-opengl/HDRView-OpenGL.dmg | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |