Skip to content

Commit

Permalink
Change ccache to sccache (vesoft-inc#2865)
Browse files Browse the repository at this point in the history
* Update pull_request.yml

* add sccache for speed up build and stoarge cache file into Minio service

* Update pull_request.yml

fix indentation
  • Loading branch information
Shinji-IkariG authored Jun 27, 2023
1 parent 800aae0 commit 0285f1f
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ jobs:
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
env:
CCACHE_DIR: /tmp/ccache/nebula_ent/${{ matrix.os }}-${{ matrix.compiler }}
CCACHE_MAXSIZE: 8G
volumes:
- /tmp/ccache/nebula_ent/${{ matrix.os }}-${{ matrix.compiler }}:/tmp/ccache/nebula_ent/${{ matrix.os }}-${{ matrix.compiler }}
# SCCACHE_CACHE_SIZE: "10G"
SCCACHE_ENDPOINT: "https://mimio.vesoft-inc.com:9000"
SCCACHE_BUCKET: "ci-sccache"
SCCACHE_S3_KEY_PREFIX: ${{ github.repository }}
AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_SECRET }}
options: --cap-add=SYS_PTRACE --init
services:
elasticsearch:
Expand All @@ -92,6 +94,8 @@ jobs:
- uses: webiny/[email protected]
with:
run: sh -c "find . -mindepth 1 -delete"
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- uses: actions/checkout@v3
- name: Prepare environment
id: prepare
Expand All @@ -107,6 +111,7 @@ jobs:
centos7)
# build with Release type
cmake \
-DCOMPILER_LAUNCHER_OPTION=sccache \
-DCMAKE_CXX_COMPILER=$TOOLSET_GCC_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_GCC_DIR/bin/gcc \
-DNEBULA_USE_LINKER=mold \
Expand All @@ -118,6 +123,7 @@ jobs:
ubuntu2004)
# build with Debug type
cmake \
-DCOMPILER_LAUNCHER_OPTION=sccache \
-DCMAKE_CXX_COMPILER=$TOOLSET_GCC_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_GCC_DIR/bin/gcc \
-DNEBULA_USE_LINKER=mold \
Expand All @@ -132,6 +138,7 @@ jobs:
clang-*)
# build with Sanitizer
cmake \
-DCOMPILER_LAUNCHER_OPTION=sccache \
-DCMAKE_CXX_COMPILER=$TOOLSET_CLANG_DIR/bin/clang++ \
-DCMAKE_C_COMPILER=$TOOLSET_CLANG_DIR/bin/clang \
-DNEBULA_USE_LINKER=mold \
Expand All @@ -150,23 +157,17 @@ jobs:
case ${{ matrix.os }} in
centos7)
# build with Release type
ccache -z
ninja -j $(nproc)
ccache -s
;;
ubuntu2004)
# build with Debug type
ccache -z
ninja -j $(nproc)
ccache -s
;;
esac
;;
clang-*)
# build with Sanitizer
ccache -z
ninja -j $(nproc)
ccache -s
;;
esac
working-directory: build/
Expand Down

0 comments on commit 0285f1f

Please sign in to comment.