Skip to content

Commit d09d173

Browse files
authored
Add cmake build action (#330)
1 parent a6c4032 commit d09d173

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

.github/workflows/cmake_build.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: build nodeeditor
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
tags:
9+
- "*"
10+
pull_request:
11+
12+
jobs:
13+
build-and-test:
14+
15+
name: ${{ matrix.toolchain }}
16+
runs-on: ${{ matrix.os }}
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
toolchain:
22+
- linux-gcc
23+
- macos-clang
24+
- windows-msvc
25+
26+
configuration:
27+
- Release
28+
29+
include:
30+
- toolchain: linux-gcc
31+
os: ubuntu-20.04
32+
compiler: gcc
33+
qt_version: "5.15.2"
34+
modules: ""
35+
36+
- toolchain: macos-clang
37+
os: macos-latest
38+
compiler: clang
39+
qt_version: "5.15.2"
40+
modules: ""
41+
42+
- toolchain: windows-msvc
43+
os: windows-latest
44+
compiler: msvc
45+
qt_version: "5.15.2"
46+
modules: ""
47+
48+
- toolchain: windows-msvc
49+
os: windows-latest
50+
compiler: msvc
51+
qt_version: "6.3.0"
52+
modules: "qt5compat"
53+
54+
steps:
55+
- name: Checkout Code
56+
uses: actions/checkout@v2
57+
with:
58+
submodules: true
59+
60+
- name: Install Qt
61+
uses: jurplel/install-qt-action@v3
62+
with:
63+
version: ${{ matrix.qt_version }}
64+
modules: ${{ matrix.modules }}
65+
66+
- name: Setup (Linux)
67+
if: startsWith (matrix.os, 'ubuntu')
68+
run: sudo apt-get install libxkbcommon-dev
69+
70+
- name: Setup VS tools (Windows)
71+
if: startsWith (matrix.os, 'windows')
72+
uses: egor-tensin/vs-shell@v2
73+
with:
74+
arch: x64
75+
76+
- name: Configure (${{ matrix.configuration }})
77+
run: cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
78+
79+
- name: Build with ${{ matrix.compiler }}
80+
run: cmake --build build --config ${{ matrix.configuration }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
*.py
22
*.pyc
33
CMakeLists.txt.user
4+
5+
build/
6+
.vscode/

0 commit comments

Comments
 (0)