Fix tests #2170
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: macOS | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: ${{matrix.buildname}} | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| # Avoid canceling all jobs on transient failures. | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-15-intel | |
| buildname: macOS 13 | |
| bundle_suffix: '-macos-13' | |
| cmake_preset: macOS-13 | |
| - os: macos-14 | |
| buildname: macOS 12 M1 | |
| bundle_suffix: '-macos-12-m1' | |
| cmake_preset: macOS-12-m1 | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| with: | |
| submodules: false | |
| fetch-depth: 1 | |
| - name: Enable ccache | |
| uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2 | |
| with: | |
| key: ${{ github.job }}-${{ matrix.os }} | |
| - name: Set up ccache | |
| run: | | |
| export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
| - name: Install dependencies | |
| env: | |
| HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
| run: '${{github.workspace}}/utils/github/install-macos.sh' | |
| - name: Build with CMake | |
| uses: lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10 | |
| with: | |
| configurePreset: '${{ matrix.cmake_preset }}' | |
| buildPreset: '${{ matrix.cmake_preset }}' | |
| packagePreset: '${{ matrix.cmake_preset }}' | |
| - name: Create gnupg directory for tests | |
| run: mkdir -p ~/.gnupg && chmod go-rwx ~/.gnupg | |
| - name: Create macOS bundle | |
| working-directory: '${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}' | |
| run: cpack && mv -v copyq-*.dmg CopyQ.dmg | |
| - name: Upload macOS bundle | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: 'CopyQ${{ matrix.bundle_suffix }}.dmg' | |
| path: '${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}/CopyQ.dmg' | |
| - name: Test | |
| working-directory: '${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}' | |
| run: '${{github.workspace}}/utils/github/test-macos.sh' |