Browse Source

CI: use common ccache environment

and enable CCACHE_SLOPPINESS=file_stat_matches
apm_2208
Andrew Tridgell 3 years ago
parent
commit
54208574f0
  1. 10
      .github/workflows/ccache.env
  2. 8
      .github/workflows/macos_build.yml
  3. 8
      .github/workflows/test_chibios.yml
  4. 8
      .github/workflows/test_coverage.yml
  5. 8
      .github/workflows/test_linux_sbc.yml
  6. 8
      .github/workflows/test_replay.yml
  7. 32
      .github/workflows/test_sitl_copter.yml
  8. 16
      .github/workflows/test_sitl_periph.yml
  9. 16
      .github/workflows/test_sitl_plane.yml
  10. 16
      .github/workflows/test_sitl_rover.yml
  11. 16
      .github/workflows/test_sitl_sub.yml
  12. 16
      .github/workflows/test_sitl_tracker.yml
  13. 10
      .github/workflows/test_size.yml
  14. 8
      .github/workflows/test_unit_tests.yml

10
.github/workflows/ccache.env

@ -0,0 +1,10 @@ @@ -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
.github/workflows/macos_build.yml

@ -42,13 +42,7 @@ jobs: @@ -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}}

8
.github/workflows/test_chibios.yml

@ -67,13 +67,7 @@ jobs: @@ -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}}

8
.github/workflows/test_coverage.yml

@ -46,13 +46,7 @@ jobs: @@ -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: |

8
.github/workflows/test_linux_sbc.yml

@ -60,13 +60,7 @@ jobs: @@ -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}}

8
.github/workflows/test_replay.yml

@ -41,13 +41,7 @@ jobs: @@ -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}}

32
.github/workflows/test_sitl_copter.yml

@ -38,13 +38,7 @@ jobs: @@ -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: |
@ -96,13 +90,7 @@ jobs: @@ -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}}
@ -157,13 +145,7 @@ jobs: @@ -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: |
@ -203,13 +185,7 @@ jobs: @@ -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}}

16
.github/workflows/test_sitl_periph.yml

@ -31,13 +31,7 @@ jobs: @@ -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
@ -90,13 +84,7 @@ jobs: @@ -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

16
.github/workflows/test_sitl_plane.yml

@ -38,13 +38,7 @@ jobs: @@ -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: |
@ -91,13 +85,7 @@ jobs: @@ -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}}

16
.github/workflows/test_sitl_rover.yml

@ -38,13 +38,7 @@ jobs: @@ -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: |
@ -91,13 +85,7 @@ jobs: @@ -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}}

16
.github/workflows/test_sitl_sub.yml

@ -38,13 +38,7 @@ jobs: @@ -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: |
@ -90,13 +84,7 @@ jobs: @@ -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}}

16
.github/workflows/test_sitl_tracker.yml

@ -38,13 +38,7 @@ jobs: @@ -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: |
@ -90,13 +84,7 @@ jobs: @@ -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}}

10
.github/workflows/test_size.yml

@ -43,16 +43,6 @@ jobs: @@ -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}}

8
.github/workflows/test_unit_tests.yml

@ -46,13 +46,7 @@ jobs: @@ -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}}

Loading…
Cancel
Save