aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2023-05-28 03:15:50 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2023-10-24 17:12:04 +0200
commit51adcb7cd223f56984abdc27b929d16bde4284cf (patch)
tree67d7c078ca881026b5f3d041fd23f379fb64b5e5
parentd7e2468e13fb871026e1969845a1c5ccb9a1dcee (diff)
downloadupstream-51adcb7cd223f56984abdc27b929d16bde4284cf.tar.gz
upstream-51adcb7cd223f56984abdc27b929d16bde4284cf.tar.bz2
upstream-51adcb7cd223f56984abdc27b929d16bde4284cf.zip
CI: build: fix ccache cache usage
CCache cache is currently broken due to a funny bug in ccache compiler type detection. It seems ccache compiler type detection is very fragile and with the use of external toolchain doesn't correctly detect the type. The type detected is set to other instead of gcc resulting in ccache complaining for unsupported compiler options. To handle this problem, force the compiler type to gcc to make ccache correctly work and speedup compilation. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> (cherry picked from commit ae7b05328cf471780de8559fba845c4b564e059e)
-rw-r--r--.github/workflows/build.yml13
1 files changed, 12 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0fbeb5b0f5..0c0c05f402 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -302,11 +302,22 @@ jobs:
echo CONFIG_TARGET_PER_DEVICE_ROOTFS=y >> .config
echo CONFIG_TARGET_ALL_PROFILES=y >> .config
- - name: Configure ccache
+ # ccache for some reason have problem detecting compiler type
+ # with external toolchain. This cause the complete malfunction
+ # of ccache with the result of tons of unsupported compiler
+ # option error.
+ # To fix this force compiler type to gcc.
+ - name: Configure ccache and apply fixes
if: inputs.use_ccache_cache == true
shell: su buildbot -c "sh -e {0}"
working-directory: openwrt
+ env:
+ SYSTEM_CCACHE_CONF: staging_dir/host/etc/ccache.conf
run: |
+ touch $SYSTEM_CCACHE_CONF
+
+ echo compiler_type=gcc >> $SYSTEM_CCACHE_CONF
+
echo CONFIG_CCACHE=y >> .config
- name: Configure external toolchain in container