-
Notifications
You must be signed in to change notification settings - Fork 3
172 lines (168 loc) · 7.42 KB
/
build.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
170
171
172
name: Build-Samples
on: push
jobs:
build-linux:
name: Build Samples for Linux x64
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [ {cc: "gcc-13", cxx: "g++-13", lk: "DEFAULT"}, {cc: "clang-18", cxx: "clang++-18", lk: "LLD"} ]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies
run: |
sudo apt update -y
sudo apt install -y lsb-release wget software-properties-common apt-utils
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo add-apt-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main"
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update -y
sudo apt remove build-essential -y
sudo apt install gcc-13 g++-13 clang-18 llvm-18 lld-18 libfuse2 snap ninja-build libgl1-mesa-dev uuid-dev libwayland-dev libxkbcommon-dev libasound2-dev libegl-dev libvulkan-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-glx0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev mesa-common-dev tree -y --no-install-recommends
sudo snap install cmake --classic
cmake --version
- name: Configure
run: |
mkdir -p build
cd build
CC=/usr/bin/${{ matrix.compiler.cc }} CXX=/usr/bin/${{ matrix.compiler.cxx }} cmake -G "Ninja" -DRAVENGINE_SERVER=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_LINKER_TYPE=${{ matrix.compiler.lk }} ..
- name: Build
run: |
cd build
cmake --build . --config release --target install
tree -L 3
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: RavEngine_Samples_linux64_${{ matrix.compiler.cc }}
path: build/Release/*.AppImage
build-linux-arm:
name: Build Samples for Linux arm64
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Repositories
run: sudo mv config/crosscomp-sources.list /etc/apt/sources.list;
- name: Check apt sources
run: cat /etc/apt/sources.list
- name: Add arm64 as architecture
run: sudo dpkg --add-architecture arm64
- name: Update APT
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
- name: Install Host Dependencies
run: sudo apt-get install cmake:amd64 fuse:amd64 libfuse2:amd64 ninja-build:amd64 libx11-dev:amd64 libgl1-mesa-dev gcc-13:amd64 g++-13:amd64 gcc-13-aarch64-linux-gnu:amd64 g++-13-aarch64-linux-gnu:amd64 -y --no-install-recommends
- name: Install Target Dependencies
run: sudo apt-get install libgl1-mesa-dev:arm64 uuid-dev:arm64 libasound2-dev:arm64 libx11-dev:arm64 libxext-dev:arm64 libxrender-dev:arm64 libxrandr-dev:arm64 libxtst-dev:arm64 libxt-dev:arm64 libegl1-mesa-dev:arm64 libx11-xcb-dev:arm64 libxcb-dri2-0-dev:arm64 libxcb-glx0-dev:arm64 libxcb-icccm4-dev:arm64 libxcb-keysyms1-dev:arm64 libxcb-randr0-dev:arm64 libxrandr-dev:arm64 libxxf86vm-dev:arm64 mesa-common-dev:arm64 libwayland-dev:arm64 -y --no-install-recommends
- name: Configure
run: |
mkdir -p build
mkdir -p build/linuxarm
cd build/linuxarm
CC=/usr/bin/aarch64-linux-gnu-gcc-13 CXX=/usr/bin/aarch64-linux-gnu-g++-13 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_SYSTEM_NAME=Linux -DRAVENGINE_BUILD_TESTS=OFF ../..
- name: Build
run: cd build/linuxarm && cmake --build . --config release --target install
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: RavEngine_Samples_linuxARM
path: build/linuxarm/Release/*.AppImage
build-emscripten:
name: Build samples for Emscripten-Linux
runs-on: ubuntu-latest
if: false
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install cmake clang python3 libgl1-mesa-dev libwayland-dev libxkbcommon-dev libegl-dev -y --no-install-recommends
- name: Setup Emscripten
run: git clone https://github.com/emscripten-core/emsdk.git --depth=1 && cd emsdk && ./emsdk install latest && ./emsdk activate latest && source ./emsdk_env.sh
- name: Configure
run: mkdir -p build && cd build; cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake ..
- name: Build
run: cd build; cmake --build . --config Release --target install
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: RavEngine_Samples_Web
path: |
build/Release/*.js
build/Release/*.html
build/Release/*.wasm
build/Release/*.data
build-apple:
name: Build Samples for Apple Platforms (unsigned)
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
platform: [iOS, tvOS, '']
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Configure
run: |
mkdir -p build
cd build
cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=${{ matrix.platform }} -DRAVENGINE_BUILD_TESTS=OFF -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED="NO" ..
- name: Build
run: cd build; cmake --build . --config release --target install -- -quiet
- name: Free space
run: |
cd build
rm -rf build RavEngine host-tools *.build/ release/protoc release/rglc
- name: Create DMG
run: |
cd build
touch release/.Trash
hdiutil create -size 2g -srcfolder release -volname RavEngine_Samples_Apple_${{ matrix.platform }} RavEngine_Samples_Apple_${{ matrix.platform }}.dmg
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: RavEngine_Samples_Apple_${{ matrix.platform }}
path: build/RavEngine_Samples_Apple_${{ matrix.platform }}.dmg
build-windows:
name: Build samples for Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: [x64, ARM64]
sdk: [Windows]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: |
mkdir build
cd build
mkdir win
cd win
cmake -A${{ matrix.arch }} -DCMAKE_SYSTEM_NAME=${{ matrix.sdk }} -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_BUILD_TYPE=Release -DRAVENGINE_BUILD_TESTS=OFF ..\..
cmake -Wno-dev ..\..
- name: Build
run: cd build; cd win; cmake --build . --config release --target install
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: RavEngine_Samples_Win${{ matrix.arch }}
path: |
build\win\release\RavEngine*.exe
build\win\release\RavEngine*.rvedata
build\win\release\D3D12\*
build\win\release\RavEngine*Streaming\*