Skip to content

Build and run Vivarium #1695

Build and run Vivarium

Build and run Vivarium #1695

Workflow file for this run

name: Build and run Vivarium
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '30 3 * * *'
workflow_dispatch:
jobs:
build:
name: Build and run Vivarium
runs-on: ubuntu-22.04
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v2.2.1
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libwayland-dev libwayland-server0 wayland-protocols libxkbcommon-dev libwayland-egl1 libegl-dev libdrm-dev libgles-dev libgbm-dev libinput-dev libudev-dev libpixman-1-dev libpixman-1-0 libxcb-composite0-dev xcb libxcb-render0-dev libxcb-xfixes0-dev xwayland waybar swaybg graphviz libxcb-icccm4 libxcb-ewmh-dev libxcb-ewmh2 libxcb-icccm4-dev libxcb-res0 libxcb-res0-dev libpciaccess0 libpciaccess-dev hwdata
python -m pip install --upgrade pip
python -m pip install ninja
python -m pip install meson
sudo python -m pip install ninja
- name: Install wayland-server
run: |
# The ubuntu-22.04 Wayland Server version is too low so we must install wayland ourselves
git clone --depth 1 --branch 1.21.0 https://gitlab.freedesktop.org/wayland/wayland.git
cd wayland
meson setup build -Ddocumentation=false
sudo ninja -C build install
cd ..
- name: Install libdrm
run: |
# The ubuntu-22.04 libdrm version is too low so we must install it ourselves
git clone --depth 1 --branch libdrm-2.4.115 https://gitlab.freedesktop.org/mesa/drm.git
cd drm
meson setup build
sudo ninja -C build install
cd ..
- name: Install wayland-protocols
run: |
# The ubuntu-22.04 wayland-protocols version is too low so we must install it ourselves
git clone --depth 1 --branch 1.27 https://gitlab.freedesktop.org/wayland/wayland-protocols.git
cd wayland-protocols
meson setup build
sudo ninja -C build install
cd ..
- name: Checkout vivarium
uses: actions/checkout@v2
- name: Prepare subprojects that wlroots depends on
run: |
git clone https://git.sr.ht/~kennylevinsen/seatd subprojects/seatd
- name: Prepare build dir
run: |
meson setup build
- name: Build vivarium, debug=false, xwayland=disabled
run: |
meson setup --reconfigure build -Dxwayland=disabled -Ddebug=false
ninja -C build
- name: Build vivarium, debug=false, xwayland=enabled
run: |
meson setup --reconfigure build -Dxwayland=enabled -Ddebug=false
ninja -C build
- name: Build vivarium, debug=true xwayland=enabled
run: |
meson setup --reconfigure build -Dxwayland=enabled -Ddebug=true
ninja -C build
- name: Build vivarium, debug=true xwayland=enabled headless-test=true
run: |
meson setup --reconfigure build -Dxwayland=enabled -Ddebug=true -Dheadless-test=true
ninja -C build
- name: Run vivarium (headless) and check for clean exit
run: |
mkdir -p $XDG_RUNTIME_DIR
./build/src/vivarium
env:
XDG_RUNTIME_DIR: /tmp/xdg_runtime_dir
- name: Run vivarium (headless) with config.toml and check for clean exit
run: |
mkdir -p $XDG_RUNTIME_DIR
mkdir -p ~/.config/vivarium
cp config/config.toml ~/.config/vivarium/
./build/src/vivarium
env:
XDG_RUNTIME_DIR: /tmp/xdg_runtime_dir
- name: Run tests
run: |
meson test -C build --print-errorlogs