mirror of
https://github.com/openwrt-xiaomi/builder.git
synced 2026-01-02 20:13:37 +05:00
build: Sync code with v25 branch
This commit is contained in:
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
@@ -11,14 +11,6 @@ on:
|
||||
options:
|
||||
- true
|
||||
- false
|
||||
first_kernel_compile:
|
||||
description: 'First kernel compile'
|
||||
required: true
|
||||
default: 'true'
|
||||
type: choice
|
||||
options:
|
||||
- true
|
||||
- false
|
||||
test_build:
|
||||
description: 'Test build (only spec target) '
|
||||
required: true
|
||||
@@ -52,7 +44,6 @@ on:
|
||||
type: string
|
||||
|
||||
env:
|
||||
FIRST_KERNEL_COMPILE: ${{ github.event.inputs.first_kernel_compile == 'true' }}
|
||||
TEST_BUILD: ${{ github.event.inputs.test_build == 'true' }}
|
||||
FAKE_BUILD: ${{ github.event.inputs.fake_build == 'true' }}
|
||||
TAG_SUFFIX: ${{ github.event.inputs.fake_build == 'true' && '-fake' || github.event.inputs.test_build == 'true' && '-test' || '' }}
|
||||
@@ -210,15 +201,6 @@ jobs:
|
||||
chmod +x *.sh
|
||||
wget https://github.com/fantastic-packages/packages/raw/refs/heads/24.10/keys/usign/53FF2B6672243D28.pub
|
||||
|
||||
- name: Cache downloads (dl)
|
||||
if: false
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: dl
|
||||
key: dl-${{ hashFiles('feeds.conf.default') }}
|
||||
restore-keys: |
|
||||
dl-
|
||||
|
||||
- name: Update OpenWrt packages
|
||||
id: update
|
||||
env:
|
||||
@@ -231,6 +213,8 @@ jobs:
|
||||
if [ "$USE_CACHE" = "true" ]; then
|
||||
rm -rf staging_dir/
|
||||
mkdir -p staging_dir/host
|
||||
rm -rf build_dir/
|
||||
mkdir -p build_dir/host
|
||||
fi
|
||||
|
||||
- name: Restore cache for host tools
|
||||
@@ -238,9 +222,10 @@ jobs:
|
||||
if: github.event.inputs.use_cache == 'true'
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: host-tools-${{ runner.os }}-${{ needs.check.outputs.fw_ver }}-${{ hashFiles('tools/**') }}
|
||||
key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }}
|
||||
path: |
|
||||
staging_dir/host
|
||||
build_dir/host
|
||||
|
||||
- name: Configure
|
||||
id: configure
|
||||
@@ -313,21 +298,23 @@ jobs:
|
||||
key: ${{ steps.tools_cache_restore.outputs.cache-primary-key }}
|
||||
path: |
|
||||
staging_dir/host
|
||||
build_dir/host
|
||||
|
||||
- name: Save cache for host tools (use_cache = false)
|
||||
id: tools_cache_save_2
|
||||
if: steps.tools.outputs.status == 'success' && github.event.inputs.use_cache != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: host-tools-${{ runner.os }}-${{ needs.check.outputs.fw_ver }}-${{ hashFiles('tools/**') }}
|
||||
key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }}
|
||||
path: |
|
||||
staging_dir/host
|
||||
build_dir/host
|
||||
|
||||
- name: Kernel compile
|
||||
- name: Kernel compile and install
|
||||
id: kernel
|
||||
if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.first_kernel_compile == 'true' && github.event.inputs.fake_build != 'true' }}
|
||||
if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
||||
run: |
|
||||
make target/linux/compile -j$(nproc)
|
||||
make target/linux/install -j$(nproc)
|
||||
echo "status=success" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Monitor memory 2
|
||||
@@ -342,7 +329,7 @@ jobs:
|
||||
|
||||
- name: Build the firmware image
|
||||
id: compile
|
||||
if: steps.tools.outputs.status == 'success'
|
||||
if: steps.tools.outputs.status == 'success' && steps.kernel.outputs.status == 'success'
|
||||
env:
|
||||
TARGET: ${{ matrix.target }}
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user