kiddin9 / Kwrt

一分钟在线定制编译 X86/64, NanoPi R2S R4S R5S R6S, 斐讯 Phicomm N1 K2P, 树莓派 Raspberry Pi, 香橙派 Orange Pi, 红米AX6, 小米AX3600, 小米AX9000, 红米AX6S 小米AX3200, 红米AC2100, 华硕ASUS, 网件NETGEAR 等主流软硬路由
https://openwrt.ai
MIT License
7.74k stars 3.08k forks source link

How to compile locally ? #1302

Open chaoyoung opened 1 year ago

chaoyoung commented 1 year ago

Because Github Actions compilation has resource limitations, how can I compile locally other than using GitHub Actions?

chaoyoung commented 1 year ago

Local compilation failed with command act -j build --bind . --env-file ./.env --eventpath ./event.json, the error is follows:

parallels@ubuntu-linux-22-04-desktop:~/OpenWrt_x86-r2s-r4s-r5s-N1$ ./build.sh
[Build OpenWrt/Build ipq807x_generic] 🚀  Start image=catthehacker/ubuntu:act-22.04
[Repo Dispatcher/build              ] 🚀  Start image=catthehacker/ubuntu:act-22.04
[Repo Dispatcher/build              ]   🐳  docker pull image=catthehacker/ubuntu:act-22.04 platform= username= forcePull=true
[Build OpenWrt/Build ipq807x_generic]   🐳  docker pull image=catthehacker/ubuntu:act-22.04 platform= username= forcePull=true
[Repo Dispatcher/build              ]   🐳  docker create image=catthehacker/ubuntu:act-22.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[Build OpenWrt/Build ipq807x_generic]   🐳  docker create image=catthehacker/ubuntu:act-22.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[Build OpenWrt/Build ipq807x_generic]   🐳  docker run image=catthehacker/ubuntu:act-22.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[Repo Dispatcher/build              ]   🐳  docker run image=catthehacker/ubuntu:act-22.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[Repo Dispatcher/build              ]   ☁  git clone 'https://github.com/styfle/cancel-workflow-action' # ref=main
[Build OpenWrt/Build ipq807x_generic]   ☁  git clone 'https://github.com/stupidloud/cachewrtbuild' # ref=main
[Repo Dispatcher/build              ] ⭐ Run Main Checkout
[Repo Dispatcher/build              ]   ✅  Success - Main Checkout
[Repo Dispatcher/build              ] ⭐ Run Main Load Settings.ini
[Repo Dispatcher/build              ]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir=
[Repo Dispatcher/build              ]   ✅  Success - Main Load Settings.ini
[Repo Dispatcher/build              ]   ⚙  ::set-env:: REPO_URL=https://github.com/openwrt/openwrt
[Repo Dispatcher/build              ]   ⚙  ::set-env:: REPO_BRANCH=
[Repo Dispatcher/build              ] ⭐ Run Main Trigger Packages Update
[Repo Dispatcher/build              ]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/3] user= workdir=
| date: invalid date ‘null’
[Repo Dispatcher/build              ]   ❌  Failure - Main Trigger Packages Update
[Repo Dispatcher/build              ] exitcode '1': failure
[Repo Dispatcher/build              ] 🏁  Job failed
[Build OpenWrt/Build ipq807x_generic]   ☁  git clone 'https://github.com/kiddin9/debugger-action' # ref=master
[Build OpenWrt/Build ipq807x_generic]   ☁  git clone 'https://github.com/easingthemes/ssh-deploy' # ref=main
[Build OpenWrt/Build ipq807x_generic]   ☁  git clone 'https://github.com/actions/upload-artifact' # ref=main
[Build OpenWrt/Build ipq807x_generic]   ☁  git clone 'https://github.com/softprops/action-gh-release' # ref=master
[Build OpenWrt/Build ipq807x_generic]   ☁  git clone 'https://github.com/docker/setup-buildx-action' # ref=master
[Build OpenWrt/Build ipq807x_generic]   ☁  git clone 'https://github.com/docker/login-action' # ref=master
[Build OpenWrt/Build ipq807x_generic]   ☁  git clone 'https://github.com/docker/build-push-action' # ref=master
[Build OpenWrt/Build ipq807x_generic]   ☁  git clone 'https://github.com/GitRML/delete-workflow-runs' # ref=main
[Build OpenWrt/Build ipq807x_generic]   ☁  git clone 'https://github.com/dev-drprasad/delete-older-releases' # ref=master
[Build OpenWrt/Build ipq807x_generic] 🧪  Matrix: map[target:ipq807x_generic]
[Build OpenWrt/Build ipq807x_generic] ⭐ Run Main Checkout
[Build OpenWrt/Build ipq807x_generic]   ✅  Success - Main Checkout
[Build OpenWrt/Build ipq807x_generic] ⭐ Run Main Load Settings.ini
[Build OpenWrt/Build ipq807x_generic]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1] user= workdir=
| ipq807x_generic
[Build OpenWrt/Build ipq807x_generic]   ✅  Success - Main Load Settings.ini
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: CONFIG_FILE=.config
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: UPLOAD_BIN_DIR_FOR_ARTIFACT=false
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: UPLOAD_FIRMWARE_FOR_ARTIFACT=true
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: UPLOAD_FIRMWARE_TO_COWTRANSFER=false
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: UPLOAD_FIRMWARE_TO_WETRANSFER=true
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: REPO_URL=https://github.com/openwrt/openwrt
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: REPO_BRANCH=master
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: DIY_SH=diy.sh
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: FREE_UP_DISK=false
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: UPLOAD_FIRMWARE_FOR_RELEASE=false
[Build OpenWrt/Build ipq807x_generic]   ⚙  ::set-env:: MTARGET=aarch64_cortex-a53
[Build OpenWrt/Build ipq807x_generic] ⭐ Run Main Trigger Packages Update
[Build OpenWrt/Build ipq807x_generic]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir=
| date: invalid date ‘null’
[Build OpenWrt/Build ipq807x_generic] Failed but continue next step
[Build OpenWrt/Build ipq807x_generic]   ❌  Failure - Main Trigger Packages Update
[Build OpenWrt/Build ipq807x_generic] ⭐ Run Main Initialization environment
[Build OpenWrt/Build ipq807x_generic]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/3] user= workdir=
| System has not been booted with systemd as init system (PID 1). Can't operate.
| Failed to connect to bus: Host is down
[Build OpenWrt/Build ipq807x_generic]   ❌  Failure - Main Initialization environment
[Build OpenWrt/Build ipq807x_generic] exitcode '1': failure
[Build OpenWrt/Build ipq807x_generic] 🏁  Job failed
Error: Job 'Build ${{matrix.target}}' failed