mirror of
https://github.com/openwrt-xiaomi/builder.git
synced 2026-01-02 03:53:36 +05:00
build: Sync code with v25 branch
This commit is contained in:
77
.github/workflows/build.yml
vendored
77
.github/workflows/build.yml
vendored
@@ -217,6 +217,16 @@ jobs:
|
|||||||
./xupdate.sh -f
|
./xupdate.sh -f
|
||||||
mkdir -p logs
|
mkdir -p logs
|
||||||
echo "status=success" >> $GITHUB_OUTPUT
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
|
rm -rf staging_dir/
|
||||||
|
mkdir -p staging_dir/host
|
||||||
|
|
||||||
|
- name: Restore cache for host tools
|
||||||
|
id: tools_cache_restore
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
with:
|
||||||
|
key: host-tools-${{ runner.os }}-${{ env.FW_VER }}-${{ hashFiles('tools/**') }}
|
||||||
|
path: |
|
||||||
|
staging_dir/host
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
id: configure
|
id: configure
|
||||||
@@ -256,33 +266,17 @@ jobs:
|
|||||||
cat .config
|
cat .config
|
||||||
echo "========================"
|
echo "========================"
|
||||||
|
|
||||||
- name: Prepare for use cache of tools and toolchain
|
|
||||||
run: |
|
|
||||||
echo "G_TARGET_ARCH = $G_TARGET_ARCH"
|
|
||||||
rm -rf staging_dir/
|
|
||||||
rm -rf build_dir/
|
|
||||||
|
|
||||||
- name: Cache host tools
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: staging_dir/host
|
|
||||||
key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }}
|
|
||||||
restore-keys: |
|
|
||||||
host-tools-${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Cache toolchain
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: staging_dir/toolchain-*
|
|
||||||
key: toolchain-${{ env.G_TARGET_ARCH }}-${{ hashFiles('toolchain/**') }}
|
|
||||||
restore-keys: |
|
|
||||||
toolchain-${{ env.G_TARGET_ARCH }}-
|
|
||||||
|
|
||||||
- name: Monitor memory
|
- name: Monitor memory
|
||||||
run: |
|
run: |
|
||||||
free -h
|
echo "CPU cores = $(nproc)"
|
||||||
cat /proc/meminfo
|
echo "Memory and swap:"
|
||||||
|
sudo free -h
|
||||||
|
echo
|
||||||
|
sudo swapon --show
|
||||||
|
echo
|
||||||
|
echo "Available storage:"
|
||||||
|
sudo df -h
|
||||||
|
|
||||||
- name: Build tools and toolchain
|
- name: Build tools and toolchain
|
||||||
id: tools
|
id: tools
|
||||||
if: ${{ steps.configure.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
if: ${{ steps.configure.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
||||||
@@ -291,18 +285,13 @@ jobs:
|
|||||||
echo "status=success" >> $GITHUB_OUTPUT
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Save cache for host tools
|
- name: Save cache for host tools
|
||||||
if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
id: tools_cache_save
|
||||||
uses: actions/cache@v4
|
if: steps.tools.outputs.status == 'success' && steps.tools_cache_restore.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
path: staging_dir/host
|
key: ${{ steps.tools_cache_restore.outputs.cache-primary-key }}
|
||||||
key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }}
|
path: |
|
||||||
|
staging_dir/host
|
||||||
- name: Save cache for toolchain
|
|
||||||
if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: staging_dir/toolchain-*
|
|
||||||
key: toolchain-${{ env.G_TARGET_ARCH }}-${{ hashFiles('toolchain/**') }}
|
|
||||||
|
|
||||||
- name: Kernel compile
|
- name: Kernel compile
|
||||||
id: kernel
|
id: kernel
|
||||||
@@ -313,8 +302,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Monitor memory 2
|
- name: Monitor memory 2
|
||||||
run: |
|
run: |
|
||||||
free -h
|
echo "Memory and swap:"
|
||||||
cat /proc/meminfo
|
sudo free -h
|
||||||
|
echo
|
||||||
|
sudo swapon --show
|
||||||
|
echo
|
||||||
|
echo "Available storage:"
|
||||||
|
sudo df -h
|
||||||
|
|
||||||
- name: Build the firmware image
|
- name: Build the firmware image
|
||||||
id: compile
|
id: compile
|
||||||
@@ -371,6 +365,13 @@ jobs:
|
|||||||
- name: Check space usage
|
- name: Check space usage
|
||||||
run: df -hT
|
run: df -hT
|
||||||
|
|
||||||
|
- name: Check OOM error
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
dmesg | grep -i -E 'oom|killed process' || true
|
||||||
|
echo "================== Memory ================="
|
||||||
|
free -h
|
||||||
|
|
||||||
- name: Compress build logs
|
- name: Compress build logs
|
||||||
if: always()
|
if: always()
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user