refactor: upstream sync strategy with dynamic GENERAL.txt

This commit is contained in:
lingyuzeng
2026-03-01 14:03:58 +08:00
parent 6ee3e2f832
commit a54452915d
9 changed files with 213 additions and 52 deletions

View File

@@ -4,7 +4,10 @@ when:
variables:
WRT_REPO: "https://github.com/VIKINGYFY/immortalwrt.git"
WRT_BRANCH: "main" # IPQ60XX 用 main
WRT_BRANCH: "main"
# Optional: Pin GENERAL.txt to a specific commit for reproducible builds
# Leave empty or set to 'main' to always use latest
# UPSTREAM_GENERAL_REF: ""
steps:
- name: init-env
@@ -16,6 +19,12 @@ steps:
- apt-get install -y --no-install-recommends ca-certificates curl git rsync dos2unix jq
- bash -c 'bash <(curl -fsSL https://build-scripts.immortalwrt.org/init_build_environment.sh)'
- name: sync-configs
image: ubuntu:24.04
commands:
- chmod +x ${CI_WORKSPACE}/Scripts/sync_upstream_config.sh
- ${CI_WORKSPACE}/Scripts/sync_upstream_config.sh
- name: build-ipq60xx-wifi-yes
image: ubuntu:24.04
commands:
@@ -23,16 +32,21 @@ steps:
- cd wrt-yes
- ./scripts/feeds update -a
- ./scripts/feeds install -a
- cd package
- dos2unix ${CI_WORKSPACE}/Scripts/*.sh || true
- chmod +x ${CI_WORKSPACE}/Scripts/*.sh
- ${CI_WORKSPACE}/Scripts/Packages.sh ${CI_WORKSPACE}/Scripts/Handles.sh
- cd ..
- cat ${CI_WORKSPACE}/Config/IPQ60XX-WIFI-YES.txt ${CI_WORKSPACE}/Config/GENERAL.txt > .config
- cat ${CI_WORKSPACE}/Config/IPQ60XX-WIFI-YES.txt \
${CI_WORKSPACE}/Config/GENERAL.upstream.txt \
${CI_WORKSPACE}/Config/GENERAL.local.txt > .config
- ${CI_WORKSPACE}/Scripts/Settings.sh
- make defconfig -j"$(nproc)"
- make download -j"$(nproc)"
- make -j"$(nproc)" || make -j1 V=s
- mkdir -p ${CI_WORKSPACE}/artifacts/ipq60xx-wifi-yes
- cp -rf bin/targets ${CI_WORKSPACE}/artifacts/ipq60xx-wifi-yes/
@@ -43,15 +57,20 @@ steps:
- cd wrt-wifi
- ./scripts/feeds update -a
- ./scripts/feeds install -a
- cd package
- dos2unix ${CI_WORKSPACE}/Scripts/*.sh || true
- chmod +x ${CI_WORKSPACE}/Scripts/*.sh
- ${CI_WORKSPACE}/Scripts/Packages.sh ${CI_WORKSPACE}/Scripts/Handles.sh
- cd ..
- cat ${CI_WORKSPACE}/Config/IPQ60XX-WIFI.txt ${CI_WORKSPACE}/Config/GENERAL.txt > .config
- cat ${CI_WORKSPACE}/Config/IPQ60XX-WIFI.txt \
${CI_WORKSPACE}/Config/GENERAL.upstream.txt \
${CI_WORKSPACE}/Config/GENERAL.local.txt > .config
- ${CI_WORKSPACE}/Scripts/Settings.sh
- make defconfig -j"$(nproc)"
- make download -j"$(nproc)"
- make -j"$(nproc)" || make -j1 V=s
- mkdir -p ${CI_WORKSPACE}/artifacts/ipq60xx-wifi
- cp -rf bin/targets ${CI_WORKSPACE}/artifacts/ipq60xx-wifi/