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:
workflow_dispatch:
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:
description: 'Fake build'
required: true
@@ -18,7 +31,10 @@ on:
type: string
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_LNK: openwrt-xiaomi/openwrt
REPO_BRANCH: xq-25.12
@@ -45,6 +61,9 @@ jobs:
fw_date: ${{ steps.gh.outputs.fw_date }}
fw_ver: ${{ steps.gh.outputs.fw_ver }}
is_active: ${{ steps.activity.outputs.is_active }}
test_build: ${{ env.TEST_BUILD }}
target_name: ${{ env.TARGET_NAME }}
fake_build: ${{ env.FAKE_BUILD }}
steps:
- name: Get repo data via GH API
id: gh
@@ -124,6 +143,12 @@ jobs:
- tuf_ax4200
- tuf_ax6000
- zen-bt8
isTest:
- ${{ needs.check.outputs.test_build == 'true' }}
exclude:
- { isTest: true }
include:
- target: ${{ github.event.inputs.target_name }}
steps:
- name: Initialization environment
env:
@@ -193,7 +218,13 @@ jobs:
exit 41
fi
# 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
FILE_DATE=$(date --utc +'%y%m%d')
OUT_DIR=$BUILD_ROOT/bin/targets/$G_BOARD_NAME/$G_SUBTARGET_NAME
@@ -291,8 +322,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ needs.check.outputs.tag }}
with:
prerelease: false
tag_name: ${{ needs.check.outputs.tag }}
prerelease: ${{ env.TEST_BUILD == 'true' || env.FAKE_BUILD == 'true' }}
tag_name: ${{ needs.check.outputs.tag }}${{ env.TAG_SUFFIX }}
name: '${{ needs.check.outputs.tag }}'
body: |
OpenWrt ${{ needs.check.outputs.fw_ver }} [${{ needs.check.outputs.fw_date }}]