-
Notifications
You must be signed in to change notification settings - Fork 7
169 lines (158 loc) · 5.27 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: Dive CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
pull_request:
# Cancel previous runs if a more recent commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-22.04-16core
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependency
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch -a
sudo apt-get update --yes
sudo apt-get install --yes git clang-format-14
- name: Run lint script
run: ./scripts/clangformat.sh
# Build the code
build_Windows_Debug:
runs-on: windows-2019
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
target: desktop
arch: win64_msvc2019_64
- name: Setup Ninja
uses: ashutoshvarma/setup-ninja@master
with:
# ninja version to download. Default: 1.10.0
version: 1.10.0
- uses: ilammy/msvc-dev-cmd@v1
- uses: ilammy/setup-nasm@v1
- name: Build the UI
run: |
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 16 2019" -A x64 ..
cmake --build ./ --config Debug
# Build the code
build_Windows_Release:
runs-on: windows-2019
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
target: desktop
arch: win64_msvc2019_64
- name: Setup Ninja
uses: ashutoshvarma/setup-ninja@master
with:
# ninja version to download. Default: 1.10.0
version: 1.10.0
- uses: ilammy/msvc-dev-cmd@v1
- uses: ilammy/setup-nasm@v1
- name: Build the UI
run: |
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -A x64 ..
cmake --build ./ --config Release
build_Linux_Debug:
runs-on: ubuntu-22.04-16core
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Qt
uses: jurplel/install-qt-action@v3
- name: Install dependency
run: |
sudo apt-get update --yes
sudo apt-get install --yes cmake gcc-10 clang-14 libsystemd-dev libbsd-dev ninja-build
which gcc-10
which clang-14
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers
- name: Build the UI with gcc-10
run: |
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-10 .. -GNinja && ninja && cd ..
build_Linux_Release:
runs-on: ubuntu-22.04-16core
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Qt
uses: jurplel/install-qt-action@v3
- name: Install dependency
run: |
sudo apt-get update --yes
sudo apt-get install --yes cmake gcc-10 clang-14 libsystemd-dev libbsd-dev ninja-build
which gcc-10
which clang-14
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers
- name: Build the UI with gcc-10
run: |
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-10 .. -GNinja && ninja && cd ..
build_Android:
runs-on: ubuntu-22.04-16core
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependency
run: |
sudo apt-get update --yes
sudo apt-get install --yes cmake ninja-build
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25
add-to-path: true
- name: Build lib with NDK
run: |
mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
-G "Ninja" \
-DCMAKE_MAKE_PROGRAM="ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSTEM_NAME=Android \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-26 \
-DgRPC_BUILD_CODEGEN=OFF \
-Dprotobuf_BUILD_PROTOC_BINARIES=OFF \
-DCARES_BUILD_TOOLS=OFF \
-DCARES_INSTALL=OFF \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=NEVER \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER \
..
ninja
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}