kopia lustrzana https://github.com/pimoroni/pimoroni-pico
CI: Cache CMake build
rodzic
ac12fa236b
commit
df090ac8e8
|
@ -18,7 +18,7 @@ jobs:
|
||||||
name: Linux
|
name: Linux
|
||||||
cache-key: linux
|
cache-key: linux
|
||||||
cmake-args: '-DPICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk -DPICO_SDK_POST_LIST_DIRS=$GITHUB_WORKSPACE/pico-extras'
|
cmake-args: '-DPICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk -DPICO_SDK_POST_LIST_DIRS=$GITHUB_WORKSPACE/pico-extras'
|
||||||
apt-packages: clang-tidy gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
apt-packages: ccache gcc-arm-none-eabi
|
||||||
|
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
@ -26,6 +26,15 @@ jobs:
|
||||||
PICO_SDK_PATH: $GITHUB_WORKSPACE/pico-sdk
|
PICO_SDK_PATH: $GITHUB_WORKSPACE/pico-sdk
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Compiler Cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: /home/runner/.ccache
|
||||||
|
key: ccache-cmake-${{github.ref}}-${{github.sha}}
|
||||||
|
restore-keys: |
|
||||||
|
ccache-cmake-${{github.ref}}
|
||||||
|
ccache-cmake
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
@ -44,7 +53,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: raspberrypi/pico-extras
|
repository: raspberrypi/pico-extras
|
||||||
path: pico-extras
|
path: pico-extras
|
||||||
submodules: false # lwip breaks audio submodule fetchin
|
submodules: false # lwip breaks audio submodule fetching
|
||||||
|
|
||||||
# Linux deps
|
# Linux deps
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
|
@ -58,10 +67,12 @@ jobs:
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE ${{matrix.cmake-args}}
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ${{matrix.cmake-args}}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
ccache --zero-stats || true
|
||||||
cmake --build . --config $BUILD_TYPE -j 2
|
cmake --build . --config $BUILD_TYPE -j 2
|
||||||
|
ccache --show-stats || true
|
||||||
|
|
Ładowanie…
Reference in New Issue