From 2f177ace71b2151a49ab1dcadd0483ea30715677 Mon Sep 17 00:00:00 2001 From: xopenwrt Date: Mon, 29 Jun 2026 22:09:33 +0800 Subject: [PATCH] normalize workflow parallelism --- .github/workflows/X-x86_64_X.yml | 8 ++++++-- .github/workflows/X-x86_64_Y.yml | 8 ++++++-- .github/workflows/X-x86_64_Z.yml | 8 ++++++-- AI_CHANGELOG_WORKFLOW_PARALLELISM.md | 12 ++++++++++++ 4 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 AI_CHANGELOG_WORKFLOW_PARALLELISM.md diff --git a/.github/workflows/X-x86_64_X.yml b/.github/workflows/X-x86_64_X.yml index d7880ff..198c005 100644 --- a/.github/workflows/X-x86_64_X.yml +++ b/.github/workflows/X-x86_64_X.yml @@ -64,6 +64,10 @@ env: DELETE_OLD_WORKFLOW: true # Cache 加速编译 CACHE_ACCELERATE: true +# 下载并行数 + DOWNLOAD_JOBS: 8 +# 编译并行数 + BUILD_JOBS: 4 ### 结束 jobs: @@ -219,7 +223,7 @@ jobs: cd openwrt ./scripts/feeds install -a make defconfig - make download -j32 + make download -j${DOWNLOAD_JOBS} - name: Build OpenWrt run: | @@ -233,7 +237,7 @@ jobs: # 2024.03.03 mosdns build fail by golang 1.22 sed -i "s/CGO_ENABLED=0/CGO_ENABLED=1/g" feeds/packages/net/mosdns/Makefile set -o pipefail - if make -j4 2>&1 | tee ./build_log.log + if make -j${BUILD_JOBS} 2>&1 | tee ./build_log.log then build_status=0 else diff --git a/.github/workflows/X-x86_64_Y.yml b/.github/workflows/X-x86_64_Y.yml index d0fbc2a..b73c761 100644 --- a/.github/workflows/X-x86_64_Y.yml +++ b/.github/workflows/X-x86_64_Y.yml @@ -64,6 +64,10 @@ env: DELETE_OLD_WORKFLOW: true # Cache 加速编译 CACHE_ACCELERATE: true +# 下载并行数 + DOWNLOAD_JOBS: 8 +# 编译并行数 + BUILD_JOBS: 4 ### 结束 jobs: @@ -216,7 +220,7 @@ jobs: cd openwrt ./scripts/feeds install -a make defconfig - make download -j8 + make download -j${DOWNLOAD_JOBS} - name: Build OpenWrt run: | @@ -230,7 +234,7 @@ jobs: # 2024.03.03 mosdns build fail by golang 1.22 sed -i "s/CGO_ENABLED=0/CGO_ENABLED=1/g" feeds/packages/net/mosdns/Makefile set -o pipefail - if make -j4 2>&1 | tee ./build_log.log + if make -j${BUILD_JOBS} 2>&1 | tee ./build_log.log then build_status=0 else diff --git a/.github/workflows/X-x86_64_Z.yml b/.github/workflows/X-x86_64_Z.yml index 1acc477..d89b8b1 100644 --- a/.github/workflows/X-x86_64_Z.yml +++ b/.github/workflows/X-x86_64_Z.yml @@ -64,6 +64,10 @@ env: DELETE_OLD_WORKFLOW: true # Cache 加速编译 CACHE_ACCELERATE: true +# 下载并行数 + DOWNLOAD_JOBS: 8 +# 编译并行数 + BUILD_JOBS: 4 ### 结束 jobs: @@ -214,7 +218,7 @@ jobs: cd openwrt ./scripts/feeds install -a make defconfig - make download -j8 + make download -j${DOWNLOAD_JOBS} - name: Build OpenWrt run: | @@ -228,7 +232,7 @@ jobs: # 2024.03.03 mosdns build fail by golang 1.22 sed -i "s/CGO_ENABLED=0/CGO_ENABLED=1/g" feeds/packages/net/mosdns/Makefile set -o pipefail - if make -j4 2>&1 | tee ./build_log.log + if make -j${BUILD_JOBS} 2>&1 | tee ./build_log.log then build_status=0 else diff --git a/AI_CHANGELOG_WORKFLOW_PARALLELISM.md b/AI_CHANGELOG_WORKFLOW_PARALLELISM.md new file mode 100644 index 0000000..621e72a --- /dev/null +++ b/AI_CHANGELOG_WORKFLOW_PARALLELISM.md @@ -0,0 +1,12 @@ +# AI Modification Log: Workflow Parallelism Variables + +Date: 2026-06-29 + +## Change + +- Added `DOWNLOAD_JOBS: 8` and `BUILD_JOBS: 4` to X/Y/Z workflow env blocks. +- Replaced hard-coded `make download -j32` / `-j8` and `make -j4` with those variables. + +## Reason + +X/Y/Z had drifted download parallelism while sharing the same build logic. Central variables keep the workflows consistent and make later tuning explicit.