px4-firmware/.github/workflows/compile_linux.yml

59 lines
1.6 KiB
YAML
Raw Permalink Normal View History

name: Compile Linux Targets
2020-03-18 12:07:45 -03:00
on:
push:
branches:
2022-09-07 01:09:44 -03:00
- 'main'
- 'stable'
- 'beta'
- 'release/*'
2020-03-18 12:07:45 -03:00
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
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,
scumaker_pilotpi_default,
2020-03-18 12:07:45 -03:00
]
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- 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
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
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
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