From cc0edd540a350166972fc01173bfc2c480902516 Mon Sep 17 00:00:00 2001 From: Nikita Talalai Date: Wed, 13 Dec 2023 15:13:58 +0300 Subject: [PATCH] ci: add workflow for cmake --- .github/workflows/cmake.yml | 90 +++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..06907ae --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,90 @@ +name: CMake + +on: + push: + branches: + pull_request: + branches: + workflow_dispatch: + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: windows-latest + os-name: windows + qt-version: '5.12.12' + mingw-short-version: 73 + + - os: ubuntu-latest + os-name: linux + qt-version: '5.12.12' + + - os: macos-latest + os-name: mac + qt-version: '5.15.2' + + - os: ubuntu-latest + os-name: linux + qt-version: '6.2.*' + modules: 'qtmultimedia' + + defaults: + run: + shell: bash + + steps: + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: ${{ matrix.qt-version }} + host: ${{ matrix.os-name }} + arch: ${{ startsWith(matrix.os-name, 'win') && format('win32_mingw{0}', matrix.mingw-short-version) || ''}} + tools: ${{ startsWith(matrix.os-name, 'win') && format('tools_mingw,qt.tools.win32_mingw{0}0', matrix.mingw-short-version) || '' }} + modules: ${{ matrix.modules }} + + - name: Install dependencies + if: matrix.os == 'ubuntu-latest' + run: sudo apt-get install -y gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-plugins-base + + - name: Update PATH + if: ${{ startsWith(matrix.os-name, 'win') }} + run: | + set -xue + cygpath -w /usr/bin >> $GITHUB_PATH + cygpath -w "${IQTA_TOOLS}/mingw${{matrix.mingw-short-version}}0_32/bin" >> $GITHUB_PATH + cygpath -w "${Qt5_Dir}/bin" >> $GITHUB_PATH + + - name: Check available tools + run: | + set -xueo pipefail + echo $PATH + uname -a + qmake --version + make --version + g++ --version + git --version + + - name: Configure git + run: | + git config --global core.symlinks true + git config --global core.autocrlf true + + - uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + + - name: Create build directory + run: mkdir ../build + + - name: CMake configuration and generation + timeout-minutes: 1 + run: cmake -S . -B ../build + + - name: CMake build + timeout-minutes: 10 + run: cmake --build ../build