From 37a129b3c10f0835a54648a76614f9cbb5474f73 Mon Sep 17 00:00:00 2001 From: arix00 <15333224+arix00@users.noreply.github.com> Date: Wed, 20 Nov 2024 00:10:19 -0800 Subject: [PATCH] test --- .github/workflows/build_foss_snapshot.yml | 11 +++- .../workflows/build_foss_snapshot_test.yml | 59 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build_foss_snapshot_test.yml diff --git a/.github/workflows/build_foss_snapshot.yml b/.github/workflows/build_foss_snapshot.yml index 750d0c92b4c0c6..51af435cdd54a7 100644 --- a/.github/workflows/build_foss_snapshot.yml +++ b/.github/workflows/build_foss_snapshot.yml @@ -35,17 +35,26 @@ jobs: - name: Checkout uses: actions/checkout@v4 + with: + ref: 'mx4300-foss' - name: Update feeds run: scripts/feeds update -a && scripts/feeds install -a + + - name: Get script + run: | + wget https://github.com/arix00/openwrt-mx4300/blob/buildscript/release_foss.sh + wget https://raw.githubusercontent.com/arix00/openwrt-mx4300/refs/heads/buildscript/genconfig_foss.sh - name: Generate config run: sh genconfig_foss.sh snapshot - - name: Build firmware images run: make -j$(($(nproc)+1)) world + - name: Check build version + run: cat `find staging_dir -name banner` + - name: Prepare release run: sh release_foss.sh ${{ env.ver }} diff --git a/.github/workflows/build_foss_snapshot_test.yml b/.github/workflows/build_foss_snapshot_test.yml new file mode 100644 index 00000000000000..789e37de02e6d6 --- /dev/null +++ b/.github/workflows/build_foss_snapshot_test.yml @@ -0,0 +1,59 @@ +name: build foss snapshot image +on: workflow_dispatch + +jobs: + build: + name: build foss snapshot image + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Install packages + run: | + sudo apt-get update && \ + sudo apt-get install -y \ + build-essential \ + clang \ + flex \ + bison \ + g++ \ + gawk \ + gcc-multilib \ + g++-multilib \ + gettext \ + git \ + libncurses-dev \ + libssl-dev \ + python3-setuptools \ + rsync \ + unzip \ + zlib1g-dev \ + file \ + jq \ + wget && \ + sudo apt-get clean + + - name: Checkout + uses: actions/checkout@v4 + with: + ref: 'mx4300-foss' + + - name: Update feeds + run: scripts/feeds update -a && scripts/feeds install -a + + - name: Get script + run: | + wget https://github.com/arix00/openwrt-mx4300/blob/buildscript/release_foss.sh + wget https://raw.githubusercontent.com/arix00/openwrt-mx4300/refs/heads/buildscript/genconfig_foss.sh + + - name: Generate config + run: sh genconfig_foss.sh snapshot + + - name: Build firmware images + run: make -j$(($(nproc)+1)) world + + - name: Check build version + run: cat `find staging_dir -name banner` + + - name: Prepare release + run: sh release_foss.sh ${{ env.ver }}