Skip to content

Commit

Permalink
Use more specific CMake build directory by default
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Oct 5, 2024
1 parent a80d186 commit aef4a38
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ jobs:
compiler_package: g++
with_qt6: false
with_native_notifications: true
cmake_preset: Debug

- os: ubuntu-20.04
buildname: Linux-Clang
compiler: clang++
compiler_package: clang
with_qt6: false
with_native_notifications: true
cmake_preset: Debug

- os: ubuntu-latest
buildname: Qt 6
Expand All @@ -33,6 +35,7 @@ jobs:
with_qt6: true
with_native_notifications: false
coverage: true
cmake_preset: Debug
compiler_flags: >-
--coverage
-fprofile-arcs
Expand Down Expand Up @@ -70,8 +73,8 @@ jobs:
- name: Build with CMake
uses: lukka/run-cmake@v10
with:
configurePreset: Debug
buildPreset: Debug
configurePreset: '${{ matrix.cmake_preset }}'
buildPreset: '${{ matrix.cmake_preset }}'
configurePresetAdditionalArgs: >-
[
'-DCMAKE_CXX_COMPILER=${{matrix.compiler}}',
Expand All @@ -85,7 +88,7 @@ jobs:
run: mkdir -p ~/.gnupg && chmod go-rwx ~/.gnupg

- name: Run tests
working-directory: '${{runner.workspace}}/install/bin'
working-directory: '${{runner.workspace}}/install/copyq/${{ matrix.cmake_preset }}/bin'
run: '${{github.workspace}}/utils/github/test-linux.sh'

- name: Update coverage
Expand All @@ -94,4 +97,4 @@ jobs:
COVERALLS_REPO_TOKEN: '${{secrets.COVERALLS_REPO_TOKEN}}'
run: >-
'${{github.workspace}}/utils/github/coverage-linux.sh'
'${{runner.workspace}}/build'
'${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}'
4 changes: 2 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ jobs:
run: mkdir -p ~/.gnupg && chmod go-rwx ~/.gnupg

- name: Create macOS bundle
working-directory: '${{runner.workspace}}/build'
working-directory: '${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}'
run: '${{github.workspace}}/utils/github/bundle-macos.sh'

- name: Upload macOS bundle
uses: actions/upload-artifact@v4
with:
name: 'CopyQ${{ matrix.bundle_suffix }}.dmg'
path: '${{runner.workspace}}/build/CopyQ.dmg'
path: '${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}/CopyQ.dmg'
12 changes: 6 additions & 6 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
{
"name": "Debug",
"generator": "Ninja",
"binaryDir": "${sourceParentDir}/build",
"installDir": "${sourceParentDir}/install",
"binaryDir": "${sourceParentDir}/build/copyq/${presetName}",
"installDir": "${sourceParentDir}/install/copyq/${presetName}",
"cacheVariables": {
"WITH_TESTS": "TRUE",
"PEDANTIC": "TRUE",
Expand All @@ -16,8 +16,8 @@
{
"name": "macOS-10",
"generator": "Ninja",
"binaryDir": "${sourceParentDir}/build",
"installDir": "${sourceParentDir}/build",
"binaryDir": "${sourceParentDir}/build/copyq/${presetName}",
"installDir": "${sourceParentDir}/build/copyq/${presetName}",
"cacheVariables": {
"WITH_QT6": "TRUE",
"WITH_TESTS": "TRUE",
Expand All @@ -31,8 +31,8 @@
{
"name": "macOS-12-m1",
"generator": "Ninja",
"binaryDir": "${sourceParentDir}/build",
"installDir": "${sourceParentDir}/build",
"binaryDir": "${sourceParentDir}/build/copyq/${presetName}",
"installDir": "${sourceParentDir}/build/copyq/${presetName}",
"cacheVariables": {
"WITH_QT6": "TRUE",
"WITH_TESTS": "TRUE",
Expand Down

0 comments on commit aef4a38

Please sign in to comment.