Update linux-build.yaml #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
tar -xvf install.tar | |
sudo mv install /usr/local/shaderc | |
sudo update-alternatives --install /usr/bin/shaderc shaderc /usr/local/shaderc/bin/shaderc 1 | |
- 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 |