Skip to content

Commit

Permalink
try to get ccache working
Browse files Browse the repository at this point in the history
  • Loading branch information
samansmink committed Sep 17, 2024
1 parent 5362edf commit 58fcf12
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/_extension_distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,24 @@ jobs:
echo "DUCKDB_PLATFORM=${{ matrix.duckdb_arch }}" >> docker_env.txt
echo "TOOLCHAIN_FLAGS=${{ matrix.duckdb_arch == 'linux_arm64' && '-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_Fortran_COMPILER=aarch64-linux-gnu-gfortran' || '' }}" >> docker_env.txt
- name: Prepare ccache timestamp
shell: cmake -P {0}
id: ccache_timestamp
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: Create ccache dirs
run: |
touch ./ccache-dir
- name: Configure cache for ccache
uses: actions/cache@v4
- name: ccache cache files
uses: actions/cache@v1.1.0
with:
path: ./ccache-dir
key: ${{ github.job }}-${{ matrix.duckdb_arch }}
key: ${{ matrix.duckdb_arch }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ matrix.duckdb_arch }}-ccache-
- name: Build extension
run: |
Expand Down
3 changes: 3 additions & 0 deletions docker/linux_amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ WORKDIR /duckdb_build_dir
# Mount for ccache to allow restoring ccache in GH actions
VOLUME /ccache_dir
ENV CCACHE_DIR=/ccache_dir
ENV CCACHE_COMPRESS=TRUE
ENV CCACHE_COMPRESSLEVEL=6
ENV CCACHE_MAXSIZE=400M

###
# Conditionally configure some extra dependencies
Expand Down
3 changes: 3 additions & 0 deletions docker/linux_amd64_gcc4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ WORKDIR /duckdb_build_dir
# Mount for ccache to allow restoring ccache in GH actions
VOLUME /ccache_dir
ENV CCACHE_DIR=/ccache_dir
ENV CCACHE_COMPRESS=TRUE
ENV CCACHE_COMPRESSLEVEL=6
ENV CCACHE_MAXSIZE=400M

###
# Conditionally configure some extra dependencies
Expand Down
3 changes: 3 additions & 0 deletions docker/linux_arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ WORKDIR /duckdb_build_dir
# Mount for ccache to allow restoring ccache in GH actions
VOLUME /ccache_dir
ENV CCACHE_DIR=/ccache_dir
ENV CCACHE_COMPRESS=TRUE
ENV CCACHE_COMPRESSLEVEL=6
ENV CCACHE_MAXSIZE=400M

###
# Conditionally configure some extra dependencies
Expand Down

0 comments on commit 58fcf12

Please sign in to comment.