Files
rgbds/.github/scripts/install_deps.sh
T
Eldred Habert 9c4e53d1c4 Transition CI from pkg-config to pkgconf (#1942)
Upstream has changed the providing implementation,
so that package will eventually be removed.
2026-04-13 19:46:05 +02:00

38 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# This script requires `sh` instead of `bash` because the latter is not always installed on FreeBSD.
set -eu
case "${1%-*}" in
ubuntu|debian)
sudo apt-get -qq update
sudo apt-get install -yq bison libpng-dev pkgconf
;;
macos)
# macOS bundles GNU Make 3.81, which doesn't support synced output.
# We leave it as the default in `PATH`, to test that our Makefile works with it.
# However, CMake automatically uses Homebrew's `gmake`, so our CI has synced output.
brew install bison md5sha1sum make
# Export `bison` to allow using the version we install from Homebrew,
# instead of the outdated one preinstalled on macOS (which doesn't even support `-Wall`...)
export PATH="/opt/homebrew/opt/bison/bin:$PATH"
printf 'PATH=%s\n' "$PATH" >>"$GITHUB_ENV" # Make it available to later CI steps too
;;
freebsd)
pkg install -y bash bison cmake git png
;;
windows)
# GitHub Actions' hosted runners ship CMake 3.x, but versions prior to 4.0.0 ignore `CPACK_PACKAGE_FILE_NAME`.
choco install -y winflexbison3 cmake
# The below expects the base name, not the Windows-specific name.
bison() { win_bison "$@"; } # An alias doesn't work, so we use a function instead.
;;
*)
echo "::error:: Cannot install deps for OS '$1'"
;;
esac
echo "PATH=($PATH)" | sed 's/:/\n /g'
bison --version
make --version
cmake --version