mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 16:51:16 +08:00
ci(macos): remove the MacOS workflows
The build runs brew update and then pours Gazebo from one pinned tap commit while the rest of the install, including protobuf, comes from current Homebrew. A release in either repo fails the check with no commit here, and the GitHub-hosted image moves on its own, so the job cannot be a closed set. Drop the build and the weekly pin refresh. The setup script, the pins, and the refresh script stay for local use. Assisted-by: Grok:grok-4.7 Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
This commit is contained in:
1 parent
db99f32cf2
commit
49339b843f
7 files changed
+5
-154
No files matched your search
@@ -1,79 +0,0 @@
|
||||
name: MacOS build
|
||||
|
||||
# Not run on push or pull request. make px4_sitl fails when the protobuf
|
||||
# Homebrew installs is not the one the pinned Gazebo bottles were generated
|
||||
# against, and that mismatch has been taking these legs down since
|
||||
# 2026-09-02. workflow_dispatch still runs it.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, macos-15]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: install Python 3.10
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Cache - Restore Homebrew Packages
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/Library/Caches/Homebrew/downloads
|
||||
key: macos-homebrew-${{ runner.arch }}-${{ hashFiles('Tools/setup/macos.sh') }}
|
||||
restore-keys: |
|
||||
macos-homebrew-${{ runner.arch }}-
|
||||
|
||||
- name: Cache - Restore pip Packages
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/Library/Caches/pip
|
||||
key: macos-pip-${{ runner.arch }}-${{ hashFiles('Tools/setup/requirements.txt') }}
|
||||
restore-keys: |
|
||||
macos-pip-${{ runner.arch }}-
|
||||
|
||||
- name: setup
|
||||
run: |
|
||||
# Runner images ship Homebrew with auto-update off and a formula
|
||||
# snapshot from image build time, so without this the two legs
|
||||
# install whatever homebrew-core each image was built with. The gz
|
||||
# tap pin is only valid against current homebrew-core, see
|
||||
# Tools/setup/gz-tap-pin.txt.
|
||||
brew update
|
||||
./Tools/setup/macos.sh --sim-tools
|
||||
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH
|
||||
|
||||
- uses: ./.github/actions/setup-ccache
|
||||
id: ccache
|
||||
with:
|
||||
# Keyed per OS: the two legs run different Apple clang builds, and
|
||||
# ccache's compiler_check=content means objects cached by one are
|
||||
# never reusable by the other. Sharing one key also made the legs
|
||||
# race to save it, so one lost its cache every run.
|
||||
cache-key-prefix: ccache-macos-${{ matrix.os }}
|
||||
max-size: 200M
|
||||
|
||||
- name: Build px4_sitl
|
||||
run: make px4_sitl
|
||||
|
||||
- name: Cache - Stats after px4_sitl
|
||||
run: ccache -s
|
||||
|
||||
- name: Build px4_fmu-v5_default
|
||||
run: make px4_fmu-v5_default
|
||||
|
||||
- uses: ./.github/actions/save-ccache
|
||||
if: always()
|
||||
with:
|
||||
cache-primary-key: ${{ steps.ccache.outputs.cache-primary-key }}
|
||||
@@ -1,66 +0,0 @@
|
||||
name: macOS - Refresh gz tap pin
|
||||
|
||||
# Tools/setup/macos.sh pins osrf/simulation to Tools/setup/gz-tap-pin.txt so
|
||||
# --sim-tools pours Gazebo bottles instead of compiling them, and protobuf to
|
||||
# Tools/setup/protobuf-pin.txt so those bottles' generated headers still
|
||||
# compile (see those files). OSRF advances the tap several times a week and
|
||||
# homebrew-core moves protobuf on its own schedule, so once a week this moves
|
||||
# the tap pin to the newest commit whose Gazebo formulae are all bottled,
|
||||
# repoints the protobuf pin at whatever those bottles were built against, and
|
||||
# opens a PR for it. Tools/ci/refresh_gz_tap_pin.rb does the work under
|
||||
# Homebrew's Ruby and can be run by hand on any Mac.
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 9 * * 1' # Mondays at 09:00 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
refresh:
|
||||
# Oldest macOS in compile_macos.yml's matrix. Homebrew pours a bottle
|
||||
# built on an older macOS onto a newer one, never the reverse, so the
|
||||
# oldest leg is the one a new pin can break.
|
||||
runs-on: macos-15
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Find the newest fully bottled osrf/simulation commit
|
||||
id: pin
|
||||
env:
|
||||
# Walking homebrew-core's protobuf history goes through the GitHub
|
||||
# API, which is rate limited per IP for runners without this.
|
||||
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: brew ruby Tools/ci/refresh_gz_tap_pin.rb
|
||||
|
||||
- name: Open PR with the new pins
|
||||
if: steps.pin.outputs.needs_bump == 'true'
|
||||
uses: peter-evans/create-pull-request@v8
|
||||
with:
|
||||
# The PX4BuildBot PAT rather than GITHUB_TOKEN so the PR runs the
|
||||
# MacOS build workflow, which is what verifies the new pin.
|
||||
token: ${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}
|
||||
author: ${{ secrets.PX4BUILDBOT_USER }} <${{ secrets.PX4BUILDBOT_EMAIL }}>
|
||||
committer: ${{ secrets.PX4BUILDBOT_USER }} <${{ secrets.PX4BUILDBOT_EMAIL }}>
|
||||
branch: px4buildbot/gz-tap-pin
|
||||
delete-branch: true
|
||||
add-paths: |
|
||||
Tools/setup/gz-tap-pin.txt
|
||||
Tools/setup/protobuf-pin.txt
|
||||
commit-message: "build(macos): ${{ steps.pin.outputs.summary }}"
|
||||
title: "build(macos): ${{ steps.pin.outputs.summary }}"
|
||||
body: |
|
||||
Weekly check of the two macOS Gazebo pins. `Tools/setup/gz-tap-pin.txt` holds osrf/simulation at the newest commit where every formula `macos.sh --sim-tools` poured at the previous pin still has a bottle Homebrew pours on macos-15 and every bottle tarball is still served. `Tools/setup/protobuf-pin.txt` holds protobuf at the version those bottles were built against, which is the only one their generated headers compile against.
|
||||
|
||||
| pin | from | to |
|
||||
| --- | --- | --- |
|
||||
| osrf/simulation | `${{ steps.pin.outputs.old_pin }}` | `${{ steps.pin.outputs.new_pin }}` |
|
||||
| protobuf | `${{ steps.pin.outputs.old_protobuf_version }}` (`${{ steps.pin.outputs.old_protobuf_pin }}`) | `${{ steps.pin.outputs.protobuf_version }}` (`${{ steps.pin.outputs.new_protobuf_pin }}`) |
|
||||
|
||||
An empty "to" means that pin did not move.
|
||||
|
||||
Tap changes: https://github.com/osrf/homebrew-simulation/compare/${{ steps.pin.outputs.old_pin }}...${{ steps.pin.outputs.new_pin || steps.pin.outputs.old_pin }}
|
||||
|
||||
The MacOS build legs on this PR are the real test. Merge once both pour the gz bottles without compiling anything from osrf/simulation.
|
||||
Reference in new issue
Block a user