4 Commits

Author SHA1 Message Date
remittor
ce52956483 proxy: Delete tpws, mdig, ip2set packages 2026-01-01 17:05:28 +03:00
remittor
a1f00666d4 build: Sync code with v25 branch 2026-01-01 16:49:44 +03:00
remittor
c056d7f32a build: Fix key of cache 2026-01-01 13:37:29 +03:00
remittor
4cf85c12bf build: Sync code with v25 branch 2026-01-01 11:50:35 +03:00
2 changed files with 74 additions and 48 deletions

View File

@@ -3,6 +3,14 @@ name: build
on:
workflow_dispatch:
inputs:
use_cache:
description: 'Use cache for host tools'
required: true
default: 'false'
type: choice
options:
- true
- false
first_kernel_compile:
description: 'First kernel compile'
required: true
@@ -12,7 +20,7 @@ on:
- true
- false
test_build:
description: 'Test build'
description: 'Test build (only spec target) '
required: true
default: 'false'
type: choice
@@ -20,12 +28,12 @@ on:
- true
- false
target_name:
description: 'Target Name'
description: 'Target Name for test build'
required: false
default: 'r3d'
type: string
package_dir:
description: 'Package Dir'
description: 'Package Dir for test build'
required: false
default: ''
type: string
@@ -171,7 +179,7 @@ jobs:
sudo apt-get -qq update
#sudo apt-get -qq update && sudo apt-get -qq upgrade
sudo apt-get -qq install build-essential gawk flex rsync swig unzip zlib1g-dev file wget
sudo apt-get -qq install libc6-dev clang flex bison g++ gcc-multilib g++-multilib
sudo apt-get -qq install libc6-dev clang bison g++ gcc-multilib g++-multilib
sudo apt-get -qq install gettext git libncurses5-dev libssl-dev python3-setuptools
sudo apt-get -qq install libc6-dev pkg-config
sudo apt-get -qq autoremove --purge
@@ -213,10 +221,26 @@ jobs:
- name: Update OpenWrt packages
id: update
env:
USE_CACHE: ${{ github.event.inputs.use_cache }}
run: |
./xupdate.sh -f
mkdir -p logs
echo "status=success" >> $GITHUB_OUTPUT
echo "USE_CACHE=$USE_CACHE" >> $GITHUB_ENV
if [ "$USE_CACHE" = "true" ]; then
rm -rf staging_dir/
mkdir -p staging_dir/host
fi
- name: Restore cache for host tools
id: tools_cache_restore
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/**') }}
path: |
staging_dir/host
- name: Configure
id: configure
@@ -256,33 +280,24 @@ jobs:
cat .config
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
run: |
free -h
cat /proc/meminfo
echo "CPU cores = $(nproc)"
echo "Memory and swap:"
sudo free -h
echo
sudo swapon --show
echo
echo "Available storage:"
sudo df -h
- name: Download sources (dl)
id: download
if: ${{ steps.configure.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
run: |
make -j$(nproc) download
echo "status=success" >> $GITHUB_OUTPUT
- name: Build tools and toolchain
id: tools
if: ${{ steps.configure.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
@@ -290,19 +305,23 @@ jobs:
make toolchain/install -j$(nproc)
echo "status=success" >> $GITHUB_OUTPUT
- name: Save cache for host tools
if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
uses: actions/cache@v4
- name: Save cache for host tools (use_cache = true)
id: tools_cache_save
if: steps.tools.outputs.status == 'success' && github.event.inputs.use_cache == 'true' && steps.tools_cache_restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: staging_dir/host
key: host-tools-${{ runner.os }}-${{ hashFiles('tools/**') }}
key: ${{ steps.tools_cache_restore.outputs.cache-primary-key }}
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
- 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:
path: staging_dir/toolchain-*
key: toolchain-${{ env.G_TARGET_ARCH }}-${{ hashFiles('toolchain/**') }}
key: host-tools-${{ runner.os }}-${{ needs.check.outputs.fw_ver }}-${{ hashFiles('tools/**') }}
path: |
staging_dir/host
- name: Kernel compile
id: kernel
@@ -313,8 +332,13 @@ jobs:
- name: Monitor memory 2
run: |
free -h
cat /proc/meminfo
echo "Memory and swap:"
sudo free -h
echo
sudo swapon --show
echo
echo "Available storage:"
sudo df -h
- name: Build the firmware image
id: compile
@@ -329,9 +353,9 @@ jobs:
fi
if [ "$FAKE_BUILD" != "true" ]; then
if [ "$TEST_BUILD" != "true" ]; then
make -j$(nproc) download world
make -j$(nproc) world
else
make V=sc download world
make V=sc world
fi
fi
# process results
@@ -371,6 +395,13 @@ jobs:
- name: Check space usage
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
if: always()
env:

View File

@@ -9,12 +9,7 @@ CONFIG_PACKAGE_luci-i18n-https-dns-proxy-ru=y
CONFIG_PACKAGE_igmpproxy=y
CONFIG_PACKAGE_zapret=y
CONFIG_PACKAGE_zapret-tpws=y
CONFIG_PACKAGE_zapret-mdig=y
CONFIG_PACKAGE_zapret-ip2net=y
CONFIG_PACKAGE_luci-app-zapret=y
CONFIG_PACKAGE_zapret2=y
CONFIG_PACKAGE_zapret2-mdig=y
CONFIG_PACKAGE_zapret2-ip2net=y
CONFIG_PACKAGE_luci-app-zapret2=y