Skip to content

Commit

Permalink
update config for openwrt
Browse files Browse the repository at this point in the history
  • Loading branch information
breakings committed Apr 29, 2024
1 parent 969182b commit 1f55225
Show file tree
Hide file tree
Showing 65 changed files with 30,894 additions and 1,971 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/OpenWrt Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,27 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
docker rmi `docker images -q`
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /etc/mysql /etc/php /usr/local/lib/android /opt/ghc
sudo -E apt-get -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* adoptopenjdk* mysql* php* mongodb* dotnet* moby* snapd* || true
sudo -E apt-get -qq update
sudo -E apt-get -qq install $(curl -fsSL https://is.gd/depends_ubuntu_2204)
sudo -E apt-get -qq autoremove --purge
sudo -E apt-get -qq clean
sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android 2>/dev/null
sudo -E apt -y purge azure-cli ghc* zulu* texlive* firefox google* dotnet* powershell openjdk* mongodb* moby* || true
[[ -n "${AGENT_TOOLSDIRECTORY}" ]] && sudo rm -rf "${AGENT_TOOLSDIRECTORY}"
sudo -E apt update
sudo -E apt -y install $(curl -fsSL https://is.gd/depends_ubuntu_2204)
sudo -E apt -y install clang llvm lld
sudo -E apt -y autoremove --purge
sudo -E systemctl daemon-reload
sudo -E apt clean && sudo -E apt autoclean
sudo timedatectl set-timezone "$TZ"
sudo mkdir -p /workdir
sudo chown $USER:$GROUPS /workdir
sudo mkdir -p /mnt/workdir
sudo chown $USER:$GROUPS /mnt/workdir
echo "status=success" >> ${GITHUB_OUTPUT}
df -Th
- name: Clone source code
working-directory: /workdir
working-directory: /mnt/workdir
run: |
df -hT $PWD
git clone $REPO_URL -b $REPO_BRANCH openwrt
ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
ln -sf /mnt/workdir/openwrt $GITHUB_WORKSPACE/openwrt
cd openwrt
useVersionInfo=$(git show -s --date=short --format="Author: %an<br/>date: %cd<br/>commit: %s<br/>commit hash: %H")
echo "useVersionInfo=$useVersionInfo" >> $GITHUB_ENV
Expand Down Expand Up @@ -173,7 +177,7 @@ jobs:

- name: Create release
id: release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@main
with:
name: R${{ env.DATE }} for ${{ env.PRODUCT_NAME }}
allowUpdates: true
Expand All @@ -196,7 +200,7 @@ jobs:
keep_minimum_runs: 60

- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@v0.2.0
uses: dev-drprasad/delete-older-releases@v0.3.3
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
keep_latest: 30
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-openwrt-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ env:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id

steps:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
sudo -E apt -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true
[[ -n "${AGENT_TOOLSDIRECTORY}" ]] && sudo rm -rf "${AGENT_TOOLSDIRECTORY}"
sudo -E apt update
sudo -E apt -y install $(curl -fsSL https://is.gd/depends_ubuntu_2004)
sudo -E apt -y install $(curl -fsSL https://is.gd/depends_ubuntu_2204)
sudo -E apt -y autoremove --purge
sudo -E systemctl daemon-reload
sudo -E apt clean && sudo -E apt autoclean
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:

- name: Create release
id: release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@main
with:
name: R${{ env.DATE }} for ${{ env.PRODUCT_NAME }}
allowUpdates: true
Expand All @@ -193,7 +193,7 @@ jobs:
keep_minimum_runs: 60

- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@v0.2.0
uses: dev-drprasad/delete-older-releases@v0.3.3
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
keep_latest: 30
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-openwrt-huge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:

- name: Create release
id: release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@main
with:
name: R${{ env.DATE }} for ${{ env.PRODUCT_NAME }}
allowUpdates: true
Expand All @@ -211,7 +211,7 @@ jobs:
keep_minimum_runs: 60

- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@v0.2.0
uses: dev-drprasad/delete-older-releases@v0.3.3
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
repo:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-openwrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:

- name: Create release
id: release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@main
with:
name: R${{ env.DATE }} for ${{ env.PRODUCT_NAME }}
allowUpdates: true
Expand All @@ -210,7 +210,7 @@ jobs:
keep_minimum_runs: 60

- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@v0.2.0
uses: dev-drprasad/delete-older-releases@v0.3.3
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
repo:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/releases-big-openwrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
PACKAGE_SOC: all
WHOAMI: breakings
#KERNEL_REPO_URL: https://github.com/breakings/OpenWrt/tree/main/opt
KERNEL_VERSION_NAME: 5.15.100_6.1.18
KERNEL_VERSION_NAME: 6.1.86_6.6.27
#OPENWRT_VER: R23.5.1
KERNEL_AUTO_LATEST: true
GZIP_IMGS: .gz
Expand All @@ -95,7 +95,7 @@ jobs:

- name: Upload OpenWrt Firmware to Release
id: release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@main
if: env.PACKAGED_STATUS == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
name: R${{ env.DATE }} for ${{ env.FILE_NAME }}
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
keep_minimum_runs: 60

- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@v0.2.0
uses: dev-drprasad/delete-older-releases@v0.3.3
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
repo:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Compare Commit Hash
id: cacheHash
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .commitHash
key: HEAD-${{ steps.getHash.outputs.commitHash }}
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Trigger build
if: steps.cacheHash.outputs.cache-hit != 'true'
uses: peter-evans/repository-dispatch@v1
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ACTIONS_TRIGGER_PAT }}
event-type: Source Code Update
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/use-releases-file-to-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
PACKAGE_SOC: all
WHOAMI: breakings
#KERNEL_REPO_URL: https://github.com/breakings/OpenWrt/tree/main/opt
KERNEL_VERSION_NAME: 5.15.100_6.1.18
KERNEL_VERSION_NAME: 6.1.86_6.6.27
#OPENWRT_VER: R23.5.1
KERNEL_AUTO_LATEST: true
GZIP_IMGS: .gz
Expand All @@ -95,7 +95,7 @@ jobs:

- name: Upload OpenWrt Firmware to Release
id: release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@main
if: env.PACKAGED_STATUS == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
name: R${{ env.DATE }} for ${{ env.FILE_NAME }}
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
keep_minimum_runs: 60

- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@v0.2.0
uses: dev-drprasad/delete-older-releases@v0.3.3
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
repo:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:

- name: Create release
id: release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@main
with:
name: R${{ env.DATE }} for ${{ env.PRODUCT_NAME }}
allowUpdates: true
Expand All @@ -204,7 +204,7 @@ jobs:
keep_minimum_runs: 60

- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@v0.2.0
uses: dev-drprasad/delete-older-releases@v0.3.3
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
keep_latest: 30
Expand Down
47 changes: 32 additions & 15 deletions .github/workflows/x86_64_k6.6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ on:
- cron: 15 16 * * 6

env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_URL: https://github.com/openwrt/openwrt
REPO_BRANCH: master
FEEDS_CONF: feeds.conf.default
CONFIG_FILE: x86/lede-x86_k6.6.config
FEEDS_CONF: official.feeds.conf.default
CONFIG_FILE: x86/official-x86.config
DIY_P1_SH: diy-part1.sh
DIY_P2_SH: diy-part2.sh
DIY_P2_SH: openwrt-21.02-diy-part2.sh
UPLOAD_BIN_DIR: false
UPLOAD_FIRMWARE: false
UPLOAD_RELEASE: true
Expand Down Expand Up @@ -66,28 +66,47 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive
run: |
docker rmi `docker images -q`
docker rmi $(docker images -q) 2>/dev/null
sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android 2>/dev/null
sudo -E apt -y purge azure-cli ghc* zulu* texlive* firefox google* dotnet* powershell openjdk* mongodb* moby* || true
[[ -n "${AGENT_TOOLSDIRECTORY}" ]] && sudo rm -rf "${AGENT_TOOLSDIRECTORY}"
sudo swapoff -a
sudo rm -f /swapfile /mnt/swapfile
sudo -E apt update
sudo -E apt -y install $(curl -fsSL https://is.gd/depends_ubuntu_2204)
sudo -E apt -y install clang llvm lld
sudo -E apt -y autoremove --purge
sudo -E systemctl daemon-reload
sudo -E apt clean && sudo -E apt autoclean
sudo sed -i '/NVM_DIR/d;/skel/d' /root/{.bashrc,.profile}
sudo rm -rf ~/{.cargo,.dotnet,.rustup}
sudo timedatectl set-timezone "$TZ"
sudo mkdir -p /mnt/workdir
sudo chown $USER:$GROUPS /mnt/workdir
echo "status=success" >> ${GITHUB_OUTPUT}
- name: Create simulated physical disk
run: |
mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\..*//') - 1)
root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\..*//') - 4)
sudo truncate -s "${mnt_size}"G /mnt/mnt.img
sudo truncate -s "${root_size}"G /root.img
sudo losetup /dev/loop6 /mnt/mnt.img
sudo losetup /dev/loop7 /root.img
sudo pvcreate /dev/loop6
sudo pvcreate /dev/loop7
sudo vgcreate github /dev/loop6 /dev/loop7
sudo lvcreate -n runner -l 100%FREE github
sudo mkfs.xfs /dev/github/runner
sudo mkdir -p /builder
sudo mount /dev/github/runner /builder
sudo chown -R runner.runner /builder
df -Th
- name: Clone source code
working-directory: /mnt/workdir
working-directory: /builder
run: |
df -hT $PWD
git clone $REPO_URL -b $REPO_BRANCH openwrt
ln -sf /mnt/workdir/openwrt $GITHUB_WORKSPACE/openwrt
ln -sf /builder/openwrt $GITHUB_WORKSPACE/openwrt
cd openwrt
useVersionInfo=$(git show -s --date=short --format="Author: %an<br/>date: %cd<br/>commit: %s<br/>commit hash: %H")
echo "useVersionInfo=$useVersionInfo" >> $GITHUB_ENV
Expand Down Expand Up @@ -130,16 +149,14 @@ jobs:
make download -j8
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
rm -rf $GITHUB_WORKSPACE/.git
rm -rf $GITHUB_WORKSPACE/opt
df -Th
- name: Compile the firmware
id: compile
run: |
cd openwrt
echo -e "$(nproc) thread compile"
make -j$(nproc) || make -j1 || make -j1 V=s
make -j$(($(nproc) + 1)) || make -j1 || make -j1 V=s
echo "status=success" >> ${GITHUB_OUTPUT}
grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME
[ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV
Expand Down Expand Up @@ -180,7 +197,7 @@ jobs:

- name: Create release
id: release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@main
with:
name: R${{ env.DATE }} for ${{ env.PRODUCT_NAME }}
allowUpdates: true
Expand All @@ -191,7 +208,7 @@ jobs:
body: |
- X86_64_k6.6 分支测试平台每周六自动更新发布固件
- 默认IP:192.168.1.1 默认密码:password
- 当前使用版本:【编译前的最后一次[➦主源码](https://github.com/coolsnowwolf/lede)更新记录】
- 当前使用版本:【编译前的最后一次[➦主源码](https://github.com/openwrt/openwrt)更新记录】
${{ env.useVersionInfo }}
artifacts: ${{ env.FIRMWARE }}/*

Expand All @@ -204,7 +221,7 @@ jobs:
keep_minimum_runs: 60

- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@v0.2.0
uses: dev-drprasad/delete-older-releases@v0.3.3
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
keep_latest: 30
Expand Down
6 changes: 3 additions & 3 deletions ARMv8/lede-gcc11.config
Original file line number Diff line number Diff line change
Expand Up @@ -7877,9 +7877,9 @@ CONFIG_PACKAGE_coreutils-base64=y
# CONFIG_PACKAGE_coreutils-date is not set
# CONFIG_PACKAGE_coreutils-dd is not set
# CONFIG_PACKAGE_coreutils-df is not set
# CONFIG_PACKAGE_coreutils-dir is not set
# CONFIG_PACKAGE_coreutils-dircolors is not set
# CONFIG_PACKAGE_coreutils-dirname is not set
CONFIG_PACKAGE_coreutils-dir=y
CONFIG_PACKAGE_coreutils-dircolors=y
CONFIG_PACKAGE_coreutils-dirname=y
# CONFIG_PACKAGE_coreutils-du is not set
# CONFIG_PACKAGE_coreutils-echo is not set
# CONFIG_PACKAGE_coreutils-env is not set
Expand Down
6 changes: 3 additions & 3 deletions ARMv8/lede-huge.config
Original file line number Diff line number Diff line change
Expand Up @@ -8066,9 +8066,9 @@ CONFIG_PACKAGE_coreutils-base64=y
# CONFIG_PACKAGE_coreutils-date is not set
# CONFIG_PACKAGE_coreutils-dd is not set
# CONFIG_PACKAGE_coreutils-df is not set
# CONFIG_PACKAGE_coreutils-dir is not set
# CONFIG_PACKAGE_coreutils-dircolors is not set
# CONFIG_PACKAGE_coreutils-dirname is not set
CONFIG_PACKAGE_coreutils-dir=y
CONFIG_PACKAGE_coreutils-dircolors=y
CONFIG_PACKAGE_coreutils-dirname=y
# CONFIG_PACKAGE_coreutils-du is not set
# CONFIG_PACKAGE_coreutils-echo is not set
# CONFIG_PACKAGE_coreutils-env is not set
Expand Down
Loading

0 comments on commit 1f55225

Please sign in to comment.