Add ccache to github actions

This commit is contained in:
Julian Kent 2020-03-10 22:33:46 +01:00 committed by Julian Kent
parent ab3670e02b
commit 88c9761f1f
3 changed files with 36 additions and 1 deletions

View File

@ -20,5 +20,16 @@ jobs:
env:
CI: true
run: make check_format
- uses: actions/cache@v1.1.0
id: ccache-persistence
with:
path: ~/.ccache
key: ccache-main-tests
restore-keys: |
ccache-main-tests
- name: setup ccache
run: mkdir -p ~/.ccache && echo "max_size = 300M" > ~/.ccache/ccache.conf && ccache -z && ccache -s
- name: main tests
run: make tests
- name: ccache post-run
run: ccache -s && ccache -z

View File

@ -1,4 +1,4 @@
name: compile nuttx
name: nuttx
on:
push:
@ -55,8 +55,19 @@ jobs:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- uses: actions/cache@v1.1.0
id: ccache-persistence
with:
path: ~/.ccache
key: ccache-nuttx-${{matrix.config}}
restore-keys: |
ccache-nuttx-${{matrix.config}}
- name: setup ccache
run: mkdir -p ~/.ccache && echo "max_size = 300M" > ~/.ccache/ccache.conf && ccache -z && ccache -s
- name: make ${{matrix.config}}
run: make ${{matrix.config}}
- name: ccache post-run
run: ccache -s && ccache -z
- name: Upload px4 package
uses: actions/upload-artifact@v1
with:

View File

@ -20,8 +20,21 @@ jobs:
run: wget https://github.com/mavlink/MAVSDK/releases/download/v0.24.0/mavsdk_0.24.0_ubuntu18.04_amd64.deb
- name: Install MAVSDK
run: dpkg -i mavsdk_0.24.0_ubuntu18.04_amd64.deb
- uses: actions/cache@v1.1.0
id: ccache-persistence
with:
path: ~/.ccache
key: ccache-sitl-tests
restore-keys: |
ccache-sitl-tests
- name: setup ccache
run: mkdir -p ~/.ccache && echo "max_size = 1G" > ~/.ccache/ccache.conf && ccache -z && ccache -s
- name: Build PX4 in SITL integration test mode
run: DONT_RUN=1 make px4_sitl PX4_CMAKE_BUILD_TYPE=Coverage gazebo mavsdk_tests
- name: ccache post-run
run: ccache -s && ccache -z
# Run mavsdk tests
- name: Run multicopter simulation test
run: test/mavsdk_tests/mavsdk_test_runner.py --model iris --speed-factor 20 --iterations 1 --fail-early
- name: Run multicopter with optical flow simulation test