PX4-Autopilot/.github/workflows/compile_macos.yml
Ramon Roche 5d5d9e399b
ci(workflows): wire ccache and caches across ci (#27036)
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-09 21:51:25 -07:00

68 lines
1.5 KiB
YAML

name: MacOS build
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: macos-latest
steps:
- name: install Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/checkout@v4
- name: Cache - Restore Homebrew Packages
uses: actions/cache@v4
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@v4
with:
path: ~/Library/Caches/pip
key: macos-pip-${{ runner.arch }}-${{ hashFiles('Tools/setup/requirements.txt') }}
restore-keys: |
macos-pip-${{ runner.arch }}-
- name: setup
run: ./Tools/setup/macos.sh
- uses: ./.github/actions/setup-ccache
id: ccache
with:
cache-key-prefix: ccache-macos
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 }}