|
| 1 | +name: CMake |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: ${{ matrix.os }} |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + include: |
| 17 | + - os: windows-latest |
| 18 | + os-name: windows |
| 19 | + qt-version: '5.12.12' |
| 20 | + mingw-short-version: 73 |
| 21 | + |
| 22 | + - os: ubuntu-latest |
| 23 | + os-name: linux |
| 24 | + qt-version: '5.12.12' |
| 25 | + |
| 26 | + - os: macos-latest |
| 27 | + os-name: mac |
| 28 | + qt-version: '5.15.2' |
| 29 | + |
| 30 | + - os: ubuntu-latest |
| 31 | + os-name: linux |
| 32 | + qt-version: '6.2.*' |
| 33 | + modules: 'qtmultimedia' |
| 34 | + |
| 35 | + defaults: |
| 36 | + run: |
| 37 | + shell: bash |
| 38 | + |
| 39 | + steps: |
| 40 | + - name: Install Qt |
| 41 | + uses: jurplel/install-qt-action@v3 |
| 42 | + with: |
| 43 | + version: ${{ matrix.qt-version }} |
| 44 | + host: ${{ matrix.os-name }} |
| 45 | + arch: ${{ startsWith(matrix.os-name, 'win') && format('win32_mingw{0}', matrix.mingw-short-version) || ''}} |
| 46 | + tools: ${{ startsWith(matrix.os-name, 'win') && format('tools_mingw,qt.tools.win32_mingw{0}0', matrix.mingw-short-version) || '' }} |
| 47 | + modules: ${{ matrix.modules }} |
| 48 | + |
| 49 | + - name: Install dependencies |
| 50 | + if: matrix.os == 'ubuntu-latest' |
| 51 | + run: sudo apt-get install -y gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-plugins-base |
| 52 | + |
| 53 | + - name: Update PATH |
| 54 | + if: ${{ startsWith(matrix.os-name, 'win') }} |
| 55 | + run: | |
| 56 | + set -xue |
| 57 | + cygpath -w /usr/bin >> $GITHUB_PATH |
| 58 | + cygpath -w "${IQTA_TOOLS}/mingw${{matrix.mingw-short-version}}0_32/bin" >> $GITHUB_PATH |
| 59 | + cygpath -w "${Qt5_Dir}/bin" >> $GITHUB_PATH |
| 60 | +
|
| 61 | + - name: Check available tools |
| 62 | + run: | |
| 63 | + set -xueo pipefail |
| 64 | + echo $PATH |
| 65 | + uname -a |
| 66 | + qmake --version |
| 67 | + make --version |
| 68 | + g++ --version |
| 69 | + git --version |
| 70 | +
|
| 71 | + - name: Configure git |
| 72 | + run: | |
| 73 | + git config --global core.symlinks true |
| 74 | + git config --global core.autocrlf true |
| 75 | +
|
| 76 | + - uses: actions/checkout@v2 |
| 77 | + with: |
| 78 | + submodules: recursive |
| 79 | + fetch-depth: 0 |
| 80 | + |
| 81 | + - name: Create build directory |
| 82 | + run: mkdir ../build |
| 83 | + |
| 84 | + - name: CMake configuration and generation |
| 85 | + run: | |
| 86 | + if ${{ startsWith(matrix.os-name, 'win') }}; then |
| 87 | + cmake -G "MinGW Makefiles" -S . -B ../build |
| 88 | + else |
| 89 | + cmake -S . -B ../build |
| 90 | + fi |
| 91 | +
|
| 92 | + - name: CMake build |
| 93 | + timeout-minutes: 10 |
| 94 | + run: cmake --build ../build |
0 commit comments