voxelcore/.github/workflows/appimage.yml
alexei-zebra b6f6235249
Fix the issues found while reviewing the build files
Install the Wayland development packages in both workflows and bundle the
runtime libraries in the AppImage: the release build had no native Wayland
backend at all, and the engine silently fell back to GLFW there.

Build the window backends on every platform that is not Windows and not
Apple, glob the wayland sources with CONFIGURE_DEPENDS, and report a
missing Wayland dependency with the list of what is missing.

Also drop the dead nested project() calls and the duplicate -no-pie
option, make .dirIcon the file appimagetool expects, and describe the
real Linux dependencies in the README.
2026-10-11 20:06:19 +03:00

66 lines
2.4 KiB
YAML

name: x86-64 AppImage
on:
push:
branches: [ "main", "release-**"]
pull_request:
branches: [ "main", "dev" ]
workflow_call:
inputs:
build_name:
required: true
type: string
description: 'Build name passed as VC_BUILD_NAME define'
jobs:
build-appimage:
strategy:
matrix:
include:
- os: ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libglfw3-dev libglfw3 libglew-dev libglew2.2 \
libglm-dev libpng-dev libopenal-dev libluajit-5.1-dev libvorbis-dev \
libcurl4-openssl-dev libssl-dev libgtest-dev libfreetype6-dev cmake squashfs-tools valgrind \
libwayland-dev libxkbcommon-dev libegl1-mesa-dev libsystemd-dev
# fix luajit paths
sudo ln -s /usr/lib/x86_64-linux-gnu/libluajit-5.1.a /usr/lib/x86_64-linux-gnu/liblua5.1.a
sudo ln -s /usr/include/luajit-2.1 /usr/include/lua
# install EnTT
git clone --branch v3.16.0 https://github.com/skypjack/entt.git
cd entt/build
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release -DENTT_INSTALL=on ..
sudo make install
cd ../..
- name: Configure
run: cmake -S . -B build -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_APPDIR=1 -DVOXELENGINE_BUILD_TESTS=ON -DVC_BUILD_NAME="${{ inputs.build_name }}"
- name: Build
run: cmake --build build -t install
- name: Run tests
run: ctest --output-on-failure --test-dir build
- name: Run engine tests
timeout-minutes: 5
run: |
chmod +x build/VoxelCore
chmod +x AppDir/usr/bin/vctest
AppDir/usr/bin/vctest -e build/VoxelCore -d dev/tests -u build --memchecker valgrind
- name: Build AppImage
uses: AppImageCrafters/build-appimage-action@fe2205a4d6056be47051f7b1b3811106e9814910
env:
UPDATE_INFO: gh-releases-zsync|MihailRis|voxelcore|latest|*x86_64.AppImage.zsync
with:
recipe: dev/AppImageBuilder.yml
- uses: actions/upload-artifact@v4
with:
name: AppImage
path: './*.AppImage*'