From b1c242951ba9b2b1abd48109f6a59d5237e6808d Mon Sep 17 00:00:00 2001 From: csinrn Date: Sat, 7 Sep 2024 13:24:43 +0800 Subject: [PATCH] Use ccache to save CI build time --- .github/workflows/devbuild.yml | 21 +++++++++++++++++++++ .github/workflows/lint.yml | 14 ++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/.github/workflows/devbuild.yml b/.github/workflows/devbuild.yml index 9cb5755a..26c96e48 100644 --- a/.github/workflows/devbuild.yml +++ b/.github/workflows/devbuild.yml @@ -72,6 +72,13 @@ jobs: echo "flake8 path: $(which flake8)" echo "flake8 version: $(flake8 --version)" + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-standalone-buffer-${{ matrix.cmake_build_type }} + restore-keys: ${{ runner.os }}-standalone-buffer-${{ matrix.cmake_build_type }} + create-symlink: true + - name: make standalone_buffer run: | make standalone_buffer_setup @@ -176,6 +183,13 @@ jobs: echo "flake8 path: $(which flake8)" echo "flake8 version: $(flake8 --version)" + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-${{ matrix.cmake_build_type }} + restore-keys: ${{ runner.os }}-${{ matrix.cmake_build_type }} + create-symlink: true + - name: make gtest BUILD_QT=OFF run: | make gtest \ @@ -352,6 +366,13 @@ jobs: echo "flake8 path: $(which flake8)" echo "flake8 version: $(flake8 --version)" + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-${{ matrix.cmake_build_type }} + restore-keys: ${{ runner.os }}-${{ matrix.cmake_build_type }} + create-symlink: true + - name: make gtest BUILD_QT=OFF run: | make gtest \ diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 71d3a8fa..e5fc0a6a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -135,6 +135,13 @@ jobs: echo "flake8 path: $(which flake8)" echo "flake8 version: $(flake8 --version)" + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-tidy-${{ matrix.cmake_build_type }} + restore-keys: ${{ runner.os }}-tidy-${{ matrix.cmake_build_type }} + create-symlink: true + - name: make cinclude (check_include) run: make cinclude @@ -264,6 +271,13 @@ jobs: echo "flake8 path: $(which flake8)" echo "flake8 version: $(flake8 --version)" + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-tidy-${{ matrix.cmake_build_type }} + restore-keys: ${{ runner.os }}-tidy-${{ matrix.cmake_build_type }} + create-symlink: true + - name: make cinclude (check_include) run: make cinclude