Skip to content

Commit

Permalink
CI: use common ccache environment
Browse files Browse the repository at this point in the history
and enable CCACHE_SLOPPINESS=file_stat_matches
  • Loading branch information
tridge committed Mar 2, 2022
1 parent d8fb6cc commit 5420857
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 150 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ccache.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# common ccache env vars for CI
export CCACHE_SLOPPINESS=file_stat_matches

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
8 changes: 1 addition & 7 deletions .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-${{matrix.config}} # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test build ${{matrix.config}}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/test_chibios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-${{matrix.config}}-${{ matrix.toolchain }}-${{ matrix.gcc }} # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test ${{matrix.config}} ${{ matrix.toolchain }} gcc-${{matrix.gcc}}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/test_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: Configure CAN
if: ${{ matrix.config == 'sitltest-can'}}
run: |
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/test_linux_sbc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test ${{matrix.config}} ${{ matrix.toolchain }}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/test_replay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test ${{matrix.config}} ${{ matrix.toolchain }}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down
32 changes: 4 additions & 28 deletions .github/workflows/test_sitl_copter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: build copter ${{ matrix.toolchain }}
shell: bash
run: |
Expand Down Expand Up @@ -96,13 +90,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test ${{matrix.config}}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down Expand Up @@ -157,13 +145,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: build heli
shell: bash
run: |
Expand Down Expand Up @@ -203,13 +185,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test ${{matrix.config}}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/test_sitl_periph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: install 32-bit libraries
run: |
dpkg --add-architecture i386
Expand Down Expand Up @@ -90,13 +84,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: install 32-bit libraries
run: |
sudo dpkg --add-architecture i386
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/test_sitl_plane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: build plane ${{ matrix.toolchain }}
shell: bash
run: |
Expand Down Expand Up @@ -91,13 +85,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test ${{matrix.config}}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/test_sitl_rover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: build rover ${{ matrix.toolchain }}
shell: bash
run: |
Expand Down Expand Up @@ -91,13 +85,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test ${{matrix.config}}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/test_sitl_sub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: build sub ${{ matrix.toolchain }}
shell: bash
run: |
Expand Down Expand Up @@ -90,13 +84,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test ${{matrix.config}}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/test_sitl_tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: build tracker ${{ matrix.toolchain }}
shell: bash
run: |
Expand Down Expand Up @@ -90,13 +84,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test ${{matrix.config}}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/test_size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ jobs:
path: ~/.ccache
key: ${{github.workflow}}-ccache-${{ matrix.toolchain }}-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master
- 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: Build master ${{matrix.config}} ${{ matrix.toolchain }}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/test_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,7 @@ jobs:
restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master
- 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
. .github/workflows/ccache.env
- name: test ${{matrix.config}} ${{ matrix.toolchain }}
env:
CI_BUILD_TARGET: ${{matrix.config}}
Expand Down

0 comments on commit 5420857

Please sign in to comment.