mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-02 14:30:59 +08:00
build(macos): pin gz tap unconditionally, add weekly refresh
macos.sh only pinned osrf/simulation when --ci was passed, so dev machines still hit OSRF's bottle-gap window and built Gazebo from source. Apply it whenever --sim-tools runs. The pin is a point-in-time SHA with nothing to advance it, so add a weekly workflow that checks whether osrf/simulation HEAD is fully bottled and opens a PR bumping gz-tap-pin.txt when it is. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: FARHANG <farhang.nba@gmail.com>
This commit is contained in:
1 parent
354823e2ef
commit
d840da70b6
3 files changed
+113
-18
No files matched your search
+8
-17
@@ -8,10 +8,8 @@
|
||||
## - Cross compilers for building hardware targets using NuttX
|
||||
## - With --sim-tools: Gazebo Harmonic and jMAVSim simulation stack
|
||||
##
|
||||
## --ci trades freshness for reproducibility and is meant for automation,
|
||||
## not development machines. Today it pins the osrf/simulation tap to
|
||||
## gz-tap-pin.txt so Gazebo installs from bottles even while OSRF has
|
||||
## them pulled.
|
||||
## --sim-tools pins the osrf/simulation tap to gz-tap-pin.txt so Gazebo
|
||||
## installs from bottles even while OSRF has them pulled.
|
||||
##
|
||||
## Homebrew 4.5+ no longer auto-resolves cross-tap dependencies, so
|
||||
## every tap and package is listed explicitly here rather than hidden
|
||||
@@ -25,8 +23,6 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
REINSTALL_FORMULAS=""
|
||||
# Install simulation tools?
|
||||
INSTALL_SIM=""
|
||||
# Favour reproducibility over freshness (automation, not dev machines)?
|
||||
CI_MODE=""
|
||||
|
||||
# Parse arguments
|
||||
for arg in "$@"
|
||||
@@ -35,8 +31,6 @@ do
|
||||
REINSTALL_FORMULAS=$arg
|
||||
elif [[ $arg == "--sim-tools" ]]; then
|
||||
INSTALL_SIM=$arg
|
||||
elif [[ $arg == "--ci" ]]; then
|
||||
CI_MODE=$arg
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -138,15 +132,12 @@ if [[ $INSTALL_SIM == "--sim-tools" ]]; then
|
||||
# osrf/simulation: gz-harmonic (Gazebo Harmonic meta-formula)
|
||||
brew tap osrf/simulation
|
||||
|
||||
# Under --ci only: OSRF drops the gz bottle blocks within minutes of a
|
||||
# breaking homebrew-core dependency bump and rebuilds them days later,
|
||||
# so an unpinned tap compiles Gazebo from source for a large part of
|
||||
# the year. Development machines keep tracking the tap normally, and
|
||||
# get the newer formulae at the cost of that build. See gz-tap-pin.txt.
|
||||
GZ_TAP_PIN=""
|
||||
if [[ -n $CI_MODE ]]; then
|
||||
GZ_TAP_PIN=$(grep -v '^#' "${DIR}/gz-tap-pin.txt" | tr -d '[:space:]')
|
||||
fi
|
||||
# OSRF drops the gz bottle blocks within minutes of a breaking
|
||||
# homebrew-core dependency bump and rebuilds them days later, so an
|
||||
# unpinned tap compiles Gazebo from source for a large part of the
|
||||
# year. Pin unconditionally so dev machines get the same fast, binary
|
||||
# install as CI. See gz-tap-pin.txt.
|
||||
GZ_TAP_PIN=$(grep -v '^#' "${DIR}/gz-tap-pin.txt" | tr -d '[:space:]')
|
||||
if [[ -n $GZ_TAP_PIN ]]; then
|
||||
GZ_TAP_DIR=$(brew --repo osrf/simulation)
|
||||
echo "[macos.sh] Pinning osrf/simulation to ${GZ_TAP_PIN}"
|
||||
|
||||
Reference in new issue
Block a user