mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 17:43:35 +08:00
github actions get ccache working
This commit is contained in:
@@ -22,20 +22,35 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: check_format
|
||||
env:
|
||||
CI: true
|
||||
run: make check_format
|
||||
- uses: actions/cache@v1.1.0
|
||||
id: ccache-persistence
|
||||
|
||||
- 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@v1.1.0
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-main-tests
|
||||
restore-keys: |
|
||||
ccache-main-tests
|
||||
key: ${{matrix.ubuntu_release}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: ${{matrix.ubuntu_release}}-ccache-
|
||||
- name: setup ccache
|
||||
run: mkdir -p ~/.ccache && echo "max_size = 300M" > ~/.ccache/ccache.conf && ccache -z && ccache -s
|
||||
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 && ccache -z
|
||||
run: ccache -s
|
||||
|
||||
Reference in New Issue
Block a user