This repository has been archived by the owner on Dec 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
340 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
name: IPQ60XX-24.10-6.12-WIFI | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 19 * * * | ||
|
||
env: | ||
REPO_URL: https://github.com/LiBwrt/openwrt-6.x.git | ||
REPO_BRANCH: 24.10-6.12 | ||
CONFIG_FILE: configs/ipq60xx-6.12-wifi.config | ||
DIY_SCRIPT: diy-script.sh | ||
CLASH_KERNEL: amd64 | ||
CACHE_TOOLCHAIN: true | ||
UPLOAD_BIN_DIR: false | ||
FIRMWARE_RELEASE: true | ||
FIRMWARE_TAG: IPQ60XX-24.10-6.12-WIFI | ||
TZ: Asia/Shanghai | ||
|
||
jobs: | ||
Build: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Check Server Performance(检查服务器性能) | ||
run: | | ||
echo "警告⚠" | ||
echo "分配的服务器性能有限,若选择的插件过多,务必注意CPU性能!" | ||
echo -e "已知CPU型号(降序):7763,8370C,8272CL,8171M,E5-2673 \n" | ||
echo "--------------------------CPU信息--------------------------" | ||
echo "CPU物理数量:$(cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l)" | ||
echo -e "CPU核心信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n" | ||
echo "--------------------------内存信息--------------------------" | ||
echo "已安装内存详细信息:" | ||
echo -e "$(sudo lshw -short -C memory | grep GiB) \n" | ||
echo "--------------------------硬盘信息--------------------------" | ||
echo "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l)" && df -hT | ||
- name: Initialization Environment(初始化环境) | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
docker rmi $(docker images -q) | ||
sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android $AGENT_TOOLSDIRECTORY | ||
sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true | ||
sudo -E apt-get -y update | ||
sudo -E apt-get -y install $(curl -fsSL is.gd/depends_ubuntu_2204) | ||
sudo -E systemctl daemon-reload | ||
sudo -E apt-get -y autoremove --purge | ||
sudo -E apt-get -y clean | ||
sudo timedatectl set-timezone "$TZ" | ||
- name: Combine Disks(合并磁盘) | ||
uses: easimon/maximize-build-space@master | ||
with: | ||
swap-size-mb: 1024 | ||
temp-reserve-mb: 100 | ||
root-reserve-mb: 1024 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@main | ||
|
||
- name: Clone Source Code(克隆源代码) | ||
run: | | ||
df -hT $GITHUB_WORKSPACE | ||
git clone --depth 1 -b $REPO_BRANCH $REPO_URL openwrt | ||
cd openwrt | ||
echo "OPENWRT_PATH=$PWD" >> $GITHUB_ENV | ||
VERSION_INFO=$(git show -s --date=short --format="作者: %an<br/>时间: %cd<br/>内容: %s<br/>hash: %H") | ||
echo "VERSION_INFO=$VERSION_INFO" >> $GITHUB_ENV | ||
- name: Generate Variables(生成变量) | ||
run: | | ||
cp $CONFIG_FILE $OPENWRT_PATH/.config | ||
cd $OPENWRT_PATH | ||
make defconfig > /dev/null 2>&1 | ||
SOURCE_REPO="$(echo $REPO_URL | awk -F '/' '{print $(NF)}')" | ||
echo "SOURCE_REPO=$SOURCE_REPO" >> $GITHUB_ENV | ||
DEVICE_TARGET=$(cat .config | grep CONFIG_TARGET_BOARD | awk -F '"' '{print $2}') | ||
echo "DEVICE_TARGET=$DEVICE_TARGET" >> $GITHUB_ENV | ||
DEVICE_SUBTARGET=$(cat .config | grep CONFIG_TARGET_SUBTARGET | awk -F '"' '{print $2}') | ||
echo "DEVICE_SUBTARGET=$DEVICE_SUBTARGET" >> $GITHUB_ENV | ||
- name: Cache Toolchain(缓存工具链) | ||
if: env.CACHE_TOOLCHAIN == 'true' | ||
uses: HiGarfield/cachewrtbuild@main | ||
with: | ||
ccache: false | ||
mixkey: ${{ env.SOURCE_REPO }}-${{ env.REPO_BRANCH }}-${{ env.DEVICE_TARGET }}-${{ env.DEVICE_SUBTARGET }} | ||
prefix: ${{ env.OPENWRT_PATH }} | ||
|
||
- name: Install Feeds(安装feeds) | ||
run: | | ||
cd $OPENWRT_PATH | ||
./scripts/feeds update -a | ||
./scripts/feeds install -a | ||
- name: Load Custom Configuration(加载自定义配置) | ||
run: | | ||
[ -e files ] && mv files $OPENWRT_PATH/files | ||
[ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRT_PATH/.config | ||
- name: Download DL Package(下载DL软件包) | ||
run: | | ||
cd $OPENWRT_PATH | ||
make defconfig | ||
make download -j8 | ||
find dl -size -1024c -exec ls -l {} \; | ||
find dl -size -1024c -exec rm -f {} \; | ||
- name: Compile Firmware(开始编译固件) | ||
id: compile | ||
run: | | ||
cd $OPENWRT_PATH | ||
echo -e "$(nproc) thread compile" | ||
make -j$(nproc) || make -j1 || make -j1 V=s | ||
echo "status=success" >> $GITHUB_OUTPUT | ||
echo "DATE=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV | ||
echo "FILE_DATE=$(date +"%Y.%m.%d")" >> $GITHUB_ENV | ||
- name: Check Space Usage(检查空间使用情况) | ||
if: (!cancelled()) | ||
run: df -hT | ||
|
||
- name: Upload Bin Directory(上传固件) | ||
if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: ${{ env.SOURCE_REPO }}-bin-${{ env.DEVICE_TARGET }}-${{ env.DEVICE_SUBTARGET }}-${{ env.FILE_DATE }} | ||
path: ${{ env.OPENWRT_PATH }}/bin | ||
|
||
- name: Organize Files(整理文件) | ||
if: steps.compile.outputs.status == 'success' | ||
run: | | ||
cd $OPENWRT_PATH/bin/targets/*/* | ||
cat sha256sums | ||
cp $OPENWRT_PATH/.config build.config | ||
mv -f $OPENWRT_PATH/bin/packages/*/*/*.ipk packages | ||
tar -zcf Packages.tar.gz packages | ||
rm -rf packages feeds.buildinfo version.buildinfo | ||
echo "FIRMWARE_PATH=$PWD" >> $GITHUB_ENV | ||
- name: Upload Firmware To Artifact(将固件上传到Artifact) | ||
if: steps.compile.outputs.status == 'success' && env.FIRMWARE_RELEASE != 'true' | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: ${{ env.SOURCE_REPO }}-firmware-${{ env.DEVICE_TARGET }}-${{ env.DEVICE_SUBTARGET }}-${{ env.FILE_DATE }} | ||
path: ${{ env.FIRMWARE_PATH }} | ||
|
||
- name: Upload Firmware To Release(发布固件) | ||
if: steps.compile.outputs.status == 'success' && env.FIRMWARE_RELEASE == 'true' | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
name: R${{ env.DATE }} for ${{ env.FIRMWARE_TAG }} | ||
allowUpdates: true | ||
tag: ${{ env.FIRMWARE_TAG }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts: ${{ env.FIRMWARE_PATH }}/* | ||
body: | | ||
**This is OpenWrt Firmware for ${{ env.FIRMWARE_TAG }}** | ||
### 📒 固件信息24.10(WIFI) | ||
- 带WIFI带有线NSS的6.12内核固件 | ||
- 💻 这是 ${{ env.FIRMWARE_TAG }} 平台使用的 OpenWrt 固件 | ||
- ⚽ 固件源码: ${{ env.REPO_URL }} | ||
- 💝 源码分支: ${{ env.REPO_BRANCH }} | ||
- 🌐 默认地址: 192.168.1.1 | ||
- 🔑 默认密码: password | ||
### 🧊 固件版本 | ||
- 固件编译前最后一次➦[主源码](${{ env.REPO_URL }})更新记录 | ||
- ${{ env.VERSION_INFO }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
name: IPQ60XX-24.10-6.12 | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 19 * * * | ||
|
||
env: | ||
REPO_URL: https://github.com/LiBwrt/openwrt-6.x.git | ||
REPO_BRANCH: 24.10-6.12 | ||
CONFIG_FILE: configs/ipq60xx-6.12-nowifi.config | ||
DIY_SCRIPT: diy-script.sh | ||
CLASH_KERNEL: amd64 | ||
CACHE_TOOLCHAIN: true | ||
UPLOAD_BIN_DIR: false | ||
FIRMWARE_RELEASE: true | ||
FIRMWARE_TAG: IPQ60XX-24.10-6.12 | ||
TZ: Asia/Shanghai | ||
|
||
jobs: | ||
Build: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Check Server Performance(检查服务器性能) | ||
run: | | ||
echo "警告⚠" | ||
echo "分配的服务器性能有限,若选择的插件过多,务必注意CPU性能!" | ||
echo -e "已知CPU型号(降序):7763,8370C,8272CL,8171M,E5-2673 \n" | ||
echo "--------------------------CPU信息--------------------------" | ||
echo "CPU物理数量:$(cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l)" | ||
echo -e "CPU核心信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n" | ||
echo "--------------------------内存信息--------------------------" | ||
echo "已安装内存详细信息:" | ||
echo -e "$(sudo lshw -short -C memory | grep GiB) \n" | ||
echo "--------------------------硬盘信息--------------------------" | ||
echo "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l)" && df -hT | ||
- name: Initialization Environment(初始化环境) | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
docker rmi $(docker images -q) | ||
sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android $AGENT_TOOLSDIRECTORY | ||
sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true | ||
sudo -E apt-get -y update | ||
sudo -E apt-get -y install $(curl -fsSL is.gd/depends_ubuntu_2204) | ||
sudo -E systemctl daemon-reload | ||
sudo -E apt-get -y autoremove --purge | ||
sudo -E apt-get -y clean | ||
sudo timedatectl set-timezone "$TZ" | ||
- name: Combine Disks(合并磁盘) | ||
uses: easimon/maximize-build-space@master | ||
with: | ||
swap-size-mb: 1024 | ||
temp-reserve-mb: 100 | ||
root-reserve-mb: 1024 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@main | ||
|
||
- name: Clone Source Code(克隆源代码) | ||
run: | | ||
df -hT $GITHUB_WORKSPACE | ||
git clone --depth 1 -b $REPO_BRANCH $REPO_URL openwrt | ||
cd openwrt | ||
echo "OPENWRT_PATH=$PWD" >> $GITHUB_ENV | ||
VERSION_INFO=$(git show -s --date=short --format="作者: %an<br/>时间: %cd<br/>内容: %s<br/>hash: %H") | ||
echo "VERSION_INFO=$VERSION_INFO" >> $GITHUB_ENV | ||
- name: Generate Variables(生成变量) | ||
run: | | ||
cp $CONFIG_FILE $OPENWRT_PATH/.config | ||
cd $OPENWRT_PATH | ||
make defconfig > /dev/null 2>&1 | ||
SOURCE_REPO="$(echo $REPO_URL | awk -F '/' '{print $(NF)}')" | ||
echo "SOURCE_REPO=$SOURCE_REPO" >> $GITHUB_ENV | ||
DEVICE_TARGET=$(cat .config | grep CONFIG_TARGET_BOARD | awk -F '"' '{print $2}') | ||
echo "DEVICE_TARGET=$DEVICE_TARGET" >> $GITHUB_ENV | ||
DEVICE_SUBTARGET=$(cat .config | grep CONFIG_TARGET_SUBTARGET | awk -F '"' '{print $2}') | ||
echo "DEVICE_SUBTARGET=$DEVICE_SUBTARGET" >> $GITHUB_ENV | ||
- name: Cache Toolchain(缓存工具链) | ||
if: env.CACHE_TOOLCHAIN == 'true' | ||
uses: HiGarfield/cachewrtbuild@main | ||
with: | ||
ccache: false | ||
mixkey: ${{ env.SOURCE_REPO }}-${{ env.REPO_BRANCH }}-${{ env.DEVICE_TARGET }}-${{ env.DEVICE_SUBTARGET }} | ||
prefix: ${{ env.OPENWRT_PATH }} | ||
|
||
- name: Install Feeds(安装feeds) | ||
run: | | ||
cd $OPENWRT_PATH | ||
./scripts/feeds update -a | ||
./scripts/feeds install -a | ||
- name: Load Custom Configuration(加载自定义配置) | ||
run: | | ||
[ -e files ] && mv files $OPENWRT_PATH/files | ||
[ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRT_PATH/.config | ||
- name: Download DL Package(下载DL软件包) | ||
run: | | ||
cd $OPENWRT_PATH | ||
make defconfig | ||
make download -j8 | ||
find dl -size -1024c -exec ls -l {} \; | ||
find dl -size -1024c -exec rm -f {} \; | ||
- name: Compile Firmware(开始编译固件) | ||
id: compile | ||
run: | | ||
cd $OPENWRT_PATH | ||
echo -e "$(nproc) thread compile" | ||
make -j$(nproc) || make -j1 || make -j1 V=s | ||
echo "status=success" >> $GITHUB_OUTPUT | ||
echo "DATE=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV | ||
echo "FILE_DATE=$(date +"%Y.%m.%d")" >> $GITHUB_ENV | ||
- name: Check Space Usage(检查空间使用情况) | ||
if: (!cancelled()) | ||
run: df -hT | ||
|
||
- name: Upload Bin Directory(上传固件) | ||
if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: ${{ env.SOURCE_REPO }}-bin-${{ env.DEVICE_TARGET }}-${{ env.DEVICE_SUBTARGET }}-${{ env.FILE_DATE }} | ||
path: ${{ env.OPENWRT_PATH }}/bin | ||
|
||
- name: Organize Files(整理文件) | ||
if: steps.compile.outputs.status == 'success' | ||
run: | | ||
cd $OPENWRT_PATH/bin/targets/*/* | ||
cat sha256sums | ||
cp $OPENWRT_PATH/.config build.config | ||
mv -f $OPENWRT_PATH/bin/packages/*/*/*.ipk packages | ||
tar -zcf Packages.tar.gz packages | ||
rm -rf packages feeds.buildinfo version.buildinfo | ||
echo "FIRMWARE_PATH=$PWD" >> $GITHUB_ENV | ||
- name: Upload Firmware To Artifact(将固件上传到Artifact) | ||
if: steps.compile.outputs.status == 'success' && env.FIRMWARE_RELEASE != 'true' | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: ${{ env.SOURCE_REPO }}-firmware-${{ env.DEVICE_TARGET }}-${{ env.DEVICE_SUBTARGET }}-${{ env.FILE_DATE }} | ||
path: ${{ env.FIRMWARE_PATH }} | ||
|
||
- name: Upload Firmware To Release(发布固件) | ||
if: steps.compile.outputs.status == 'success' && env.FIRMWARE_RELEASE == 'true' | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
name: R${{ env.DATE }} for ${{ env.FIRMWARE_TAG }} | ||
allowUpdates: true | ||
tag: ${{ env.FIRMWARE_TAG }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts: ${{ env.FIRMWARE_PATH }}/* | ||
body: | | ||
**This is OpenWrt Firmware for ${{ env.FIRMWARE_TAG }}** | ||
### 📒 固件信息24.10(无WIFI) | ||
- 无WIFI带有线NSS的6.12内核固件 | ||
- 💻 这是 ${{ env.FIRMWARE_TAG }} 平台使用的 OpenWrt 固件 | ||
- ⚽ 固件源码: ${{ env.REPO_URL }} | ||
- 💝 源码分支: ${{ env.REPO_BRANCH }} | ||
- 🌐 默认地址: 192.168.1.1 | ||
- 🔑 默认密码: password | ||
### 🧊 固件版本 | ||
- 固件编译前最后一次➦[主源码](${{ env.REPO_URL }})更新记录 | ||
- ${{ env.VERSION_INFO }} |