2020-06-22 16:23:29 -03:00
|
|
|
name: MacOS build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-09-07 01:09:44 -03:00
|
|
|
- 'main'
|
2020-06-22 16:23:29 -03:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2023-07-18 11:54:22 -03:00
|
|
|
runs-on: macos-latest
|
2020-06-22 16:23:29 -03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config: [
|
|
|
|
px4_fmu-v5_default,
|
2021-01-31 10:21:42 -04:00
|
|
|
px4_sitl
|
2020-06-22 16:23:29 -03:00
|
|
|
]
|
|
|
|
steps:
|
2023-11-18 07:59:47 -04:00
|
|
|
- name: install Python 3.10
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
|
2020-06-22 16:23:29 -03:00
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
token: ${{secrets.ACCESS_TOKEN}}
|
|
|
|
|
|
|
|
- name: setup
|
2020-12-28 18:43:20 -04:00
|
|
|
run: ./Tools/setup/macos.sh; ./Tools/setup/macos.sh
|
2020-06-22 16:23:29 -03:00
|
|
|
|
|
|
|
- name: Prepare ccache timestamp
|
|
|
|
id: ccache_cache_timestamp
|
|
|
|
shell: cmake -P {0}
|
|
|
|
run: |
|
|
|
|
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
|
|
|
message("::set-output name=timestamp::${current_date}")
|
|
|
|
- name: ccache cache files
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.ccache
|
2020-06-23 11:29:48 -03:00
|
|
|
key: macos_${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
|
|
|
restore-keys: macos_${{matrix.config}}-ccache-
|
2020-06-22 16:23:29 -03:00
|
|
|
- name: setup ccache
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.ccache
|
|
|
|
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
|
|
|
echo "compression = true" >> ~/.ccache/ccache.conf
|
2021-10-06 00:31:19 -03:00
|
|
|
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
2021-10-06 00:37:50 -03:00
|
|
|
echo "max_size = 40M" >> ~/.ccache/ccache.conf
|
2021-10-06 00:45:22 -03:00
|
|
|
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
2020-06-22 16:23:29 -03:00
|
|
|
ccache -s
|
|
|
|
ccache -z
|
|
|
|
|
|
|
|
- name: make ${{matrix.config}}
|
|
|
|
run: |
|
|
|
|
ccache -z
|
|
|
|
make ${{matrix.config}}
|
|
|
|
ccache -s
|