diff --git a/.github/workflows/ccache.env b/.github/workflows/ccache.env new file mode 100644 index 0000000000..2cae97776a --- /dev/null +++ b/.github/workflows/ccache.env @@ -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 diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 5c5c891fde..e142a796ac 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -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}} diff --git a/.github/workflows/test_chibios.yml b/.github/workflows/test_chibios.yml index 76db9c91d9..8f2d141781 100644 --- a/.github/workflows/test_chibios.yml +++ b/.github/workflows/test_chibios.yml @@ -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}} diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index e191f6d67e..45749b21e8 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -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: | diff --git a/.github/workflows/test_linux_sbc.yml b/.github/workflows/test_linux_sbc.yml index 7c1ef11688..e36a28fc3d 100644 --- a/.github/workflows/test_linux_sbc.yml +++ b/.github/workflows/test_linux_sbc.yml @@ -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}} diff --git a/.github/workflows/test_replay.yml b/.github/workflows/test_replay.yml index 69ca68c587..7ecae879f4 100644 --- a/.github/workflows/test_replay.yml +++ b/.github/workflows/test_replay.yml @@ -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}} diff --git a/.github/workflows/test_sitl_copter.yml b/.github/workflows/test_sitl_copter.yml index bb99604bba..237af06448 100644 --- a/.github/workflows/test_sitl_copter.yml +++ b/.github/workflows/test_sitl_copter.yml @@ -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: 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: 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: 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}} diff --git a/.github/workflows/test_sitl_periph.yml b/.github/workflows/test_sitl_periph.yml index 1a81791b70..8a517adf87 100644 --- a/.github/workflows/test_sitl_periph.yml +++ b/.github/workflows/test_sitl_periph.yml @@ -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: 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 diff --git a/.github/workflows/test_sitl_plane.yml b/.github/workflows/test_sitl_plane.yml index 9d4f7df05f..3640bc4e90 100644 --- a/.github/workflows/test_sitl_plane.yml +++ b/.github/workflows/test_sitl_plane.yml @@ -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: 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}} diff --git a/.github/workflows/test_sitl_rover.yml b/.github/workflows/test_sitl_rover.yml index 1b0ee63153..b87437a330 100644 --- a/.github/workflows/test_sitl_rover.yml +++ b/.github/workflows/test_sitl_rover.yml @@ -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: 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}} diff --git a/.github/workflows/test_sitl_sub.yml b/.github/workflows/test_sitl_sub.yml index 8d43b72d18..39c25c28b5 100644 --- a/.github/workflows/test_sitl_sub.yml +++ b/.github/workflows/test_sitl_sub.yml @@ -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: 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}} diff --git a/.github/workflows/test_sitl_tracker.yml b/.github/workflows/test_sitl_tracker.yml index db9fc0586a..8c6abec961 100644 --- a/.github/workflows/test_sitl_tracker.yml +++ b/.github/workflows/test_sitl_tracker.yml @@ -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: 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}} diff --git a/.github/workflows/test_size.yml b/.github/workflows/test_size.yml index 09db01cfd1..a1ed220ddb 100644 --- a/.github/workflows/test_size.yml +++ b/.github/workflows/test_size.yml @@ -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}} diff --git a/.github/workflows/test_unit_tests.yml b/.github/workflows/test_unit_tests.yml index db361317e6..e745cae37b 100644 --- a/.github/workflows/test_unit_tests.yml +++ b/.github/workflows/test_unit_tests.yml @@ -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}}