-
Notifications
You must be signed in to change notification settings - Fork 1
114 lines (112 loc) · 3.56 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
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 }}
Linter:
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
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19 all
- name: Configure Cmake
uses: threeal/[email protected]
with:
source-dir: ${{ github.workspace }}
build-dir: ${{ github.workspace }}/build
generator: Unix Makefiles
cxx-compiler: clang++-19
c-compiler: clang-19
options: CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXPORT_COMPILE_COMMANDS=ON DE_FORCE_NO_PCH=ON
run-build: false
- uses: cpp-linter/cpp-linter-action@v2
id: linter
with:
style: 'file'
tidy-checks: ''
verbosity: info
version: 18
files-changed-only: false
database: '${{ github.workspace }}/build'
repo-root: '${{ github.workspace }}'
ignore: '${{ github.workspace }}/build/**|${{ github.workspace }}/Examples/**|${{ github.workspace }}/Sandbox/**'
step-summary: true
- name: Check Linter Results
if: steps.linter.outputs.checks-failed > 0
run: exit 1