Move FreeBSD deps install to common CI script

Making the OS filter in test driver consistent as per
https://github.com/gbdev/rgbds/pull/1899#discussion_r2942998932
This commit is contained in:
ISSOtm
2026-03-09 16:22:59 -04:00
committed by Rangi
parent 37f57a752f
commit 06e5386d93
3 changed files with 9 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/bin/sh
set -euo pipefail # This script requires `sh` instead of `bash` because the latter is not always installed on FreeBSD.
set -eu
case "${1%-*}" in case "${1%-*}" in
ubuntu) ubuntu)
@@ -13,6 +14,9 @@ case "${1%-*}" in
export PATH="/opt/homebrew/opt/bison/bin:$PATH" export PATH="/opt/homebrew/opt/bison/bin:$PATH"
printf 'PATH=%s\n' "$PATH" >>"$GITHUB_ENV" # Make it available to later CI steps too printf 'PATH=%s\n' "$PATH" >>"$GITHUB_ENV" # Make it available to later CI steps too
;; ;;
freebsd)
pkg install -y bash bison cmake git png
;;
*) *)
echo "WARNING: Cannot install deps for OS '$1'" echo "WARNING: Cannot install deps for OS '$1'"
;; ;;

View File

@@ -376,14 +376,9 @@ jobs:
release: "14.3" release: "14.3"
usesh: true usesh: true
prepare: | prepare: |
pkg install -y \ .github/scripts/install_deps.sh freebsd
bash \
bison \
cmake \
git \
png
run: | # FreeBSD `c++` compiler does not support `make develop` sanitizers ASan or UBSan run: | # FreeBSD `c++` compiler does not support `make develop` sanitizers ASan or UBSan
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=c++ -DUSE_EXTERNAL_TESTS=OFF -DTESTS_OS_NAME=bsd cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=c++ -DUSE_EXTERNAL_TESTS=OFF -DTESTS_OS_NAME=freebsd
cmake --build build -j4 --verbose cmake --build build -j4 --verbose
cmake --install build --verbose cmake --install build --verbose
cmake --build build --target test cmake --build build --target test

View File

@@ -138,6 +138,6 @@ test_downstream LIJI32 SameBoy bootroms build/bin/BootROMs/cgb_boot.bin 11390
# gb-starter kit fails with any `make` on Windows: https://codeberg.org/ISSOtm/gb-starter-kit/issues/1 # gb-starter kit fails with any `make` on Windows: https://codeberg.org/ISSOtm/gb-starter-kit/issues/1
# gb-starter-kit fails with macOS/BSD `make`: https://codeberg.org/ISSOtm/gb-starter-kit/issues/29 # gb-starter-kit fails with macOS/BSD `make`: https://codeberg.org/ISSOtm/gb-starter-kit/issues/29
case "${osname%%-*}" in case "${osname%%-*}" in
windows | macos | bsd) ;; windows | macos | *bsd) ;;
*) test_downstream ISSOtm gb-starter-kit all bin/boilerplate.gb b4f130169ba73284e0d0e71b53e7baa4eca2f7fe;; *) test_downstream ISSOtm gb-starter-kit all bin/boilerplate.gb b4f130169ba73284e0d0e71b53e7baa4eca2f7fe;;
esac esac