Files
bizhang_-obav/.github/workflows/build_tests.yml
Daniel Agar 19a125dacb github actions cleanup
- merge bloaty into regular NuttX builds
 - give SITL unique cache key
2020-06-20 14:19:12 -04:00

57 lines
1.4 KiB
YAML

name: Tests
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ubuntu_release: [
bionic,
focal
]
container: px4io/px4-dev-base-${{ matrix.ubuntu_release }}:2020-04-01
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: check_format
env:
CI: true
run: make check_format
- 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
key: tests_${{matrix.ubuntu_release}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: tests_${{matrix.ubuntu_release}}-ccache-
- name: setup ccache
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 = 400M" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: main tests
run: make tests
- name: ccache post-run
run: ccache -s