coolsnowwolf / lede

Lean's LEDE source
Other
29.83k stars 19.52k forks source link

Process completed with exit code 2. #6236

Closed zhangbin0301 closed 3 years ago

zhangbin0301 commented 3 years ago

Annotations 1 error

Process completed with exit code 2.

forks 最新代码后, actions自动编译出现些问题, 之前没有问题。自动编译文件没有变更过,只是更新最新的code,软路由X86

如下自动编译

name: OpenWrt-CI

on: push: branches:

jobs:

build_openwrt:

name: Build OpenWrt and release
runs-on: ubuntu-18.04

steps:
  - name: Checkout
    uses: actions/checkout@v2
    with:
      ref: master

  - name: Space cleanup
    env:
      DEBIAN_FRONTEND: noninteractive
    run: |
      docker rmi `docker images -q`
      sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d
      sudo -E apt-get -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* mysql* php*
      sudo -E apt-get update
      sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler antlr3 gperf swig
      sudo -E apt-get -y autoremove --purge
      sudo -E apt-get clean

  - name: 自定义插件主题。
    run: |
      cd package
      mkdir openwrt-packages
      cd openwrt-packages
      git clone https://github.com/destan19/OpenAppFilter.git
      git clone https://github.com/fw876/helloworld.git

      df -h
  - name: Update feeds
    run: |
      sed -i 's/\"#src-git\"/\"src-git\"/g' ./feeds.conf.default
      ./scripts/feeds update -a
      ./scripts/feeds install -a
  - name: Generate configuration file
    run: |
      rm -f ./.config*
      touch ./.config

      # 编译x64固件:
      cat >> .config <<EOF
      CONFIG_TARGET_x86=y
      CONFIG_TARGET_x86_64=y
      CONFIG_TARGET_x86_64_Generic=y
      EOF
      # 固件压缩:
      cat >> .config <<EOF
      CONFIG_TARGET_IMAGES_GZIP=y
      EOF
      # 编译UEFI固件:
      # cat >> .config <<EOF
      # CONFIG_EFI_IMAGES=y
      # EOF
      # IPv6支持:
      # cat >> .config <<EOF
      # CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y
      # CONFIG_PACKAGE_ipv6helper=y
      # EOF
      # 多文件系统支持:
      cat >> .config <<EOF
      CONFIG_PACKAGE_kmod-fs-nfs=y
      CONFIG_PACKAGE_kmod-fs-nfs-common=y
      CONFIG_PACKAGE_kmod-fs-nfs-v3=y
      CONFIG_PACKAGE_kmod-fs-nfs-v4=y
      CONFIG_PACKAGE_kmod-fs-ntfs=y
      CONFIG_PACKAGE_kmod-fs-squashfs=y
      EOF
      # USB3.0支持:
      cat >> .config <<EOF
      CONFIG_PACKAGE_kmod-usb-ohci=y
      CONFIG_PACKAGE_kmod-usb-ohci-pci=y
      CONFIG_PACKAGE_kmod-usb2=y
      CONFIG_PACKAGE_kmod-usb2-pci=y
      CONFIG_PACKAGE_kmod-usb3=y
      EOF
      # 常用LuCI插件选择:
      cat >> .config <<EOF
      # CONFIG_PACKAGE_luci-app-adbyby-plus=y
      # CONFIG_PACKAGE_luci-app-aria2=y
      # CONFIG_PACKAGE_luci-app-baidupcs-web=y
      # CONFIG_PACKAGE_luci-app-docker=y
      # CONFIG_PACKAGE_luci-app-frpc=y
      # CONFIG_PACKAGE_luci-app-kodexplorer=y
      # CONFIG_PACKAGE_luci-app-minidlna=y
      # CONFIG_PACKAGE_luci-app-openvpn=y
      # CONFIG_PACKAGE_luci-app-openvpn-server=y
      # CONFIG_PACKAGE_luci-app-qbittorrent=y
      CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Kcptun=y
      CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks=y
      CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_ShadowsocksR_Server=y
      CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_ShadowsocksR_Socks=y
      CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_V2ray=y
      CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Xray=y
      CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Trojan-go=y
      # CONFIG_PACKAGE_luci-app-syncdial=y
      # CONFIG_PACKAGE_luci-app-ttyd=y
      # CONFIG_PACKAGE_luci-app-v2ray-server=y
      # CONFIG_PACKAGE_luci-app-verysync=y
      # CONFIG_PACKAGE_luci-app-webadmin=y
      # CONFIG_PACKAGE_luci-app-wireguard=y
      # CONFIG_PACKAGE_luci-app-wrtbwmon=y
      # CONFIG_PACKAGE_luci-app-syncdial=y
      CONFIG_PACKAGE_luci-app-oaf=y
      CONFIG_PACKAGE_luci-app-cifs-mount=y
      CONFIG_PACKAGE_luci-app-cifsd=y
      CONFIG_PACKAGE_luci-app-diskman=y
      CONFIG_PACKAGE_luci-app-sqm=y
      CONFIG_PACKAGE_luci-app-uugamebooster=y
      CONFIG_PACKAGE_luci-app-zerotier=y
      EOF
      # LuCI主题:
      cat >> .config <<EOF
      CONFIG_PACKAGE_luci-theme-argon=y
      # CONFIG_PACKAGE_luci-theme-netgear=y
      EOF
      # 常用软件包:
      cat >> .config <<EOF
      CONFIG_PACKAGE_curl=y
      CONFIG_PACKAGE_htop=y
      CONFIG_PACKAGE_nano=y
      CONFIG_PACKAGE_screen=y
      CONFIG_PACKAGE_tree=y
      CONFIG_PACKAGE_vim-fuller=y
      CONFIG_PACKAGE_wget=y
      EOF
      # 取消编译VMware镜像以及镜像填充 (不要删除被缩进的注释符号):
      # cat >> .config <<EOF
      # CONFIG_TARGET_IMAGES_PAD is not set
      # CONFIG_VMDK_IMAGES is not set
      # EOF
      # 
      # ========================固件定制部分结束========================
      # 
      sed -i 's/^[ \t]*//g' ./.config
      make defconfig
  - name: Make download
    run: |
      make download -j8
      find dl -size -1024c -exec rm -f {} \;
  - name: Compile firmware
    run: |
      make -j$(nproc) || make -j1 V=s
      echo "======================="
      echo "Space usage:"
      echo "======================="
      df -h
      echo "======================="
      du -h --max-depth=1 ./ --exclude=build_dir --exclude=bin
      du -h --max-depth=1 ./build_dir
      du -h --max-depth=1 ./bin
  - name: Prepare artifact
    run: find ./bin/targets/ -type d -name "packages" | xargs rm -rf {}

  - name: Upload artifact
    uses: actions/upload-artifact@master
    with:
      name: OpenWrt_firmware
      path: ./bin/targets/

  - name: Create release
    if: github.event == 'push'
    id: create_release
    uses: actions/create-release@v1.0.1
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    with:
      tag_name: ${{ github.ref }}
      release_name: ${{ github.ref }}
      draft: false
      prerelease: false      

  - name: Upload release asset
    if: github.event == 'push'
    id: upload-release-asset 
    uses: actions/upload-release-asset@v1.0.2
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    with:
      upload_url: ${{ steps.create_release.outputs.upload_url }}
      asset_path: ./bin/targets/*/*/
EnnawYang commented 3 years ago

1.编译错误的log请自觉贴出

2021-01-23T05:49:34.2641687Z make[3]: Entering directory '/home/runner/work/lede/lede/package/openwrt-packages/OpenAppFilter/oaf'
2021-01-23T05:49:34.4326634Z rm -f /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/.built
2021-01-23T05:49:34.4354068Z touch /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/.built_check
2021-01-23T05:49:34.4429519Z cat /dev/null > /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/symvers/oaf.symvers; for subdir in .; do cat /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/symvers/*.symvers 2>/dev/null > /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/$subdir/Module.symvers; done
2021-01-23T05:49:34.4477818Z make -C "/home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.91" KCFLAGS="-ffile-prefix-map=/home/runner/work/lede/lede/build_dir/target-x86_64_musl=target-x86_64_musl" HOSTCFLAGS="-O2 -I/home/runner/work/lede/lede/staging_dir/host/include -I/home/runner/work/lede/lede/staging_dir/hostpkg/include -I/home/runner/work/lede/lede/staging_dir/target-x86_64_musl/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="x86_64-openwrt-linux-musl-" ARCH="x86" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Sat Jan 23 01:57:38 2021" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/home/runner/work/lede/lede/staging_dir/host/lib" KBUILD_HOSTLDLIBS="-L/home/runner/work/lede/lede/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls= KERNELRELEASE=5.4.91 M="/home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0" EXTRA_CFLAGS=""  modules
2021-01-23T05:49:34.4506893Z make[4]: Entering directory '/home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.91'
2021-01-23T05:49:35.4168299Z   CC [M]  /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/af_log.o
2021-01-23T05:49:35.5996075Z /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/af_log.c: In function 'af_init_log_sysctl':
2021-01-23T05:49:35.5998429Z /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/af_log.c:56:27: warning: unused variable 'hdr' [-Wunused-variable]
2021-01-23T05:49:35.5999821Z   struct ctl_table_header *hdr;
2021-01-23T05:49:35.6000465Z                            ^~~
2021-01-23T05:49:35.6016383Z /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/af_log.c: In function 'af_log_init':
2021-01-23T05:49:35.6018607Z /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/af_log.c:75:1: error: control reaches end of non-void function [-Werror=return-type]
2021-01-23T05:49:35.6019699Z  }
2021-01-23T05:49:35.6020206Z  ^
2021-01-23T05:49:35.6021326Z /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/af_log.c: In function 'af_log_exit':
2021-01-23T05:49:35.6023075Z /home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/af_log.c:79:1: error: control reaches end of non-void function [-Werror=return-type]
2021-01-23T05:49:35.6024287Z  }
2021-01-23T05:49:35.6024800Z  ^
2021-01-23T05:49:35.6138339Z cc1: some warnings being treated as errors
2021-01-23T05:49:35.6164331Z make[5]: *** [/home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/af_log.o] Error 1
2021-01-23T05:49:35.6165814Z scripts/Makefile.build:261: recipe for target '/home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0/af_log.o' failed
2021-01-23T05:49:35.6168996Z make[4]: *** [/home/runner/work/lede/lede/build_dir/target-x86_64_musl/linux-x86_64/oaf-3.0] Error 2

2.OpenAppFilter编译错误不要在这提交issue