v2ray-geosite: update to 202603042225 (#602) #533
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Copyright (c) 2023-2024 SMALLPROGRAM <https://github.com/smallprogram> | |
| # Description: Automated compilation testing | |
| # | |
| name: Auto compilation testing | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**.md' | |
| - '.github/**' | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| - '.github/**' | |
| env: | |
| TZ: Asia/Shanghai | |
| packages: ${{ github.repository }} | |
| jobs: | |
| job_auto_compile: | |
| runs-on: ubuntu-latest | |
| name: test build (${{ matrix.platform }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: x86_64 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/x86/64/openwrt-sdk-24.10.5-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: aarch64_generic | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/rockchip/armv8/openwrt-sdk-24.10.5-rockchip-armv8_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: aarch64_cortex-a53 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/mvebu/cortexa53/openwrt-sdk-24.10.5-mvebu-cortexa53_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: aarch64_cortex-a72 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/mvebu/cortexa72/openwrt-sdk-24.10.5-mvebu-cortexa72_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: arm_cortex-a5_vfpv4 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/at91/sama5/openwrt-sdk-24.10.5-at91-sama5_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: arm_cortex-a7 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/mediatek/mt7629/openwrt-sdk-24.10.5-mediatek-mt7629_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: arm_cortex-a7_neon-vfpv4 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/sunxi/cortexa7/openwrt-sdk-24.10.5-sunxi-cortexa7_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: arm_cortex-a8_vfpv3 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/sunxi/cortexa8/openwrt-sdk-24.10.5-sunxi-cortexa8_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: arm_cortex-a9 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/bcm53xx/generic/openwrt-sdk-24.10.5-bcm53xx-generic_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: arm_cortex-a9_neon | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/zynq/generic/openwrt-sdk-24.10.5-zynq-generic_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: arm_cortex-a9_vfpv3-d16 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/mvebu/cortexa9/openwrt-sdk-24.10.5-mvebu-cortexa9_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: arm_cortex-a15_neon-vfpv4 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/ipq806x/generic/openwrt-sdk-24.10.5-ipq806x-generic_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: mips_24kc | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/ath79/generic/openwrt-sdk-24.10.5-ath79-generic_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: mips_4kec | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/realtek/rtl838x/openwrt-sdk-24.10.5-realtek-rtl838x_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: mips_mips32 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/bcm53xx/generic/openwrt-sdk-24.10.5-bcm53xx-generic_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: mipsel_24kc | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/ramips/rt288x/openwrt-sdk-24.10.5-ramips-rt288x_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: mipsel_74kc | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/ramips/rt3883/openwrt-sdk-24.10.5-ramips-rt3883_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| - platform: mipsel_mips32 | |
| url_sdk: https://downloads.openwrt.org/releases/24.10.5/targets/bcm47xx/generic/openwrt-sdk-24.10.5-bcm47xx-generic_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
| sdk_ver: "24.10" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup variables | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| echo "BASE_SHA=$(git merge-base refs/remotes/origin/${{ github.base_ref }} ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV | |
| echo "HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV | |
| echo "is pull_request event!" | |
| echo "BASE_SHA:$BASE_SHA" | |
| echo "HEAD_SHA:$HEAD_SHA" | |
| elif [ "${{ github.event_name }}" == "push" ]; then | |
| # Use `github.event.before` as the base SHA for push events to capture all changes in the push | |
| echo "BASE_SHA=${{ github.event.before }}" >> $GITHUB_ENV | |
| echo "HEAD_SHA=${{ github.event.after }}" >> $GITHUB_ENV | |
| echo "is push event!" | |
| echo "BASE_SHA:$BASE_SHA" | |
| echo "HEAD_SHA:$HEAD_SHA" | |
| fi | |
| - name: Detect Changed Directories | |
| id: detect-changes | |
| run: | | |
| echo "Base SHA: $BASE_SHA" | |
| echo "Head SHA: $HEAD_SHA" | |
| CHANGED_DIRS=$(git diff --name-only $BASE_SHA $HEAD_SHA | awk -F'/' '{print $1}' | sort -u | tr '\n' ',') | |
| echo "Changed directories: $CHANGED_DIRS" | |
| CHANGED_DIRS=${CHANGED_DIRS%,} | |
| echo "CHANGED_DIRS=$CHANGED_DIRS" >> $GITHUB_ENV | |
| - name: Initialization ${{ matrix.platform }} compile environment | |
| run: | | |
| sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /usr/local/lib/android | |
| echo "install packages!!!!!!" | |
| sudo -E apt-get -qq update | |
| sudo -E apt-get -qq install ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ | |
| bzip2 ccache clang cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib \ | |
| g++-multilib git gnutls-dev gperf haveged help2man intltool lib32gcc-s1 libc6-dev-i386 libelf-dev \ | |
| libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses-dev libpython3-dev \ | |
| libreadline-dev libssl-dev libtool libyaml-dev libz-dev lld llvm lrzsz mkisofs msmtp nano \ | |
| ninja-build p7zip p7zip-full patch pkgconf python3 python3-pip python3-ply python3-docutils \ | |
| python3-pyelftools qemu-utils re2c rsync scons squashfs-tools subversion swig texinfo uglifyjs \ | |
| upx-ucl unzip vim wget xmlto xxd zlib1g-dev zstd | |
| sudo -E apt-get -qq autoremove --purge | |
| sudo -E apt-get -qq clean | |
| - name: ${{ matrix.platform }} sdk download | |
| run: | | |
| wget ${{ matrix.url_sdk }} | |
| file_name=$(echo ${{matrix.url_sdk}} | awk -F/ '{print $NF}') | |
| mkdir sdk && tar --zstd -x -f $file_name -C ./sdk --strip-components=1 | |
| cd sdk | |
| - name: SSH connection to Actions | |
| uses: mxschmitt/action-tmate@v3.13 | |
| if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh') | |
| - name: ${{ matrix.platform }} feeds configuration packages | |
| run: | | |
| cd sdk | |
| cat > feeds.conf.default << EOF | |
| src-git passwall_packages https://github.com/${{ env.packages }}.git;main | |
| src-git base https://github.com/openwrt/openwrt.git;openwrt-${{ matrix.sdk_ver }} | |
| src-git packages https://github.com/openwrt/packages.git;openwrt-${{ matrix.sdk_ver }} | |
| src-git luci https://github.com/openwrt/luci.git;openwrt-${{ matrix.sdk_ver }} | |
| src-git routing https://github.com/openwrt/routing.git;openwrt-${{ matrix.sdk_ver }} | |
| src-git telephony https://github.com/openwrt/telephony.git;openwrt-${{ matrix.sdk_ver }} | |
| EOF | |
| ./scripts/feeds update -a | |
| ./scripts/feeds install -a | |
| #--------------------------------------begin_patches------------------------------------------ | |
| echo "Start applying the patch" | |
| rm -rf temp_resp | |
| git clone -b master --single-branch https://github.com/openwrt/packages.git temp_resp | |
| echo "update golang version" | |
| rm -rf feeds/packages/lang/golang | |
| cp -r temp_resp/lang/golang feeds/packages/lang | |
| echo "update rust version" | |
| rm -rf feeds/packages/lang/rust | |
| cp -r temp_resp/lang/rust feeds/packages/lang | |
| rm -rf temp_resp | |
| git clone -b main --single-branch https://github.com/openwrt/openwrt.git temp_resp | |
| cp -f temp_resp/scripts/patch-kernel.sh scripts/ | |
| rm -rf temp_resp | |
| echo "fixed rust host build error" | |
| sed -i 's/--set=llvm\.download-ci-llvm=true/--set=llvm.download-ci-llvm=false/' feeds/packages/lang/rust/Makefile | |
| grep -q -- '--ci false \\' feeds/packages/lang/rust/Makefile || sed -i '/x\.py \\/a \ --ci false \\' feeds/packages/lang/rust/Makefile | |
| ./scripts/feeds update -a | |
| ./scripts/feeds install -a | |
| echo "Patch application completed" | |
| #--------------------------------------end_patches-------------------------------------------- | |
| echo "CONFIG_ALL_NONSHARED=n" > .config | |
| echo "CONFIG_ALL_KMODS=n" >> .config | |
| echo "CONFIG_ALL=n" >> .config | |
| echo "CONFIG_AUTOREMOVE=n" >> .config | |
| echo "CONFIG_SIGNED_PACKAGES=n" >> .config | |
| make defconfig | |
| - name: ${{ matrix.platform }} download | |
| run: | | |
| cd sdk | |
| make download -j8 | |
| find dl -size -1024c -exec ls -l {} \; | |
| - name: Compile Changed Packages | |
| id: compile | |
| run: | | |
| cd sdk | |
| if [ -z "$CHANGED_DIRS" ]; then | |
| echo "No changes detected in passwall_packages" | |
| exit 0 | |
| fi | |
| IFS=',' read -ra DIRS <<< "$CHANGED_DIRS" | |
| for DIR in "${DIRS[@]}"; do | |
| if [ -d "package/feeds/passwall_packages/$DIR" ]; then | |
| echo "Compiling changes in directory: $DIR" | |
| make package/feeds/passwall_packages/$DIR/compile -j$(nproc) V=s || exit 1 | |
| else | |
| echo "Directory $DIR does not exist" | |
| exit 1 | |
| fi | |
| done | |