2023-07-19 14:17:04 -03:00
|
|
|
name: Compile Linux Targets
|
2020-03-18 12:07:45 -03:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-09-07 01:09:44 -03:00
|
|
|
- 'main'
|
2023-07-19 14:17:04 -03:00
|
|
|
- 'stable'
|
|
|
|
- 'beta'
|
|
|
|
- 'release/*'
|
2020-03-18 12:07:45 -03:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2023-06-26 14:54:04 -03:00
|
|
|
container: px4io/px4-dev-armhf:2023-06-26
|
2020-03-18 12:07:45 -03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config: [
|
|
|
|
beaglebone_blue_default,
|
|
|
|
emlid_navio2_default,
|
|
|
|
px4_raspberrypi_default,
|
2020-11-10 12:04:47 -04:00
|
|
|
scumaker_pilotpi_default,
|
2020-03-18 12:07:45 -03:00
|
|
|
]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
token: ${{secrets.ACCESS_TOKEN}}
|
2023-06-27 10:55:43 -03:00
|
|
|
- name: ownership workaround
|
|
|
|
run: git config --system --add safe.directory '*'
|
2020-06-20 14:18:06 -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
|
2020-06-20 14:26:29 -03:00
|
|
|
uses: actions/cache@v2
|
2020-03-18 12:07:45 -03:00
|
|
|
with:
|
|
|
|
path: ~/.ccache
|
2020-06-20 14:18:06 -03:00
|
|
|
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
|
|
|
restore-keys: ${{matrix.config}}-ccache-
|
2020-03-18 12:07:45 -03:00
|
|
|
- name: setup ccache
|
2020-06-20 14:18:06 -03:00
|
|
|
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-14 19:58:39 -03:00
|
|
|
echo "max_size = 100M" >> ~/.ccache/ccache.conf
|
2021-10-06 18:55:50 -03:00
|
|
|
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
2020-06-20 14:18:06 -03:00
|
|
|
ccache -s
|
|
|
|
ccache -z
|
|
|
|
|
2020-03-18 12:07:45 -03:00
|
|
|
- name: make ${{matrix.config}}
|
|
|
|
run: make ${{matrix.config}}
|
|
|
|
- name: ccache post-run
|
2020-06-20 14:18:06 -03:00
|
|
|
run: ccache -s
|