Skip to content

Commit

Permalink
Use ccache to speed-up multi-architecture builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Mar 1, 2023
1 parent c4a6e3f commit 4e36f5b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/multiarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ jobs:
with:
submodules: recursive

# Cache the compiler cache
- name: Cache the compiler cache
uses: actions/cache@v3
if: endsWith(matrix.compiler, '-qemu-cross')
with:
path: ccache
key: ccache-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.run_id }}
restore-keys: |
ccache-${{ matrix.os }}-${{ matrix.compiler }}
- name: Start Docker container
if: endsWith(matrix.compiler, '-cross')
run: sh -x scripts/build/start_container.sh
Expand Down
20 changes: 12 additions & 8 deletions scripts/build/build.conf.sub
Original file line number Diff line number Diff line change
Expand Up @@ -81,31 +81,35 @@ gcc-arm64-cross)
PKGS="`exclude_pkgs 2.3.7` gcc-aarch64-linux-gnu libc-dev-arm64-cross qemu-user-static"
;;
gcc-arm32-qemu-cross)
export CC="gcc"
export CC="/usr/lib/ccache/gcc"
export CCACHE_DIR="`pwd`/ccache"
DOCKR_BASE="ubuntu"
DOCKR_PLATFORM="arm/v7"
PKGS="`exclude_pkgs 2.3.7` gcc g++"
PKGS="`exclude_pkgs 2.3.7` gcc g++ ccache"
EXCLUDE_MODULES_ADD="db_unixodbc"
;;
clang-arm32-qemu-cross)
export CC="clang"
export CC="/usr/lib/ccache/clang"
export CCACHE_DIR="`pwd`/ccache"
DOCKR_BASE="ubuntu"
DOCKR_PLATFORM="arm/v7"
PKGS="`exclude_pkgs 2.3.7` clang llvm-dev"
PKGS="`exclude_pkgs 2.3.7` clang llvm-dev ccache"
EXCLUDE_MODULES_ADD="db_unixodbc"
;;
gcc-arm64-qemu-cross)
export CC="gcc"
export CC="/usr/lib/ccache/gcc"
export CCACHE_DIR="`pwd`/ccache"
DOCKR_BASE="ubuntu"
DOCKR_PLATFORM="arm64/v8"
PKGS="`exclude_pkgs 2.3.7` gcc g++"
PKGS="`exclude_pkgs 2.3.7` gcc g++ ccache"
EXCLUDE_MODULES_ADD="db_unixodbc"
;;
clang-arm64-qemu-cross)
export CC="clang"
export CC="/usr/lib/ccache/clang"
export CCACHE_DIR="`pwd`/ccache"
DOCKR_BASE="ubuntu"
DOCKR_PLATFORM="arm64/v8"
PKGS="`exclude_pkgs 2.3.7` clang llvm-dev"
PKGS="`exclude_pkgs 2.3.7` clang llvm-dev ccache"
EXCLUDE_MODULES_ADD="db_unixodbc"
;;
clang)
Expand Down

0 comments on commit 4e36f5b

Please sign in to comment.