Skip to content

Commit

Permalink
ci: add workflow for cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-talalai committed Dec 13, 2023
1 parent 33b11ec commit cc0edd5
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cc0edd5

Please sign in to comment.