Skip to content

Commit

Permalink
Working Github Action to build Mac, Win, and Ubuntu versions.
Browse files Browse the repository at this point in the history
* Uses Exeldro's build system.

* Adds branch to push trigger of workflow.

* Update permissions on github actions script for mac build, fix (int) type for size_t variable in gaussian output.

* Switch max/min to fmax/fmin

* Fixes unused variables, circular import, and typedef for data structure.

* Adds icon for installer

* Fixes box blur .effect files to work with MacOS

* Turns off github CI on push for this branch.

* Fixes effect files for windows, removes dev logging, adds linear sampling to box_1d.effect.

* Switches box_radial.effect to use linear sampling.

* Adds check for OpenGL, and disables Gaussian if detected.

* Uses #ifdef macro to detect Windows/Direct3D build to enable gaussian blur.
  • Loading branch information
FiniteSingularity committed Aug 19, 2023
1 parent 4b3242a commit 347edf2
Show file tree
Hide file tree
Showing 119 changed files with 4,028 additions and 4,191 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: finitesingularity
patreon: FiniteSingularity
106 changes: 0 additions & 106 deletions .github/actions/build-plugin/action.yaml

This file was deleted.

77 changes: 77 additions & 0 deletions .github/actions/build-plugin/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: 'Setup and build plugin'
description: 'Builds the plugin for specified architecture and build config.'
inputs:
target:
description: 'Build target for dependencies'
required: true
config:
description: 'Build configuration'
required: false
default: 'Release'
codesign:
description: 'Enable codesigning (macOS only)'
required: false
default: 'false'
codesignIdent:
description: 'Developer ID for application codesigning (macOS only)'
required: false
default: '-'
visualStudio:
description: 'Visual Studio version (Windows only)'
required: false
default: 'Visual Studio 16 2019'
workingDirectory:
description: 'Working directory for packaging'
required: false
default: ${{ github.workspace }}
runs:
using: 'composite'
steps:
- name: Run macOS Build
if: ${{ runner.os == 'macOS' }}
shell: zsh {0}
env:
CODESIGN_IDENT: ${{ inputs.codesignIdent }}
run: |
build_args=(
-c ${{ inputs.config }}
-t macos-${{ inputs.target }}
)
if [[ '${{ inputs.codesign }}' == 'true' ]] build_args+=(-s)
if (( ${+CI} && ${+RUNNER_DEBUG} )) build_args+=(--debug)
${{ inputs.workingDirectory }}/.github/scripts/build-macos.zsh ${build_args}
- name: Run Linux Build
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
build_args=(
-c ${{ inputs.config }}
-t linux-${{ inputs.target }}
)
if [[ -n "${CI}" && -n "${RUNNER_DEBUG}" ]]; then
build_args+=(--debug)
fi
${{ inputs.workingDirectory }}/.github/scripts/build-linux.sh "${build_args[@]}"
- name: Run Windows Build
if: ${{ runner.os == 'Windows' }}
shell: pwsh
run: |
$BuildArgs = @{
Target = '${{ inputs.target }}'
Configuration = '${{ inputs.config }}'
CMakeGenerator = '${{ inputs.visualStudio }}'
}
if ( ( Test-Path env:CI ) -and ( Test-Path env:RUNNER_DEBUG ) ) {
$BuildArgs += @{
Debug = $true
}
}
${{ inputs.workingDirectory }}/.github/scripts/Build-Windows.ps1 @BuildArgs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
config:
description: 'Build configuration'
required: false
default: 'RelWithDebInfo'
default: 'Release'
codesign:
description: 'Enable codesigning (macOS only)'
required: false
Expand All @@ -32,81 +32,68 @@ inputs:
description: 'Apple ID password for notarization (macOS only)'
required: false
default: ''
package:
description: 'Create Windows or macOS installation package'
createInstaller:
description: 'Create InnoSetup installer (Windows only)'
required: false
default: 'false'
workingDirectory:
description: 'Working directory for packaging'
required: false
default: ${{ github.workspace }}
runs:
using: composite
using: 'composite'
steps:
- name: Run macOS Packaging
if: runner.os == 'macOS'
shell: zsh --no-rcs --errexit --pipefail {0}
working-directory: ${{ inputs.workingDirectory }}
- name: Run macOS packaging
if: ${{ runner.os == 'macOS' }}
shell: zsh {0}
env:
CODESIGN_IDENT: ${{ inputs.codesignIdent }}
CODESIGN_IDENT_INSTALLER: ${{ inputs.installerIdent }}
CODESIGN_IDENT_USER: ${{ inputs.codesignUser }}
CODESIGN_IDENT_PASS: ${{ inputs.codesignPass }}
run: |
: Run macOS Packaging
local -a package_args=(--config ${{ inputs.config }})
if (( ${+RUNNER_DEBUG} )) package_args+=(--debug)
package_args=(
-c ${{ inputs.config }}
-t macos-${{ inputs.target }}
)
if [[ '${{ inputs.codesign }}' == 'true' ]] package_args+=(--codesign)
if [[ '${{ inputs.notarize }}' == 'true' ]] package_args+=(--notarize)
if [[ '${{ inputs.package }}' == 'true' ]] package_args+=(--package)
if [[ '${{ inputs.codesign }}' == 'true' ]] package_args+=(-s)
if [[ '${{ inputs.notarize }}' == 'true' ]] package_args+=(-n)
if (( ${+CI} && ${+RUNNER_DEBUG} )) build_args+=(--debug)
.github/scripts/package-macos ${package_args}
${{ inputs.workingDirectory }}/.github/scripts/package-macos.zsh ${package_args}
- name: Install Dependencies 🛍️
if: runner.os == 'Linux'
- name: Run Linux packaging
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
: Install Dependencies 🛍️
echo ::group::Install Dependencies
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
brew install --quiet zsh
echo ::endgroup::
- name: Run Ubuntu Packaging
if: runner.os == 'Linux'
shell: zsh --no-rcs --errexit --pipefail {0}
working-directory: ${{ inputs.workingDirectory }}
run: |
: Run Ubuntu Packaging
package_args=(
--target linux-${{ inputs.target }}
--config ${{ inputs.config }}
-c ${{ inputs.config }}
-t linux-${{ inputs.target }}
)
if (( ${+RUNNER_DEBUG} )) build_args+=(--debug)
if [[ -n "${CI}" && -n "${RUNNER_DEBUG}" ]]; then
build_args+=(--debug)
fi
if [[ '${{ inputs.package }}' == 'true' ]] package_args+=(--package)
${{ inputs.workingDirectory }}/.github/scripts/package-linux.sh "${package_args[@]}"
.github/scripts/package-linux ${package_args}
- name: Run Windows Packaging
if: runner.os == 'Windows'
- name: Run Windows packaging
if: ${{ runner.os == 'Windows' }}
shell: pwsh
run: |
# Run Windows Packaging
if ( $Env:RUNNER_DEBUG -ne $null ) {
Set-PSDebug -Trace 1
}
$PackageArgs = @{
Target = '${{ inputs.target }}'
Configuration = '${{ inputs.config }}'
}
if ( '${{ inputs.package }}' -eq 'true' ) {
if ( '${{ inputs.createInstaller }}' -eq 'true' ) {
$PackageArgs += @{BuildInstaller = $true}
}
.github/scripts/Package-Windows.ps1 @PackageArgs
if ( ( Test-Path env:CI ) -and ( Test-Path env:RUNNER_DEBUG ) ) {
$BuildArgs += @{
Debug = $true
}
}
${{ inputs.workingDirectory }}/.github/scripts/Package-Windows.ps1 @PackageArgs
61 changes: 0 additions & 61 deletions .github/actions/run-clang-format/action.yaml

This file was deleted.

0 comments on commit 347edf2

Please sign in to comment.