3 Commits

Author SHA1 Message Date
remittor
acff39477b build: Fix save and restore cache for host tools 2026-01-01 22:28:00 +03:00
remittor
e57e548f61 xmake: Fix install fantastic packages keys and src 2026-01-01 21:12:16 +03:00
remittor
eb978ba58e build: Fix kernel step 2026-01-01 20:19:22 +03:00
2 changed files with 32 additions and 43 deletions

View File

@@ -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' || '' }}
@@ -208,16 +199,8 @@ jobs:
- name: Init builder
run: |
chmod +x *.sh
wget https://github.com/fantastic-packages/packages/raw/refs/heads/25.12/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-
#wget https://github.com/fantastic-packages/packages/raw/refs/heads/master/keys/apksign/20241123170031.pub
wget https://fantastic-packages.github.io/releases/25.12/20241123170031.pub
- name: Update OpenWrt packages
id: update
@@ -231,6 +214,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 +223,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 +299,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 +330,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: |

View File

@@ -282,28 +282,29 @@ function build_target {
echo "Patch '$(basename $incfn)' result: OK"
done
OPKG_DIR=$XDIR/files/etc/opkg
if [ -d $OPKG_DIR ]; then
rm -rf $OPKG_DIR
APK_DIR=$XDIR/files/etc/apk
if [ -d $APK_DIR ]; then
rm -rf $APK_DIR
fi
FANT_PKG_KEY=$XDIR/53FF2B6672243D28.pub
FANT_PKG_KEY=$XDIR/20241123170031.pub
if [ -f $FANT_PKG_KEY ]; then
OPKG_SRC_DIR=$XDIR/package/system/opkg/files
OPKG_KEYS_DIR=$OPKG_DIR/keys
mkdir -p $OPKG_KEYS_DIR
cp $FANT_PKG_KEY $OPKG_KEYS_DIR/53ff2b6672243d28
OPKG_CFEED_FN=$OPKG_DIR/customfeeds.conf
cp $OPKG_SRC_DIR/customfeeds.conf $OPKG_CFEED_FN
PKG_LINK="https://fantastic-packages.github.io/packages/releases/<<VER>>/packages/<<ARCH>>"
echo "" >> $OPKG_CFEED_FN
echo "src/gz fantastic_packages_luci $PKG_LINK/luci" >> $OPKG_CFEED_FN
echo "src/gz fantastic_packages_packages $PKG_LINK/packages" >> $OPKG_CFEED_FN
echo "src/gz fantastic_packages_special $PKG_LINK/special" >> $OPKG_CFEED_FN
APK_SRC_DIR=$XDIR/package/system/apk/files
APK_KEYS_DIR=$APK_DIR/keys
mkdir -p $APK_KEYS_DIR
cp $FANT_PKG_KEY $APK_KEYS_DIR/fantastic-packages-20241123170031.pem
APK_CFEED_FN=$APK_DIR/repositories.d/customfeeds.list
mkdir -p $APK_DIR/repositories.d
cp $APK_SRC_DIR/customfeeds.list $APK_CFEED_FN
PKG_LINK="https://fantastic-packages.github.io/releases/<<VER>>/packages/<<ARCH>>"
echo "" >> $APK_CFEED_FN
echo "$PKG_LINK/luci/packages.adb" >> $APK_CFEED_FN
echo "$PKG_LINK/packages/packages.adb" >> $APK_CFEED_FN
echo "$PKG_LINK/special/packages.adb" >> $APK_CFEED_FN
TARGET_ARCH_PACKAGES=$( get_cfg_opt_value $CFG TARGET_ARCH_PACKAGES )
[ -z "$TARGET_ARCH_PACKAGES" ] && die "Cannot find TARGET ARCH"
sed -i "s/<<VER>>/25.12/g" $OPKG_CFEED_FN
sed -i "s/<<ARCH>>/$TARGET_ARCH_PACKAGES/g" $OPKG_CFEED_FN
logmsg "Added support of Fantastic packages [https://fantastic-packages.github.io/packages]"
sed -i "s/<<VER>>/25.12/g" $APK_CFEED_FN
sed -i "s/<<ARCH>>/$TARGET_ARCH_PACKAGES/g" $APK_CFEED_FN
logmsg "Added support of Fantastic packages [https://fantastic-packages.github.io/releases]"
fi
SYSCTLCONF_FN=$XDIR/files/etc/sysctl.conf