From 90adc8ea2cb764794d18eddadad26a28247ef0e7 Mon Sep 17 00:00:00 2001 From: Yury Sannikov Date: Wed, 21 Feb 2024 02:15:42 +0300 Subject: [PATCH] one more time --- .github/workflows/build-module.yml | 125 +++++++++++++++-------------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/.github/workflows/build-module.yml b/.github/workflows/build-module.yml index e7e43de5..24faad86 100644 --- a/.github/workflows/build-module.yml +++ b/.github/workflows/build-module.yml @@ -46,9 +46,9 @@ jobs: cache-name: "cache-tools-kernel-${{ matrix.tag }}-${{ matrix.build_env.pkgarch}}-${{ matrix.build_env.target}}-${{ matrix.build_env.subtarget}}" with: path: . - key: ${{ runner.os }}-build-vm-${{ env.cache-name }} + key: ${{ runner.os }}-build-vm2-${{ env.cache-name }} restore-keys: | - ${{ runner.os }}-build-vm-cache-tools-kernel-${{ matrix.tag }}-${{ matrix.build_env.pkgarch}}- + ${{ runner.os }}-build-vm2-cache-tools-kernel-${{ matrix.tag }}-${{ matrix.build_env.pkgarch}}- - name: Building kernel and tools if: ${{ steps.cache-tools-kernel.outputs.cache-hit != 'true' }} @@ -68,76 +68,77 @@ jobs: make defconfig - make target/linux/compile V=s || true - - VERMAGIC=`cat ./build_dir/target-*/linux-*/linux-*/.vermagic` - VERMAGIC_EXPECTED=${{ matrix.build_env.vermagic }} - - if [ "$VERMAGIC" != "$VERMAGIC_EXPECTED" ]; then - echo Vermagic mismatch: $VERMAGIC, expected $VERMAGIC_EXPECTED - exit 1 - fi - echo " > make tools/install" make tools/install -i -j `nproc` - echo " > make toolchain/install" - make toolchain/install -i -j `nproc` - # compile kernel module - echo " > make target/linux/compile" - make target/linux/compile -i -j `nproc` V=s - echo "Final Kernel vermagic:" cat ./build_dir/target-*/linux-*/linux-*/.vermagic - - name: Update feeds - run: | - wget https://downloads.openwrt.org/releases/${{ matrix.tag }}/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/feeds.buildinfo -O feeds.conf - echo "src-git awgopenwrt https://github.com/yury-sannikov/awg-openwrt.git" >> ./feeds.conf - - ./scripts/feeds update luci - ./scripts/feeds install -a -p luci - ./scripts/feeds update awgopenwrt - ./scripts/feeds install -a -p awgopenwrt - - wget https://downloads.openwrt.org/releases/${{ matrix.tag }}/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/config.buildinfo -O .config - echo "CONFIG_PACKAGE_kmod-amneziawg=m" >> .config - echo "CONFIG_PACKAGE_amneziawg-tools=y" >> .config - echo "CONFIG_PACKAGE_luci-app-amneziawg=y" >> .config - echo "CONFIG_PACKAGE_kmod-amneziawg=m" >> .config - echo "CONFIG_PACKAGE_kmod-crypto-lib-chacha20=m" >> .config - echo "CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=m" >> .config - echo "CONFIG_PACKAGE_kmod-crypto-chacha20poly1305=m" >> .config + echo " > make toolchain/install" + make toolchain/install -i -j `nproc` - make defconfig + cat ./build_dir/target-*/linux-*/linux-*/.vermagic - - name: Build amneziawg-tools - run: | - make V=s package/amneziawg-tools/{clean,download,prepare} - make V=s package/amneziawg-tools/compile + # compile kernel module + echo " > make target/linux/compile" + make target/linux/compile -i -j `nproc` V=s - - name: Build kmod-amneziawg - run: | - make package/kmod-amneziawg/{clean,download,prepare} - make package/kmod-amneziawg/compile + VERMAGIC=`cat ./build_dir/target-*/linux-*/linux-*/.vermagic` + VERMAGIC_EXPECTED=${{ matrix.build_env.vermagic }} - - name: Build luci - run: | - make package/luci-app-amneziawg/{clean,download,prepare} - make package/luci-app-amneziawg/compile V=s + if [ "$VERMAGIC" != "$VERMAGIC_EXPECTED" ]; then + echo Vermagic mismatch: $VERMAGIC, expected $VERMAGIC_EXPECTED + exit 1 + fi - - name: Prepare artifacts - run: | - tag_name=${{ github.ref_name }} - mkdir -p awgrelease - postfix="${tag_name}_v${{ matrix.tag }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}" - cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/amneziawg-tools_*.ipk awgrelease/amneziawg-tools_${postfix}.ipk - cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/luci-app-amneziawg_*.ipk awgrelease/luci-app-amneziawg_${postfix}.ipk - cp bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg_*.ipk awgrelease/kmod-amneziawg_${postfix}.ipk - - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: awgrelease/*.ipk + # - name: Update feeds + # run: | + # wget https://downloads.openwrt.org/releases/${{ matrix.tag }}/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/feeds.buildinfo -O feeds.conf + # echo "src-git awgopenwrt https://github.com/yury-sannikov/awg-openwrt.git" >> ./feeds.conf + + # ./scripts/feeds update luci + # ./scripts/feeds install -a -p luci + # ./scripts/feeds update awgopenwrt + # ./scripts/feeds install -a -p awgopenwrt + + # wget https://downloads.openwrt.org/releases/${{ matrix.tag }}/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/config.buildinfo -O .config + # echo "CONFIG_PACKAGE_kmod-amneziawg=m" >> .config + # echo "CONFIG_PACKAGE_amneziawg-tools=y" >> .config + # echo "CONFIG_PACKAGE_luci-app-amneziawg=y" >> .config + # echo "CONFIG_PACKAGE_kmod-amneziawg=m" >> .config + # echo "CONFIG_PACKAGE_kmod-crypto-lib-chacha20=m" >> .config + # echo "CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=m" >> .config + # echo "CONFIG_PACKAGE_kmod-crypto-chacha20poly1305=m" >> .config + + # make defconfig + + # - name: Build amneziawg-tools + # run: | + # make V=s package/amneziawg-tools/{clean,download,prepare} + # make V=s package/amneziawg-tools/compile + + # - name: Build kmod-amneziawg + # run: | + # make package/kmod-amneziawg/{clean,download,prepare} + # make package/kmod-amneziawg/compile + + # - name: Build luci + # run: | + # make package/luci-app-amneziawg/{clean,download,prepare} + # make package/luci-app-amneziawg/compile V=s + + # - name: Prepare artifacts + # run: | + # tag_name=${{ github.ref_name }} + # mkdir -p awgrelease + # postfix="${tag_name}_v${{ matrix.tag }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}" + # cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/amneziawg-tools_*.ipk awgrelease/amneziawg-tools_${postfix}.ipk + # cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/luci-app-amneziawg_*.ipk awgrelease/luci-app-amneziawg_${postfix}.ipk + # cp bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg_*.ipk awgrelease/kmod-amneziawg_${postfix}.ipk + + # - name: Release + # uses: softprops/action-gh-release@v1 + # with: + # files: awgrelease/*.ipk - name: Cleanup run: |