3 Commits

Author SHA1 Message Date
remittor
6897181d32 fix 2 2025-12-29 13:09:48 +03:00
remittor
1ad38544bf fix 1 2025-12-29 12:59:05 +03:00
remittor
5167d394e1 build: Add test_build option 2025-12-29 12:53:00 +03:00

View File

@@ -3,6 +3,19 @@ name: build
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
test_build:
description: 'Test build'
required: true
default: 'false'
type: choice
options:
- true
- false
target_name:
description: 'Target Name'
required: false
default: 'r3d'
type: string
fake_build: fake_build:
description: 'Fake build' description: 'Fake build'
required: true required: true
@@ -18,7 +31,10 @@ on:
type: string type: string
env: env:
FAKE_BUILD: ${{ github.event.inputs.fake_build }} TEST_BUILD: ${{ github.event.inputs.test_build == 'true' }}
TARGET_NAME: ${{ github.event.inputs.target_name }}
FAKE_BUILD: ${{ github.event.inputs.fake_build == 'true' }}
TAG_SUFFIX: ${{ github.event.inputs.fake_build == 'true' && '-fake' || github.event.inputs.test_build == 'true' && '-test' || '' }}
REPO_URL: https://github.com/openwrt-xiaomi/openwrt REPO_URL: https://github.com/openwrt-xiaomi/openwrt
REPO_LNK: openwrt-xiaomi/openwrt REPO_LNK: openwrt-xiaomi/openwrt
REPO_BRANCH: xq-25.12 REPO_BRANCH: xq-25.12
@@ -45,6 +61,9 @@ jobs:
fw_date: ${{ steps.gh.outputs.fw_date }} fw_date: ${{ steps.gh.outputs.fw_date }}
fw_ver: ${{ steps.gh.outputs.fw_ver }} fw_ver: ${{ steps.gh.outputs.fw_ver }}
is_active: ${{ steps.activity.outputs.is_active }} is_active: ${{ steps.activity.outputs.is_active }}
test_build: ${{ env.TEST_BUILD }}
target_name: ${{ env.TARGET_NAME }}
fake_build: ${{ env.FAKE_BUILD }}
steps: steps:
- name: Get repo data via GH API - name: Get repo data via GH API
id: gh id: gh
@@ -124,6 +143,12 @@ jobs:
- tuf_ax4200 - tuf_ax4200
- tuf_ax6000 - tuf_ax6000
- zen-bt8 - zen-bt8
isTest:
- ${{ needs.check.outputs.test_build == 'true' }}
exclude:
- { isTest: true }
include:
- target: ${{ github.event.inputs.target_name }}
steps: steps:
- name: Initialization environment - name: Initialization environment
env: env:
@@ -193,7 +218,13 @@ jobs:
exit 41 exit 41
fi fi
# run build # run build
[ "$FAKE_BUILD" != "true" ] && make -j $MAKE_JOBS download world if [ "$FAKE_BUILD" != "true" ]; then
if [ "$TEST_BUILD" != "true" ]; then
make -j $MAKE_JOBS download world
else
make V=sc download world
fi
fi
# process results # process results
FILE_DATE=$(date --utc +'%y%m%d') FILE_DATE=$(date --utc +'%y%m%d')
OUT_DIR=$BUILD_ROOT/bin/targets/$G_BOARD_NAME/$G_SUBTARGET_NAME OUT_DIR=$BUILD_ROOT/bin/targets/$G_BOARD_NAME/$G_SUBTARGET_NAME
@@ -291,8 +322,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ needs.check.outputs.tag }} TAG: ${{ needs.check.outputs.tag }}
with: with:
prerelease: false prerelease: ${{ env.TEST_BUILD == 'true' || env.FAKE_BUILD == 'true' }}
tag_name: ${{ needs.check.outputs.tag }} tag_name: ${{ needs.check.outputs.tag }}${{ env.TAG_SUFFIX }}
name: '${{ needs.check.outputs.tag }}' name: '${{ needs.check.outputs.tag }}'
body: | body: |
OpenWrt ${{ needs.check.outputs.fw_ver }} [${{ needs.check.outputs.fw_date }}] OpenWrt ${{ needs.check.outputs.fw_ver }} [${{ needs.check.outputs.fw_date }}]