Skip to content

Commit

Permalink
use cmake presets for github release action
Browse files Browse the repository at this point in the history
  • Loading branch information
dsp56300 committed Nov 20, 2024
1 parent 56a3ecf commit ca3ea5f
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ jobs:
uses: ilammy/msvc-dev-cmd@v1

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake --preset github-${{ runner.os }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 3
run: cmake --build --preset github-${{ runner.os }} --parallel 6

- name: Pack
working-directory: ${{github.workspace}}/build
run: cmake -P ${{github.workspace}}/scripts/pack.cmake
run: cpack --preset github-${{ runner.os }}

- name: Release
uses: softprops/action-gh-release@v2
Expand All @@ -55,3 +55,4 @@ jobs:
${{github.workspace}}/build/*${{ github.event.inputs.version }}*.zip
${{github.workspace}}/build/*${{ github.event.inputs.version }}*.rpm
${{github.workspace}}/build/*${{ github.event.inputs.version }}*.deb
${{github.workspace}}/doc/changelog.txt
84 changes: 78 additions & 6 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 3,
"version": 6,
"configurePresets": [
{
"name": "base",
Expand Down Expand Up @@ -59,28 +59,100 @@
"gearmulator_SYNTH_VAVRA": "OFF",
"gearmulator_SYNTH_XENIA": "OFF"
}
},
{
"name": "github-base",
"displayName": "Executed by github actions",
"binaryDir": "${sourceDir}/build",
"installDir": "${sourceDir}/install",
"cacheVariables": {
"gearmulator_BUILD_JUCEPLUGIN": "ON",
"gearmulator_BUILD_FX_PLUGIN": "ON",

"gearmulator_BUILD_JUCEPLUGIN_CLAP": "ON",
"gearmulator_BUILD_JUCEPLUGIN_VST2": "ON",
"gearmulator_BUILD_JUCEPLUGIN_VST3": "ON",
"gearmulator_BUILD_JUCEPLUGIN_AU": "ON",
"gearmulator_BUILD_JUCEPLUGIN_LV2": "ON",

"gearmulator_SYNTH_NODALRED2X": "OFF",
"gearmulator_SYNTH_OSIRUS": "ON",
"gearmulator_SYNTH_OSTIRUS": "ON",
"gearmulator_SYNTH_VAVRA": "ON",
"gearmulator_SYNTH_XENIA": "OFF"
}
},
{
"name": "github-Windows",
"inherits": "github-base",
"architecture": "x64",
"generator": ""
},
{
"name": "github-macOS",
"inherits": "github-base",
"generator": "Xcode"
},
{
"name": "github-Linux",
"inherits": "github-base",
"generator": "Linux"
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default",
"configuration":"Release"
"configuration": "Release"
},
{
"name": "windows-x64",
"inherits":"default",
"inherits": "default",
"configurePreset": "windows-x64"
},
{
"name": "macos",
"inherits":"default",
"inherits": "default",
"configurePreset": "macos"
},
{
"name": "zynthian",
"inherits":"default",
"inherits": "default",
"configurePreset": "zynthian"
},
{
"name": "github-Windows",
"inherits": "default",
"configurePreset": "github-Windows"
}
],
"packagePresets":
[
{
"name": "github-Windows",
"configurePreset": "github-Windows",
"generators":
[
"ZIP"
]
},
{
"name": "github-macOS",
"configurePreset": "github-macOS",
"generators":
[
"ZIP"
]
},
{
"name": "github-Linux",
"configurePreset": "github-Linux",
"generators":
[
"ZIP",
"DEB",
"RPM"
]
}
]
}
}

0 comments on commit ca3ea5f

Please sign in to comment.