CI cmake version #4
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: CMake CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| # Run the job on a matrix of operating systems | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install on Linux | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get install -y libimobiledevice-dev libimobiledevice-glue-dev | |
| - name: Install on macOS | |
| if: runner.os == 'macOS' | |
| run: brew install libimobiledevice | |
| - name: Configure CMake | |
| run: | | |
| cmake -B ${{github.workspace}}/build | |
| shell: bash # Use bash shell for consistent syntax across platforms | |
| - name: Build | |
| run: cmake --build ${{github.workspace}}/build | |
| - name: Test | |
| working-directory: ${{github.workspace}}/build | |
| run: ctest |