Skip to content

Commit

Permalink
fix: ccache compile fail (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
marsevilspirit authored Jan 24, 2025
2 parents ddf8de6 + 27aaf88 commit 4cf903c
Showing 1 changed file with 15 additions and 37 deletions.
52 changes: 15 additions & 37 deletions .github/workflows/kiwidb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,43 +40,33 @@ jobs:
build_on_macos:
runs-on: macos-14
needs: check_format
env:
CMAKE_C_COMPILER_LAUNCHER: "ccache"
CMAKE_CXX_COMPILER_LAUNCHER: "ccache"

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
brew update
brew install ccache
brew install autoconf
brew install go
- name: Configure ccache
run: |
ccache --set-config=cache_dir=$HOME/.ccache
ccache --max-size=10G
- name: Restore ccache
uses: actions/cache@v3
- name: Restore cache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('**/*.cpp','**/*.cc','**/*.c', '**/*.h') }}-clang
path: |
${{ github.workspace }}/download
${{ github.workspace }}/build-release
${{ github.workspace }}/deps-release
key: ${{ runner.os }}-cache-${{ hashFiles('**/CMakeLists.txt') }}-clang
restore-keys: |
${{ runner.os }}-ccache-
ccache-
${{ runner.os }}-cache-
- name: Build
run: |
export LIBRARY_PATH=$(xcrun --show-sdk-path)/usr/lib
export DYLD_LIBRARY_PATH=$(xcrun --show-sdk-path)/usr/lib
bash ./etc/script/build.sh --verbose
- name: Save ccache stats
run: ccache -s

- name: GTest
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
# Execute tests defined by the CMake configuration.
Expand All @@ -100,37 +90,25 @@ jobs:
build_on_ubuntu:
runs-on: ubuntu-latest
needs: check_format
env:
CMAKE_C_COMPILER_LAUNCHER: "ccache"
CMAKE_CXX_COMPILER_LAUNCHER: "ccache"

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt install -y ccache

- name: Configure ccache
run: |
ccache --set-config=cache_dir=$HOME/.ccache
ccache --max-size=10G
- name: Restore ccache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('**/*.cpp','**/*.cc','**/*.c', '**/*.h') }}
path: |
${{ github.workspace }}/download
${{ github.workspace }}/build-release
${{ github.workspace }}/deps-release
key: ${{ runner.os }}-cache-${{ hashFiles('**/CMakeLists.txt') }}-gcc
restore-keys: |
${{ runner.os }}-ccache-
ccache-
${{ runner.os }}-cache-
- name: Build
run: |
bash ./etc/script/build.sh --verbose
- name: Save ccache stats
run: ccache -s

- name: GTest
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
# Execute tests defined by the CMake configuration.
Expand Down

0 comments on commit 4cf903c

Please sign in to comment.