From 15e05f2b9e036b643f6c0b2729abc062dee48bbd Mon Sep 17 00:00:00 2001 From: xopenwrt <98641952+xopenwrt@users.noreply.github.com> Date: Sun, 22 Sep 2024 15:38:15 +0800 Subject: [PATCH] fix Mine --- .../workflows/AutoBuild-asus_rt-acrh17.yml | 2 +- .../workflows/AutoBuild-d-team_newifi-d2.yml | 2 +- .../workflows/AutoBuild-p2w_r619ac-128m.yml | 2 +- .github/workflows/AutoBuild-x86_64.yml | 2 +- .../AutoBuild-xiaomi_mi-router-4a-gigabit.yml | 2 +- .../AutoBuild-xiaomi_redmi-router-ac2100.yml | 2 +- .../AutoBuild-xiaomi_redmi-router-ax6s.yml | 2 +- .github/workflows/AutoBuild-xiaoyu_xy-c5.yml | 2 +- .github/workflows/X-x86_64_Test.yml | 2 +- .github/workflows/X-x86_64_X.yml | 2 +- .github/workflows/X-x86_64_X_Mine.yml | 51 +++++++++++++---- .github/workflows/X-x86_64_Y.yml | 2 +- .github/workflows/X-x86_64_Z.yml | 2 +- .github/workflows/X-x86_64_Z_Mine.yml | 56 +++++++++++++------ 14 files changed, 89 insertions(+), 42 deletions(-) diff --git a/.github/workflows/AutoBuild-asus_rt-acrh17.yml b/.github/workflows/AutoBuild-asus_rt-acrh17.yml index b917000..c4ea616 100644 --- a/.github/workflows/AutoBuild-asus_rt-acrh17.yml +++ b/.github/workflows/AutoBuild-asus_rt-acrh17.yml @@ -54,7 +54,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: issues: write pull-requests: write diff --git a/.github/workflows/AutoBuild-d-team_newifi-d2.yml b/.github/workflows/AutoBuild-d-team_newifi-d2.yml index 938ecf4..4b34a91 100644 --- a/.github/workflows/AutoBuild-d-team_newifi-d2.yml +++ b/.github/workflows/AutoBuild-d-team_newifi-d2.yml @@ -54,7 +54,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: issues: write pull-requests: write diff --git a/.github/workflows/AutoBuild-p2w_r619ac-128m.yml b/.github/workflows/AutoBuild-p2w_r619ac-128m.yml index c358563..4fdb349 100644 --- a/.github/workflows/AutoBuild-p2w_r619ac-128m.yml +++ b/.github/workflows/AutoBuild-p2w_r619ac-128m.yml @@ -54,7 +54,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: issues: write pull-requests: write diff --git a/.github/workflows/AutoBuild-x86_64.yml b/.github/workflows/AutoBuild-x86_64.yml index 2bb1739..ef0da1d 100644 --- a/.github/workflows/AutoBuild-x86_64.yml +++ b/.github/workflows/AutoBuild-x86_64.yml @@ -54,7 +54,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: issues: write pull-requests: write diff --git a/.github/workflows/AutoBuild-xiaomi_mi-router-4a-gigabit.yml b/.github/workflows/AutoBuild-xiaomi_mi-router-4a-gigabit.yml index ed75331..c65a2de 100644 --- a/.github/workflows/AutoBuild-xiaomi_mi-router-4a-gigabit.yml +++ b/.github/workflows/AutoBuild-xiaomi_mi-router-4a-gigabit.yml @@ -54,7 +54,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: issues: write pull-requests: write diff --git a/.github/workflows/AutoBuild-xiaomi_redmi-router-ac2100.yml b/.github/workflows/AutoBuild-xiaomi_redmi-router-ac2100.yml index c80e182..b11c133 100644 --- a/.github/workflows/AutoBuild-xiaomi_redmi-router-ac2100.yml +++ b/.github/workflows/AutoBuild-xiaomi_redmi-router-ac2100.yml @@ -54,7 +54,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: issues: write pull-requests: write diff --git a/.github/workflows/AutoBuild-xiaomi_redmi-router-ax6s.yml b/.github/workflows/AutoBuild-xiaomi_redmi-router-ax6s.yml index 65310ac..4736199 100644 --- a/.github/workflows/AutoBuild-xiaomi_redmi-router-ax6s.yml +++ b/.github/workflows/AutoBuild-xiaomi_redmi-router-ax6s.yml @@ -54,7 +54,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: issues: write pull-requests: write diff --git a/.github/workflows/AutoBuild-xiaoyu_xy-c5.yml b/.github/workflows/AutoBuild-xiaoyu_xy-c5.yml index 3cb0914..5133dc2 100644 --- a/.github/workflows/AutoBuild-xiaoyu_xy-c5.yml +++ b/.github/workflows/AutoBuild-xiaoyu_xy-c5.yml @@ -54,7 +54,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: issues: write pull-requests: write diff --git a/.github/workflows/X-x86_64_Test.yml b/.github/workflows/X-x86_64_Test.yml index de2f752..9b98ece 100644 --- a/.github/workflows/X-x86_64_Test.yml +++ b/.github/workflows/X-x86_64_Test.yml @@ -60,7 +60,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Test run: | diff --git a/.github/workflows/X-x86_64_X.yml b/.github/workflows/X-x86_64_X.yml index bd2b40b..82bfcf7 100644 --- a/.github/workflows/X-x86_64_X.yml +++ b/.github/workflows/X-x86_64_X.yml @@ -60,7 +60,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Get current date & Set env id: date diff --git a/.github/workflows/X-x86_64_X_Mine.yml b/.github/workflows/X-x86_64_X_Mine.yml index c6f727d..b37afc7 100644 --- a/.github/workflows/X-x86_64_X_Mine.yml +++ b/.github/workflows/X-x86_64_X_Mine.yml @@ -76,7 +76,7 @@ jobs: echo "SharePoint=${{ github.event.inputs.SharePoint }}" >> $GITHUB_ENV echo "data2=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT echo "NOW_DATA_VERSION=v$(date +'%Y-%m-%d')" >> $GITHUB_ENV - + export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}} export GITHUB_WORKSPACE=$GITHUB_WORKSPACE @@ -93,14 +93,6 @@ jobs: Get_Action_Info - # - name: Maximize Build Space - # uses: easimon/maximize-build-space@master - # with: - # root-reserve-mb: 3500 - # swap-size-mb: 100 - # remove-dotnet: 'true' - # remove-android: 'true' - # remove-haskell: 'true' @@ -149,7 +141,8 @@ jobs: DEBIAN_FRONTEND: noninteractive run: | sudo -E apt-get update - sudo -E apt-get -y install build-essential cmake asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc-s1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libreadline-dev libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint ccache curl wget vim nano python3 python3-pip python3-ply haveged lrzsz device-tree-compiler scons antlr3 gperf intltool mkisofs rsync + sudo -E apt-get -y install build-essential cmake asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libreadline-dev libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint ccache curl wget vim nano python3 python3-pip python3-ply haveged lrzsz device-tree-compiler scons antlr3 gperf intltool mkisofs rsync + sudo -E apt-get -y install llvm clang sudo timedatectl set-timezone "Asia/Shanghai" sudo mkdir -p /workdir # sudo chown $USER:$GROUPS /workdir @@ -175,6 +168,9 @@ jobs: ./scripts/feeds update -a ./scripts/feeds install -a ./scripts/feeds uninstall luci-theme-argon + # Update golang to 1.22 for xray-core build + rm -rf feeds/packages/lang/golang + git clone https://github.com/sbwml/packages_lang_golang -b 22.x feeds/packages/lang/golang # sed -i 's/^\s*$[(]call\sEnsureVendoredVersion/#&/' $GITHUB_WORKSPACE/openwrt/feeds/packages/utils/dockerd/Makefile #fix dockerd bug @@ -201,7 +197,7 @@ jobs: cd openwrt ./scripts/feeds install -a make defconfig - make download -j8 + make download -j16 - name: Build OpenWrt run: | @@ -209,9 +205,40 @@ jobs: rm package/feeds/packages/adguardhome -rf rm feeds/packages/net/adguardhome -rf ln -s ../../../package/other/AutoBuild-Packages/adguardhome package/feeds/packages/adguardhome - make -j$(($(nproc) + 1)) || make -j1 V=s + # 2024.03.03 mosdns build fail by golang 1.22 + sed -i 's/CGO_ENABLED=0/CGO_ENABLED=1/g' feeds/packages/net/mosdns/Makefile + make -j$(($(nproc) + 1)) | tee ./build_log.log || make -j1 V=s [ "$?" == 0 ] && echo "Result=true" >> $GITHUB_ENV || echo "Result=false" >> $GITHUB_ENV + + + - name: Check Build Update + run: | + export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}} + export GITHUB_WORKSPACE=$GITHUB_WORKSPACE + bash $GITHUB_WORKSPACE/Scripts/AutoBuild_Upcheck.sh ${{env.Tempoary_FLAG}} + + - name: Upload Package Version to Github Release + uses: svenstaro/upload-release-action@v2 + if: env.Release=='true' && env.UPLOAD_RELEASES == 'true' && env.Result == 'true' && !cancelled() + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{env.Tempoary_FLAG}}_build_pkg_ver.log + file_glob: true + tag: v${{ steps.date.outputs.date }} + overwrite: true + + - name: Upload Package Update to Github Release + uses: svenstaro/upload-release-action@v2 + if: env.Release=='true' && env.UPLOAD_RELEASES == 'true' && env.Result == 'true' && !cancelled() + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{env.Tempoary_FLAG}}_build_pkg_up.log + file_glob: true + tag: v${{ steps.date.outputs.date }} + overwrite: true + + - name: Process Firmware if: env.Result == 'true' && !cancelled() run: | diff --git a/.github/workflows/X-x86_64_Y.yml b/.github/workflows/X-x86_64_Y.yml index 1cf9dba..7079109 100644 --- a/.github/workflows/X-x86_64_Y.yml +++ b/.github/workflows/X-x86_64_Y.yml @@ -60,7 +60,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Maximize Build Space uses: easimon/maximize-build-space@master diff --git a/.github/workflows/X-x86_64_Z.yml b/.github/workflows/X-x86_64_Z.yml index 86fdceb..9e807d8 100644 --- a/.github/workflows/X-x86_64_Z.yml +++ b/.github/workflows/X-x86_64_Z.yml @@ -60,7 +60,7 @@ env: jobs: Compile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Maximize Build Space uses: easimon/maximize-build-space@master diff --git a/.github/workflows/X-x86_64_Z_Mine.yml b/.github/workflows/X-x86_64_Z_Mine.yml index f56d43c..f02e862 100644 --- a/.github/workflows/X-x86_64_Z_Mine.yml +++ b/.github/workflows/X-x86_64_Z_Mine.yml @@ -67,7 +67,7 @@ jobs: uses: actions/checkout@main with: fetch-depth: 0 - + - name: Set env & Echo System Info id: date run: | @@ -92,17 +92,6 @@ jobs: Get_Action_Info - # - name: Maximize Build Space - # uses: easimon/maximize-build-space@master - # with: - # root-reserve-mb: 3500 - # swap-size-mb: 100 - # remove-dotnet: 'true' - # remove-android: 'true' - # remove-haskell: 'true' - - - - name: Load Custom Variables run: | echo "Free space:" @@ -148,7 +137,8 @@ jobs: DEBIAN_FRONTEND: noninteractive run: | sudo -E apt-get update - sudo -E apt-get -y install build-essential cmake asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc-s1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libreadline-dev libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint ccache curl wget vim nano python3 python3-pip python3-ply haveged lrzsz device-tree-compiler scons antlr3 gperf intltool mkisofs rsync + sudo -E apt-get -y install build-essential cmake asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libreadline-dev libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint ccache curl wget vim nano python3 python3-pip python3-ply haveged lrzsz device-tree-compiler scons antlr3 gperf intltool mkisofs rsync + sudo -E apt-get -y install llvm clang sudo timedatectl set-timezone "Asia/Shanghai" sudo mkdir -p /workdir # sudo chown $USER:$GROUPS /workdir @@ -174,6 +164,9 @@ jobs: ./scripts/feeds update -a ./scripts/feeds install -a ./scripts/feeds uninstall luci-theme-argon + # Update golang to 1.22 for xray-core build + rm -rf feeds/packages/lang/golang + git clone https://github.com/sbwml/packages_lang_golang -b 22.x feeds/packages/lang/golang # sed -i 's/^\s*$[(]call\sEnsureVendoredVersion/#&/' $GITHUB_WORKSPACE/openwrt/feeds/packages/utils/dockerd/Makefile #fix dockerd bug @@ -208,9 +201,37 @@ jobs: rm package/feeds/packages/adguardhome -rf rm feeds/packages/net/adguardhome -rf ln -s ../../../package/other/AutoBuild-Packages/adguardhome package/feeds/packages/adguardhome - make -j8 || make -j1 V=s + make -j$(($(nproc) + 1)) | tee ./build_log.log || make -j1 V=s + # 2024.03.03 mosdns build fail by golang 1.22 + sed -i 's/CGO_ENABLED=0/CGO_ENABLED=1/g' feeds/packages/net/mosdns/Makefile [ "$?" == 0 ] && echo "Result=true" >> $GITHUB_ENV || echo "Result=false" >> $GITHUB_ENV + - name: Check Build Update + run: | + export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}} + export GITHUB_WORKSPACE=$GITHUB_WORKSPACE + bash $GITHUB_WORKSPACE/Scripts/AutoBuild_Upcheck.sh ${{env.Tempoary_FLAG}} + + - name: Upload Package Version to Github Release + uses: svenstaro/upload-release-action@v2 + if: env.Release=='true' && env.UPLOAD_RELEASES == 'true' && env.Result == 'true' && !cancelled() + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{env.Tempoary_FLAG}}_build_pkg_ver.log + file_glob: true + tag: v${{ steps.date.outputs.date }} + overwrite: true + + - name: Upload Package Update to Github Release + uses: svenstaro/upload-release-action@v2 + if: env.Release=='true' && env.UPLOAD_RELEASES == 'true' && env.Result == 'true' && !cancelled() + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{env.Tempoary_FLAG}}_build_pkg_up.log + file_glob: true + tag: v${{ steps.date.outputs.date }} + overwrite: true + - name: Process Firmware if: env.Result == 'true' && !cancelled() run: | @@ -279,8 +300,7 @@ jobs: sp_folder: /Shared Documents/OpenWrt/${{ steps.date.outputs.date }} sp_file_name: ${{ env.SP_UEFI_IMG_GZ }} file: openwrt/bin/Firmware/${{ env.SP_UEFI_IMG_GZ }} - - + - name: 2 Upload SP_UEFI_VMDK to SharePoint uses: su-dont/share-point-uploader@v2.1 if: env.SharePoint=='true' && !cancelled() && env.Result == 'true' @@ -313,7 +333,7 @@ jobs: # sp_folder: /Shared Documents/OpenWrt/${{ steps.date.outputs.date }} # sp_file_name: ${{ env.SP_UEFI_VHDX }} # file: openwrt/bin/Firmware/${{ env.SP_UEFI_VHDX }} - + - name: 5 Upload SP_LEGACY_IMG_GZ to SharePoint uses: su-dont/share-point-uploader@v2.1 if: env.SharePoint=='true' && !cancelled() && env.Result == 'true' @@ -334,7 +354,7 @@ jobs: sp_password: ${{ secrets.PASSWORD }} sp_folder: /Shared Documents/OpenWrt/${{ steps.date.outputs.date }} sp_file_name: ${{ env.SP_LEGACY_VMDK }} - # file: openwrt/bin/Firmware/${{ env.SP_LEGACY_VMDK }} + file: openwrt/bin/Firmware/${{ env.SP_LEGACY_VMDK }} # - name: 7 Upload SP_LEGACY_VDI to SharePoint # uses: su-dont/share-point-uploader@v2.1