-
Notifications
You must be signed in to change notification settings - Fork 1
169 lines (167 loc) · 5.69 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: Checks
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
# BuildWindows:
# runs-on: windows-latest
# name: Build Windows
# strategy:
# fail-fast: false
# matrix:
# build_type: [RelWithDebInfo]
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v4
# with:
# submodules: 'true'
# - name: Install clang
# uses: msys2/setup-msys2@v2
# with:
# location: D:\
# update: true
# install: >-
# mingw-w64-clang-x86_64-clang
# mingw-w64-clang-x86_64-ninja
# - name: Add msys to path
# run: |
# echo "D:\msys64\clang64\bin\" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# - name: Build
# uses: threeal/[email protected]
# with:
# source-dir: ${{ github.workspace }}
# build-dir: ${{ github.workspace }}/build
# generator: Ninja
# cxx-compiler: clang++
# c-compiler: clang
# build-args: --target DummyEditor --parallel 16 --config ${{ matrix.build_type }}
# options: CMAKE_BUILD_TYPE=${{ matrix.build_type }}
# BuildUbuntu:
# runs-on: ubuntu-latest
# name: Build Ubuntu
# strategy:
# fail-fast: false
# matrix:
# build_type: [RelWithDebInfo]
# c_compiler: [clang-19]
# cpp_compiler: [clang++-19]
# steps:
# - name: Install Packages
# run: |
# sudo apt update
# sudo apt install libwayland-dev libxkbcommon-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgtk-3-dev ninja-build
# wget https://apt.llvm.org/llvm.sh
# chmod +x llvm.sh
# sudo ./llvm.sh 19 all
# - name: Checkout Repository
# uses: actions/checkout@v4
# with:
# submodules: 'true'
# - name: Build
# uses: threeal/[email protected]
# with:
# source-dir: ${{ github.workspace }}
# build-dir: ${{ github.workspace }}/build
# generator: Ninja
# cxx-compiler: ${{ matrix.cpp_compiler }}
# c-compiler: ${{ matrix.c_compiler }}
# build-args: --target DummyEditor --parallel 16 --config ${{ matrix.build_type }}
# options: CMAKE_BUILD_TYPE=${{ matrix.build_type }}
# ClangFormat:
# runs-on: ubuntu-latest
# name: Clang Format
# strategy:
# fail-fast: false
# steps:
# - uses: actions/checkout@v4
# - name: Check DummyEngine Format
# uses: jidicula/[email protected]
# with:
# clang-format-version: '18'
# check-path: 'DummyEngine'
# - name: Check DummyEditor Format
# uses: jidicula/[email protected]
# with:
# clang-format-version: '18'
# check-path: 'DummyEditor'
# ClangTidy:
# runs-on: ubuntu-latest
# name: Clang Tidy
# strategy:
# fail-fast: false
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v4
# with:
# submodules: 'true'
# - name: Install Packages
# run: |
# sudo apt update
# sudo apt install libwayland-dev libxkbcommon-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgtk-3-dev
# - name: Configure Cmake
# uses: threeal/[email protected]
# with:
# source-dir: ${{ github.workspace }}
# build-dir: ${{ github.workspace }}/build
# generator: Unix Makefiles
# cxx-compiler: clang++
# c-compiler: clang
# options: CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXPORT_COMPILE_COMMANDS=ON
# run-build: false
# - name: Check DummyEditor Tidy
# uses: Mag1str02/[email protected]
# with:
# scandir: '${{ github.workspace }}/DummyEditor'
# builddir: '${{ github.workspace }}/build'
# extensions: 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx'
# useexistingbuild: true
# - name: Check DummyEngine Tidy
# uses: Mag1str02/[email protected]
# with:
# scandir: '${{ github.workspace }}/DummyEngine'
# builddir: '${{ github.workspace }}/build'
# extensions: 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx'
# useexistingbuild: true
ClangTidy:
runs-on: ubuntu-latest
name: Clang Tidy
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install Packages
run: |
sudo apt update
sudo apt install libwayland-dev libxkbcommon-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgtk-3-dev
- name: Configure Cmake
uses: threeal/[email protected]
with:
source-dir: ${{ github.workspace }}
build-dir: ${{ github.workspace }}/build
generator: Unix Makefiles
cxx-compiler: clang++
c-compiler: clang
options: CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXPORT_COMPILE_COMMANDS=ON
run-build: false
- name: Test
run:
ls '${{ github.workspace }}'
- uses: cpp-linter/cpp-linter-action@v2
id: linter
with:
style: 'file' # Use .clang-format config file
tidy-checks: '' # Use .clang-tidy config file
verbosity: debug
version: 18
files-changed-only: false
lines-chanded-only: false
database: '${{ github.workspace }}/build'
repo-root: '${{ github.workspace }}'
ignore: '${{ github.workspace }}/build'
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: exit 1