mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
68 lines
1.5 KiB
YAML
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 }}
|