dtc/scripts/install-deps.sh
David Gibson 23fd89bc8e ci: Move FreeBSD CI from Cirrus CI to GitHub Actions
Cirrus CI shut down on 2026-06-01.  Replace it with
cross-platform-actions/action which runs FreeBSD in a QEMU VM on
GitHub Actions runners.  This preserves the same test matrix: FreeBSD
13.5 and 14.3 with both make and meson build systems.

Explicitly set shell to sh, since FreeBSD 13.x defaults to csh which
doesn't understand POSIX if/then/fi syntax.

Assisted-by: Claude:claude-opus-4-6
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2026-06-13 15:48:29 +10:00

39 lines
1 KiB
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
if [ "$(uname -s)" = "FreeBSD" ]
then
pkg install -y git gmake flex bison meson ninja \
python3 py312-setuptools swig libyaml pkgconf
exit 0
fi
if [ -f /etc/os-release ]
then
. /etc/os-release
else
echo "ERROR: OS name is not provided."
exit 1
fi
if [ "$NAME" = "Arch Linux" ]
then
pacman -Syu --needed --noconfirm bison diffutils flex gcc git libyaml \
make meson pkgconf python python-setuptools-scm swig
elif [ "$NAME" = "Alpine Linux" ]
then
apk add build-base bison flex git yaml yaml-dev python3-dev \
meson py3-setuptools_scm swig
elif [ "$NAME" = "Fedora Linux" ]
then
dnf install -y bison diffutils flex gcc git libyaml libyaml-devel \
make meson python3-devel python3-setuptools swig
elif [ "$NAME" = "Ubuntu" ]
then
apt update
apt install -yq build-essential bison flex git libyaml-dev pkg-config \
meson python3-dev python3-setuptools python3-setuptools-scm swig
else
echo "ERROR: OS name is not provided."
exit 1
fi