forked from dillongoostudios/goo-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (78 loc) · 3.29 KB
/
linux-build.yaml
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
name: Linux build of Goo Engine
on:
push:
branches: [ "goo-engine-main" ]
pull_request:
branches: [ "goo-engine-main" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Linux or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y cmake git ninja-build
sudo apt-get install libepoxy-dev
- name: Install ShaderC
run: |
wget https://storage.googleapis.com/shaderc/artifacts/prod/graphics_shader_compiler/shaderc/linux/continuous_clang_release/461/20240621-131133/install.tgz
tar -xvf install.tgz
sudo mv install /usr/local/shaderc
sudo find /usr/local/shaderc -name shaderc -exec update-alternatives --install /usr/bin/shaderc shaderc {} 1 \;
#tar -xvf install.tar
- name: Add more repository
run: |
sudo add-apt-repository universe
sudo apt update
- name: Install Linux Specific dependencies
run: |
sudo apt update
sudo apt install -y \
libvulkan1 libvulkan-dev \
libx11-dev libxcb-glx0-dev libxcb-icccm4-dev \
libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev \
libxcb-render-util0-dev libxcb-render0-dev libxcb-shape0-dev \
libxcb-shm0-dev libxcb-sync-dev libxcb-util-dev \
libxcb-xfixes0-dev libxcb-xkb-dev libxext-dev libxfixes-dev \
libxi-dev libxinerama-dev libxrandr-dev libxrender-dev \
libxss-dev libxt-dev libxtst-dev libxv-dev libxxf86vm-dev \
libxxf86dga-dev mesa-common-dev libegl1-mesa-dev libgbm-dev \
libgles2-mesa-dev libgl1-mesa-dev libglu1-mesa-dev libosmesa6-dev \
libwayland-dev* \
libxkbcommon-dev libxkbcommon-x11-dev
- name: Install Vulkan dependencies
run: |
sudo apt update
sudo apt install -y libvulkan1 libvulkan-dev
- name: Clone Blender repository
run: |
mkdir -p ${{ github.workspace }}/blender
cd ${{ github.workspace }}/blender
git clone https://github.com/blender/blender.git .
- name: Configure CMake
run: |
cd ${{ github.workspace }}/blender
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_SYSTEM_NAME=Linux -G "Ninja" ..
- name: Build
run: |
cd ${{ github.workspace }}/blender/build
cmake --build . --config ${{env.BUILD_TYPE}}
- name: Create AppImage
run: |
cd ${{ github.workspace }}/blender/build
sudo apt install -y appimagetool
appimagetool blender ../blender.appimage
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: blender-appimage
path: ${{ github.workspace }}/blender/blender.appimage