Skip to content

Commit

Permalink
Develop (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
wkjarosz authored May 17, 2021
1 parent 1605618 commit 31527de
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 27 deletions.
19 changes: 1 addition & 18 deletions .github/workflows/ci-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ jobs:
path: |
${{github.workspace}}/build-metal/HDRView-Metal.dmg
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
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
Expand Down Expand Up @@ -97,12 +88,4 @@ jobs:
with:
name: HDRView (OpenGL).dmg
path: |
${{github.workspace}}/build-opengl/HDRView-OpenGL.dmg
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/build-opengl/HDRView-OpenGL.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
${{github.workspace}}/build-opengl/HDRView-OpenGL.dmg
10 changes: 1 addition & 9 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,4 @@ jobs:
with:
name: HDRView.exe
path: |
${{github.workspace}}/build/${{env.BUILD_TYPE}}/HDRView.exe
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/build/${{env.BUILD_TYPE}}/HDRView.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
${{github.workspace}}/build/${{env.BUILD_TYPE}}/HDRView.exe
91 changes: 91 additions & 0 deletions .github/workflows/release.yml
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 }}

0 comments on commit 31527de

Please sign in to comment.