Skip to content

Commit b185152

Browse files
ci: add workflow for cmake
1 parent 33b11ec commit b185152

File tree

3 files changed

+92
-2
lines changed

3 files changed

+92
-2
lines changed

.github/workflows/cmake.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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+
timeout-minutes: 1
86+
run: cmake -S . -B ../build
87+
88+
- name: CMake build
89+
timeout-minutes: 10
90+
run: cmake --build ../build

dependencies/dependencies.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
TEMPLATE = subdirs
1616

1717
SUBDIRS = \
18-
SingleApplication/singleapplication.pri
18+
singleapplication/singleapplication.pri

dependencies/singleapplication.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
DEFINES += QAPPLICATION_CLASS=QApplication
1616

17-
include (SingleApplication/singleapplication.pri)
17+
include (singleapplication/singleapplication.pri)
1818
QMAKE_CXXFLAGS -= -Wold-style-cast

0 commit comments

Comments
 (0)