Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用github actions cache缓存工具链, 加速你的云编译项目,让你做更快的男人 #7796

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

stupidloud
Copy link
Contributor

@stupidloud stupidloud commented Sep 2, 2021

壁画不多直接上效果,最短25分钟完成

简单原理就是,
github给actions提供了5gb的高速缓存空间,
使用这个空间缓存工具链的编译进度,
可以节省掉不必要的40多分钟耗时。

食用方法:(参考pr)
在你的openwrt-ci.yml actions/checkout段尾部加入

          fetch-depth: 0

(因为工具使用了tools和toolchain的commit id决定是否更新缓存,所以需要全量拉取代码)

随后添加工具调用,即可

      - name: cache
        uses: klever1988/cachewrtbuild@main

第一次编译不会有变化,因为你的仓库还没有缓存,随后的编译作业就会从你仓库拉去第一次编译生成的缓存,跳过无意义的工具链编译时间。
可用参数和默认值:

      - name: cache
        uses: klever1988/cachewrtbuild@main
        with:
          #是否一并缓存.ccache目录,如果你启用了ccache。这是唯一的常用参数,其他三个用于除错,一般不需要调整
          ccache: false

          #是否缓存工具链目录
          toolchain: true

          #是否跳过工具链编译
          skip: true

          #清空缓存
          clean: false

建议在make menuconfig或者

echo -e 'CONFIG_DEVEL=y\nCONFIG_CCACHE=y' >> .config; make defconfig

开启ccache获得进一步的加速时间。

使用P3TERX/Actions-OpenWrt编译的筒子们,因为你们yml的checkout段并不是检出openwrt源代码,而是检出你们的编译脚本。所以应该把uses段放在真正的clone openwrt源码代码段之后,并且用prefix参数声明openwrt源码路径,比如

    - name: Clone source code
      working-directory: /workdir
      run: |
        df -hT $PWD
        git clone $REPO_URL -b $REPO_BRANCH openwrt
        ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
    - name: Cache
      uses: klever1988/cachewrtbuild@main
      with:
        ccache: 'true'
        prefix: ${{ github.workspace }}/openwrt

@stupidloud stupidloud marked this pull request as ready for review September 2, 2021 01:06
@smallprogram
Copy link
Contributor

Unexpected value 'ccache: 'true'
image

@stupidloud
Copy link
Contributor Author

Unexpected value 'ccache: 'true'

😢 with 加了 |
改好了

@bob-zebedy
Copy link
Contributor

bob-zebedy commented Sep 2, 2021

Google Chrome-add Cache Toolchain · deplivesOpenWrt-CI@3e44766-20210902140011

Code-Build-OpenWrt yml — OpenWrt-CI-20210902140254

@xcf13363175
Copy link

跟楼上一样的报错

@smallprogram
Copy link
Contributor

https://github.com/smallprogram/OpenWrtAction/blob/main/.github/workflows/build-openwrt_X64.yml
@deplives @xcf13363175
参考我这个,经过 @klever1988 调整过的 ,没毛病。

@jarod360
Copy link

jarod360 commented Sep 2, 2021

@smallprogram 使用你的这个出现这个错误,如何修复。
Clone source code

Run df -hT $PWD
Filesystem Type Size Used Avail Use% Mounted on
/dev/root ext4 84G 29G 55G 35% /
fatal: destination path '.' already exists and is not an empty directory.
Error: Process completed with exit code 128.

@xcf13363175
Copy link

尴尬,又是和楼上一样。

@ZeaKyX
Copy link
Contributor

ZeaKyX commented Sep 2, 2021

也许可以写个触发,这样大版本更新的时候可以重新缓存保险一点?

@smallprogram
Copy link
Contributor

@jarod360 我在你的repositories里转了一圈也没找着,不行你fork我的,改config文件夹里的x64.config文件,改成你自己的,然后跑Action编译把。你这个报错之前都已经解决了。
@xcf13363175

@xcf13363175
Copy link

xcf13363175 commented Sep 2, 2021

@smallprogram fork后可以通过。

@dpy013
Copy link
Contributor

dpy013 commented Sep 2, 2021

也许可以写个触发,这样大版本更新的时候可以重新缓存保险一点?

支持。

@smallprogram
Copy link
Contributor

也许可以写个触发,这样大版本更新的时候可以重新缓存保险一点?

有 fetch-depth: 0就行

@ZeaKyX
Copy link
Contributor

ZeaKyX commented Sep 2, 2021

也许可以写个触发,这样大版本更新的时候可以重新缓存保险一点?

有 fetch-depth: 0就行

才看懂,谢谢指示

@Cathgao
Copy link

Cathgao commented Sep 2, 2021

疑问:如果有缓存的话,会不会导致源码更新却没同步到action呢?

@stupidloud
Copy link
Contributor Author

stupidloud commented Sep 2, 2021

使用p3terx大佬编译脚本的要改一下
main改成test分支
uses: klever1988/cachewrtbuild@main
with:
ccache: 'true'
prefix: ${{ github.workspace }}/openwrt

并且应该放置到你clone openwrt源码之后
不是checkout

@jarod360
Copy link

jarod360 commented Sep 2, 2021

@klever1988 大佬按您说的改了,出现这个报错。Error: ENOENT: no such file or directory, chdir '/home/runner/work/Redmi_AX6/Redmi_AX6' -> '/openwrt'
详见https://github.com/jarod360/Redmi_AX6/runs/3494622549?check_suite_focus=true

@stupidloud
Copy link
Contributor Author

@jarod360

prefix: '/workdir/openwrt'

@xcf13363175
Copy link

@klever1988 改了prefix: '/workdir/openwrt'
Error: ENOENT: no such file or directory, chdir '/home/runner/work/OpenWrtAction/OpenWrtAction' -> '/workdir/openwrt'
还是报错

@stupidloud
Copy link
Contributor Author

疑问:如果有缓存的话,会不会导致源码更新却没同步到action呢?

不会的,只是缓存了工具链的编译目录和二进制文件而已,kernel和package每次都会重新编译
而且工具链的源码如果有更新,也是会再次编译,刷新缓存,因为缓存记录了工具链源码的commit id

@ghost
Copy link

ghost commented Sep 3, 2021

使用p3terx大佬编译脚本的要改一下
main改成test分支
uses: klever1988/cachewrtbuild@test
with:
ccache: 'true'
prefix: ${{ github.workspace }}/openwrt

并且应该放置到你clone openwrt源码之后
不是checkout

这个对使用P3TERX/Actions-OpenWrt脚本在线编译的用户是有效的
我开了2个脚本
测试下用脚本前后的差异
看看快了多少

@ababwbq
Copy link

ababwbq commented Sep 3, 2021

image
P3TERX/Actions-OpenWrt脚本 进行编译,测试的确快了不少。

@felixxiao99
Copy link

@klever1988 大佬你好,我使用的P3TERX/Actions-OpenWrt编译,在clone openwrt源码代码段之后加入了
- name: Cache
uses: klever1988/cachewrtbuild@test
with:
ccache: 'true'
prefix: ${{ github.workspace }}/openwrt

请问还需要在actions/checkout段尾部加入fetch-depth: 0吗?
另外Download package代码段里是否还要修改成echo -e 'CONFIG_DEVEL=y\nCONFIG_CCACHE=y' >> .config; make defconfig
谢谢

@stupidloud
Copy link
Contributor Author

@klever1988 大佬你好,我使用的P3TERX/Actions-OpenWrt编译,在clone openwrt源码代码段之后加入了

  • name: Cache
    uses: klever1988/cachewrtbuild@test
    with:
    ccache: 'true'
    prefix: ${{ github.workspace }}/openwrt

请问还需要在actions/checkout段尾部加入fetch-depth: 0吗?
另外Download package代码段里是否还要修改成echo -e 'CONFIG_DEVEL=y\nCONFIG_CCACHE=y' >> .config; make defconfig
谢谢

不要用test分支了,可以直接用main,klever1988/cachewrtbuild@main
用P3TERX的脚本编译不需要加fetch-depth
CONFIG_CCACHE加不加都可以,加了编译速度更快,不过有时候编译出错可以去掉它,排除出错原因

@ghost
Copy link

ghost commented Sep 4, 2021

缓存必须要actions过程全通过了才有效,只能在第1次通过了以后再重新开始就能用缓存了。

解开多线程编译才是最有效的加速。

@stupidloud
Copy link
Contributor Author

缓存必须要actions过程全通过了才有效,只能在第1次通过了以后再重新开始就能用缓存了。

解开多线程编译才是最有效的加速。

make -jnproc 难道不是多线程编译了吗

@zhangguanzhang
Copy link
Contributor

thinking我自己的思路还是可以用

大概说说你的思路吧

就是先创建一个空的zstd的img文件通过loop方式挂载成目录,然后编译完成后,把这个img文件split后分段缓存住,下次编译就下载缓存,相当于再次编译

@davidtall
Copy link

失效了吗?

@binge8
Copy link

binge8 commented Apr 23, 2023

失效了吗?

还有效

@lxl6125
Copy link
Contributor

lxl6125 commented Apr 25, 2023

失效了吗?

没失效,我第一次编译5个半小时,后面最多一个半小时

@smdx
Copy link

smdx commented May 2, 2023

失效了吗?

没失效,我第一次编译5个半小时,后面最多一个半小时

还是用下面这段?还是要修改?谢谢

- name: Cache
  uses: klever1988/cachewrtbuild@main
  with:
    ccache: 'true'
    prefix: ${{ github.workspace }}/openwrt

@clsddy
Copy link

clsddy commented Nov 17, 2023

请问大佬,缓存机制仍然有效吗,

  • name: Cache
    uses: klever1988/cachewrtbuild@main
    with:
    ccache: 'true'
    prefix: ${{ github.workspace }}/openwrt

@lxl6125
Copy link
Contributor

lxl6125 commented Nov 27, 2023

请问大佬,缓存机制仍然有效吗,

  • name: Cache
    uses: klever1988/cachewrtbuild@main
    with:
    ccache: 'true'
    prefix: ${{ github.workspace }}/openwrt

有效
Screenshot_20231127_155401_com vivaldi browser

@aiamadeus aiamadeus force-pushed the master branch 2 times, most recently from 63c106f to 6606bb3 Compare February 3, 2024 09:40
@liwenjie119
Copy link
Contributor

liwenjie119 commented Mar 22, 2024

现在好像改名成stupidloud/cachewrtbuild了,要注意恶意同名模块攻击,我被安全团队提醒了
image

@aiamadeus aiamadeus force-pushed the master branch 3 times, most recently from 6269d0f to 9f65b6f Compare October 22, 2024 15:30
@vincejv
Copy link

vincejv commented Nov 26, 2024

hello @stupidloud may i ask why sometimes or intermittently the CI fails with the following error? weird that it compiles the toolchain even if it's already skipped, I'm using the code you have in this PR

GH Actions Log
make[3] -C package/libs/toolchain clean-build
 make[3] -C package/libs/toolchain compile
    ERROR: package/libs/toolchain failed to build.
make: *** [/home/runner/work/openwrt/openwrt/include/toplevel.mk:2[48](https://github.com/vincejv/openwrt/actions/runs/12037780045/job/33561987322#step:8:49): world] Error 1
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
WARNING: Makefile 'package/utils/audit/Makefile' has a dependency on 'libev', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a build dependency on 'libpam', which does not exist
make[2]: Entering directory '/home/runner/work/openwrt/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/runner/work/openwrt/openwrt/scripts/config'
time: target/linux/prereq#0.12#0.07#0.18
 make[1] world
 make[2] package/cleanup
 make[2] target/compile
 make[3] -C target/linux compile
    ERROR: target/linux failed to build.
make: *** [/home/runner/work/openwrt/openwrt/include/toplevel.mk:248: world] Error 1
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
WARNING: Makefile 'package/utils/audit/Makefile' has a dependency on 'libev', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a build dependency on 'libpam', which does not exist
make[2]: Entering directory '/home/runner/work/openwrt/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/runner/work/openwrt/openwrt/scripts/config'
make[1]: Entering directory '/home/runner/work/openwrt/openwrt'
cd "/home/runner/work/openwrt/openwrt"; git log --format=%h -1 toolchain > /home/runner/work/openwrt/openwrt/tmp/.ver_check
cmp -s /home/runner/work/openwrt/openwrt/tmp/.ver_check /home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.3.0_musl/stamp/.ver_check || { \
	rm -rf /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl /home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl /home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.3.0_musl /home/runner/work/openwrt/openwrt/build_dir/toolchain-x86_64_gcc-13.3.0_musl; \
	mkdir -p /home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.3.0_musl/stamp; \
	mv /home/runner/work/openwrt/openwrt/tmp/.ver_check /home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.3.0_musl/stamp/.ver_check; \
}
make[2]: Entering directory '/home/runner/work/openwrt/openwrt'
cd "/home/runner/work/openwrt/openwrt"; git log --format=%h -1 toolchain > /home/runner/work/openwrt/openwrt/tmp/.ver_check
cmp -s /home/runner/work/openwrt/openwrt/tmp/.ver_check /home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.3.0_musl/stamp/.ver_check || { \
	rm -rf /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl /home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl /home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.3.0_musl /home/runner/work/openwrt/openwrt/build_dir/toolchain-x86_64_gcc-13.3.0_musl; \
	mkdir -p /home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.3.0_musl/stamp; \
	mv /home/runner/work/openwrt/openwrt/tmp/.ver_check /home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-13.3.0_musl/stamp/.ver_check; \
}
+ mkdir -p /home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl
+ cd /home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl
+ mkdir -p bin lib stamp usr/include usr/lib
mkdir -p /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/stamp
touch /home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl/.prepared
make[3]: Entering directory '/home/runner/work/openwrt/openwrt/target/linux'
make[4]: Entering directory '/home/runner/work/openwrt/openwrt/target/linux/x86'
rm -f /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/localversion
/home/runner/work/openwrt/openwrt/scripts/kconfig.pl  + + /home/runner/work/openwrt/openwrt/target/linux/generic/config-6.6 /home/runner/work/openwrt/openwrt/target/linux/x86/config-6.6 /home/runner/work/openwrt/openwrt/target/linux/x86/64/config-6.6 > /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.target
awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' /home/runner/work/openwrt/openwrt/.config >> /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.target
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.target
echo "# CONFIG_KALLSYMS_ALL is not set" >> /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.target
echo "CONFIG_KALLSYMS_UNCOMPRESSED=y" >> /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.target
/home/runner/work/openwrt/openwrt/scripts/package-metadata.pl kconfig /home/runner/work/openwrt/openwrt/tmp/.packageinfo /home/runner/work/openwrt/openwrt/.config 6.6 > /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.override
/home/runner/work/openwrt/openwrt/scripts/kconfig.pl 'm+' '+' /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.target /dev/null /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.override > /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.set
mv /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.set /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.old
grep -v INITRAMFS /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.old > /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.set
echo 'CONFIG_INITRAMFS_SOURCE=""' >> /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.set
echo '# CONFIG_INITRAMFS_FORCE is not set' >> /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.set
echo "# CONFIG_INITRAMFS_PRESERVE_MTIME is not set" >> /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.set
rm -rf /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/modules
cmp -s /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.set /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.prev || { cp /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.set /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config; cp /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.set /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.prev; }
export MAKEFLAGS= ; [ -d /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/user_headers ] || make -C /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63 KCFLAGS="-fmacro-prefix-map=/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl=target-x86_64_musl -fno-caller-saves -O2 -march=sandybridge -mtune=sandybridge -pipe" HOSTCFLAGS="-O2 -I/home/runner/work/openwrt/openwrt/staging_dir/host/include  -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="x86_64-openwrt-linux-musl-" ARCH="x86" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="builder" KBUILD_BUILD_HOST="buildhost" KBUILD_BUILD_TIMESTAMP="Tue Nov 26 19:35:05 2024" KBUILD_BUILD_VERSION="0" KBUILD_HOSTLDFLAGS="-L/home/runner/work/openwrt/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls=  CC="ccache x86_64-openwrt-linux-musl-gcc" KERNELRELEASE=6.6.63  INSTALL_HDR_PATH=/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/user_headers headers_install
grep '=[ym]' /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.config.set | LC_ALL=C sort | /home/runner/work/openwrt/openwrt/staging_dir/host/bin/mkhash md5 > /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.vermagic
touch /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.configured
rm -f /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/vmlinux /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/System.map
make -C /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63 KCFLAGS="-fmacro-prefix-map=/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl=target-x86_64_musl -fno-caller-saves -O2 -march=sandybridge -mtune=sandybridge -pipe" HOSTCFLAGS="-O2 -I/home/runner/work/openwrt/openwrt/staging_dir/host/include  -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="x86_64-openwrt-linux-musl-" ARCH="x86" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="builder" KBUILD_BUILD_HOST="buildhost" KBUILD_BUILD_TIMESTAMP="Tue Nov 26 19:35:05 2024" KBUILD_BUILD_VERSION="0" KBUILD_HOSTLDFLAGS="-L/home/runner/work/openwrt/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls=  CC="ccache x86_64-openwrt-linux-musl-gcc" KERNELRELEASE=6.6.63 bzImage modules
make[5]: Entering directory '/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63'
  SYNC    include/config/auto.conf.cmd
scripts/Kconfig.include:41: linker 'x86_64-openwrt-linux-musl-ld' not found
make[8]: *** [scripts/kconfig/Makefile:77: syncconfig] Error 1
make[7]: *** [Makefile:697: syncconfig] Error 2
/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/Makefile:775: include/config/auto.conf.cmd: No such file or directory
make[6]: *** [/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/Makefile:798: include/config/auto.conf.cmd] Error 2
make[5]: *** [Makefile:234: __sub-make] Error 2
make[5]: Leaving directory '/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63'
make[4]: *** [Makefile:25: /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.modules] Error 2
make[4]: Leaving directory '/home/runner/work/openwrt/openwrt/target/linux/x86'
make[3]: *** [Makefile:12: compile] Error 2
make[3]: Leaving directory '/home/runner/work/openwrt/openwrt/target/linux'
time: target/linux/compile#0.46#0.15#0.[57](https://github.com/vincejv/openwrt/actions/runs/12037780045/job/33561987322#step:8:58)
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:32: target/linux/compile] Error 1
make[2]: Leaving directory '/home/runner/work/openwrt/openwrt'
make[1]: *** [target/Makefile:25: /home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl/stamp/.target_compile] Error 2
make[1]: Leaving directory '/home/runner/work/openwrt/openwrt'
make: *** [/home/runner/work/openwrt/openwrt/include/toplevel.mk:248: world] Error 2
I re-run the actions again without a code changes/cache rebuild and magically works again?? See attempt no. 1 and no. 2 of this GHA Run, I reproduced this issue several times already in past CI actions/commit

Please see details here: https://github.com/vincejv/openwrt/actions/runs/12037780045/

@coolsnowwolf coolsnowwolf force-pushed the master branch 3 times, most recently from a9f949f to 007d406 Compare December 1, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.