2024-04-13 22:34:48 +00:00
|
|
|
# This action installs a few dependencies necessary to build Bevy on Linux. By default it installs
|
|
|
|
# alsa and udev, but can be configured depending on which libraries are needed:
|
|
|
|
#
|
|
|
|
# ```
|
|
|
|
# - uses: ./.github/actions/install-linux-deps
|
|
|
|
# with:
|
|
|
|
# alsa: false
|
|
|
|
# wayland: true
|
|
|
|
# ```
|
|
|
|
#
|
|
|
|
# See the `inputs` section for all options and their defaults. Note that you must checkout the
|
|
|
|
# repository before you can use this action.
|
|
|
|
#
|
|
|
|
# This action will only install dependencies when the current operating system is Linux. It will do
|
2024-07-31 21:16:05 +00:00
|
|
|
# nothing on any other OS (macOS, Windows).
|
2024-04-13 22:34:48 +00:00
|
|
|
|
|
|
|
name: Install Linux dependencies
|
|
|
|
description: Installs the dependencies necessary to build Bevy on Linux.
|
|
|
|
inputs:
|
|
|
|
alsa:
|
|
|
|
description: Install alsa (libasound2-dev)
|
|
|
|
required: false
|
2024-09-26 13:30:56 +00:00
|
|
|
default: "true"
|
2024-04-13 22:34:48 +00:00
|
|
|
udev:
|
|
|
|
description: Install udev (libudev-dev)
|
|
|
|
required: false
|
2024-09-26 13:30:56 +00:00
|
|
|
default: "true"
|
2024-04-13 22:34:48 +00:00
|
|
|
wayland:
|
|
|
|
description: Install Wayland (libwayland-dev)
|
|
|
|
required: false
|
2024-09-26 13:30:56 +00:00
|
|
|
default: "false"
|
2024-04-13 22:34:48 +00:00
|
|
|
xkb:
|
|
|
|
description: Install xkb (libxkbcommon-dev)
|
|
|
|
required: false
|
2024-09-26 13:30:56 +00:00
|
|
|
default: "false"
|
2024-04-13 22:34:48 +00:00
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- name: Install Linux dependencies
|
|
|
|
shell: bash
|
|
|
|
if: ${{ runner.os == 'linux' }}
|
|
|
|
run: >
|
|
|
|
sudo apt-get update
|
|
|
|
|
|
|
|
sudo apt-get install --no-install-recommends
|
|
|
|
${{ fromJSON(inputs.alsa) && 'libasound2-dev' || '' }}
|
|
|
|
${{ fromJSON(inputs.udev) && 'libudev-dev' || '' }}
|
|
|
|
${{ fromJSON(inputs.wayland) && 'libwayland-dev' || '' }}
|
|
|
|
${{ fromJSON(inputs.xkb) && 'libxkbcommon-dev' || '' }}
|