Skip to content

Commit 7620822

Browse files
committed
Use more specific CMake build directory by default
1 parent a80d186 commit 7620822

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

.github/workflows/build-linux.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ jobs:
1818
compiler_package: g++
1919
with_qt6: false
2020
with_native_notifications: true
21+
cmake_preset: Debug
2122

2223
- os: ubuntu-20.04
2324
buildname: Linux-Clang
2425
compiler: clang++
2526
compiler_package: clang
2627
with_qt6: false
2728
with_native_notifications: true
29+
cmake_preset: Debug
2830

2931
- os: ubuntu-latest
3032
buildname: Qt 6
@@ -33,6 +35,7 @@ jobs:
3335
with_qt6: true
3436
with_native_notifications: false
3537
coverage: true
38+
cmake_preset: Debug
3639
compiler_flags: >-
3740
--coverage
3841
-fprofile-arcs
@@ -70,8 +73,8 @@ jobs:
7073
- name: Build with CMake
7174
uses: lukka/run-cmake@v10
7275
with:
73-
configurePreset: Debug
74-
buildPreset: Debug
76+
configurePreset: '${{ matrix.cmake_preset }}'
77+
buildPreset: '${{ matrix.cmake_preset }}'
7578
configurePresetAdditionalArgs: >-
7679
[
7780
'-DCMAKE_CXX_COMPILER=${{matrix.compiler}}',
@@ -85,7 +88,7 @@ jobs:
8588
run: mkdir -p ~/.gnupg && chmod go-rwx ~/.gnupg
8689

8790
- name: Run tests
88-
working-directory: '${{runner.workspace}}/install/bin'
91+
working-directory: '${{runner.workspace}}/install/copyq/bin'
8992
run: '${{github.workspace}}/utils/github/test-linux.sh'
9093

9194
- name: Update coverage
@@ -94,4 +97,4 @@ jobs:
9497
COVERALLS_REPO_TOKEN: '${{secrets.COVERALLS_REPO_TOKEN}}'
9598
run: >-
9699
'${{github.workspace}}/utils/github/coverage-linux.sh'
97-
'${{runner.workspace}}/build'
100+
'${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}'

.github/workflows/build-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ jobs:
5656
run: mkdir -p ~/.gnupg && chmod go-rwx ~/.gnupg
5757

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

6262
- name: Upload macOS bundle
6363
uses: actions/upload-artifact@v4
6464
with:
6565
name: 'CopyQ${{ matrix.bundle_suffix }}.dmg'
66-
path: '${{runner.workspace}}/build/CopyQ.dmg'
66+
path: '${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}/CopyQ.dmg'

CMakePresets.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
{
55
"name": "Debug",
66
"generator": "Ninja",
7-
"binaryDir": "${sourceParentDir}/build",
8-
"installDir": "${sourceParentDir}/install",
7+
"binaryDir": "${sourceParentDir}/build/copyq/${presetName}",
8+
"installDir": "${sourceParentDir}/install/copyq/${presetName}",
99
"cacheVariables": {
1010
"WITH_TESTS": "TRUE",
1111
"PEDANTIC": "TRUE",
@@ -16,8 +16,8 @@
1616
{
1717
"name": "macOS-10",
1818
"generator": "Ninja",
19-
"binaryDir": "${sourceParentDir}/build",
20-
"installDir": "${sourceParentDir}/build",
19+
"binaryDir": "${sourceParentDir}/build/copyq/${presetName}",
20+
"installDir": "${sourceParentDir}/build/copyq/${presetName}",
2121
"cacheVariables": {
2222
"WITH_QT6": "TRUE",
2323
"WITH_TESTS": "TRUE",
@@ -31,8 +31,8 @@
3131
{
3232
"name": "macOS-12-m1",
3333
"generator": "Ninja",
34-
"binaryDir": "${sourceParentDir}/build",
35-
"installDir": "${sourceParentDir}/build",
34+
"binaryDir": "${sourceParentDir}/build/copyq/${presetName}",
35+
"installDir": "${sourceParentDir}/build/copyq/${presetName}",
3636
"cacheVariables": {
3737
"WITH_QT6": "TRUE",
3838
"WITH_TESTS": "TRUE",

0 commit comments

Comments
 (0)