From f0d82bc2571d8c5b68204ad128e4ed23c65066da Mon Sep 17 00:00:00 2001 From: Vadim Vetrov Date: Mon, 9 Sep 2024 19:14:52 +0300 Subject: [PATCH] Add workflow for auto builds for GPL --- .github/workflows/build-gpl.yml | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/build-gpl.yml diff --git a/.github/workflows/build-gpl.yml b/.github/workflows/build-gpl.yml new file mode 100644 index 0000000..4fb282d --- /dev/null +++ b/.github/workflows/build-gpl.yml @@ -0,0 +1,55 @@ +name: Build GPL + +on: + push: + # branches: + # - main + paths-ignore: + - 'README.md' + + workflow_dispatch: + + +jobs: + build_gpl: + name: build ${{ matrix.gplv }} + runs-on: ubuntu-latest + strategy: + matrix: + include: + - gplv: ax1500v1 + link: "https://static.tp-link.com/upload/gpl-code/2023/202303/20230319/ax1500v1_gpl_20230314.tar.gz" + # - gplv: ax1500v1.2 + # link: "https://static.tp-link.com/upload/gpl-code/2023/202304/20230406/ax1500v1.20_gpl_20230404.tar.gz" + # - gplv: ax10v1 + # link: "https://static.tp-link.com/resources/gpl/ax10v1_gpl_20200701.tar.gz" + # + # - gplv: ax10v1.2 + # link: "https://static.tp-link.com/resources/gpl/ax10v1.20_gpl_20200701.tar.gz" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build docker image + run: | + docker build -t router_build . + + - name: Prepare gpl code + run: | + wget -O router.tar.gz ${{ matrix.link }} + tar -xf router.tar.gz + + - name: Patch gpl code + run: | + docker run --rm -v ./router:/router --w /router router_build bash -c "patch -p1 < ../router.patch" + docker run --rm -v ./router:/router --w /router router_build bash -c "mkdir -p Iplatform/openwrt/dl/ && cp /luci-0.11.1.tar.gz /router/Iplatform/openwrt/dl" + - name: Build GPL + run: | + docker run --rm -v ./router:/router --w /router/Iplatform/build router_build bash -c "make SHELL=/bin/bash V=s" | tee build.log + + - name: Upload build log + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.gplv }} + path: ./**/build.log