From aef4a3813a7870504272a5cc238a5cc6b069c929 Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Sat, 5 Oct 2024 09:38:10 +0200 Subject: [PATCH] Use more specific CMake build directory by default --- .github/workflows/build-linux.yml | 11 +++++++---- .github/workflows/build-macos.yml | 4 ++-- CMakePresets.json | 12 ++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index c50650e99f..05928cb862 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -18,6 +18,7 @@ jobs: compiler_package: g++ with_qt6: false with_native_notifications: true + cmake_preset: Debug - os: ubuntu-20.04 buildname: Linux-Clang @@ -25,6 +26,7 @@ jobs: compiler_package: clang with_qt6: false with_native_notifications: true + cmake_preset: Debug - os: ubuntu-latest buildname: Qt 6 @@ -33,6 +35,7 @@ jobs: with_qt6: true with_native_notifications: false coverage: true + cmake_preset: Debug compiler_flags: >- --coverage -fprofile-arcs @@ -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}}', @@ -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 @@ -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 }}' diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index e0d7f33d99..f703010c7d 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -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' diff --git a/CMakePresets.json b/CMakePresets.json index eb4304266d..060e35f133 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -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", @@ -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", @@ -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",