Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update repo-dispatcher #708

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,24 @@ jobs:
-H "Authorization: Bearer ${{ secrets.REPO_TOKEN }}" \
-X POST -d '{ "query": "query {repository(owner: \"openwrt\", name: \"openwrt\") {refs(refPrefix: \"refs/tags/\", last: 4, orderBy: {field: TAG_COMMIT_DATE, direction: ASC}) {edges {node {name}}}}}"}' https://api.github.com/graphql) | jq -r '.data.repository.refs.edges[].node.name' | grep v22 | tail -n 1 | sed -e 's/v//')"
git clone $REPO_URL -b v$REPO_BRANCH openwrt
if [[ "${{ contains(github.event.action, 'nosdk') }}" != "true" ]]; then
cd openwrt
if [[ ${{matrix.target}} == "x86_64" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/x86/64/openwrt-sdk-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "rockchip_armv8" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/rockchip/armv8/openwrt-sdk-rockchip-armv8_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "bcm27xx_bcm2711" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/bcm27xx/bcm2711/openwrt-sdk-bcm27xx-bcm2711_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "armvirt_64" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/armvirt/64/openwrt-sdk-armvirt-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "ramips_mt7621" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/ramips/mt7621/openwrt-sdk-ramips-mt7621_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "mediatek_mt7622" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/mediatek/mt7622/openwrt-sdk-mediatek-mt7622_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "ipq807x" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/ipq807x/generic/openwrt-sdk-ipq807x-generic_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
fi
fi
ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
echo "REPO_BRANCH=$REPO_BRANCH" >> $GITHUB_ENV
echo "$REPO_BRANCH"
Expand Down Expand Up @@ -179,24 +197,22 @@ jobs:
make download -j$(($(nproc)+1)) &
sleep 5

- name: Cache
if: contains(github.event.action, 'nocache') != 'true'
run: |
curl -fL -m 60 -o openwrt/cache.tar.gz https://op.supes.top/releases/targets/cache.tar.gz || true

- name: Compile the firmware
id: compile
run: |
cd openwrt
echo -e "$(($(nproc)+1)) thread compile"
make -j$(($(nproc)+1)) || (curl -k --data chat_id="${{ env.TELEGRAM_CHAT_ID }}" --data "text=❌ OpenWrt ${{ env.VERSION }} ${{matrix.target}} 编译失败 😂" "https://api.telegram.org/bot${{ env.TELEGRAM_TOKEN }}/sendMessage" ; make -j1 V=s)
echo "::set-output name=status::success"
sed -i "/# CONFIG_IB is not set/CONFIG_IB=y/" .config
make defconfig
make target/imagebuilder/compile -j$(($(nproc)+1))

- name: Check space usage
run: df -hT

- name: Organize files
id: organize
continue-on-error: true
run: |
shopt -s extglob
mkdir -p firmware/${{matrix.target}}
Expand All @@ -208,7 +224,6 @@ jobs:
mkdir packages
cp -rf ${{ env.KERNEL }}/Packages* packages/
cd -
tar -zcf openwrt/bin/targets/cache.tar.gz build_dir/host* build_dir/tool* staging_dir/host* staging_dir/tool*
rename -v "s/openwrt-/${{ env.VERSION }}-openwrt-/" ./firmware/*/* || true
rename -v "s/friendlyarm_//" ./firmware/*/*gz || true
rename -v "s/embedfire_//" ./firmware/*/*gz || true
Expand Down Expand Up @@ -272,7 +287,7 @@ jobs:
with:
name: ${{ env.VERSION }}_${{matrix.target}}
path: |
openwrt/bin/targets
openwrt/bin/targets/

- name: Upload firmware to cowtransfer
if: env.UPLOAD_FIRMWARE_TO_COWTRANSFER == 'true'
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/repo-dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
name: Repo Dispatcher

on:
# push:
# branches:
# - master
push:
branches:
- master
#schedule:
# - cron: 30 18 * * *
workflow_dispatch:
Expand All @@ -22,19 +22,13 @@ on:
default: ''

env:
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
REPO_TOKEN:${{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 }}
TZ: Asia/Shanghai

jobs:
build:
runs-on: Ubuntu-20.04
steps:
- name: cancel running workflows
uses: styfle/cancel-workflow-action@main
with:
workflow_id: Openwrt-AutoBuild.yml,repo-dispatcher.yml
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@main

Expand Down
2 changes: 0 additions & 2 deletions devices/armvirt_64/.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ CONFIG_PACKAGE_kmod-brcmfmac=y
CONFIG_BRCMFMAC_SDIO=y

CONFIG_TESTING_KERNEL=y

CONFIG_JSON_OVERVIEW_IMAGE_INFO=n
1 change: 0 additions & 1 deletion devices/common/.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ CONFIG_PACKAGE_kmod-usb-serial-xr_usb_serial_common=n

CONFIG_SDK=y

CONFIG_IB=y
CONFIG_IB_STANDALONE=y
CONFIG_JSON_OVERVIEW_IMAGE_INFO=y

Expand Down
20 changes: 15 additions & 5 deletions devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sed -i '/ refresh_config();/d' scripts/feeds
sed -i '$a src-git kiddin9 https://github.com/kiddin9/openwrt-packages.git;master' feeds.conf.default
}

rm -rf package/{base-files,network/config/firewall,network/config/firewall4,network/services/dnsmasq,network/services/ppp,system/opkg,libs/mbedtls}
rm -rf package/{base-files,network/config/firewall,network/config/firewall4,network/services/dnsmasq,network/services/ppp,system/opkg,libs/mbedtls,firmware/wireless-regdb}

./scripts/feeds update -a
./scripts/feeds install -a -p kiddin9
Expand Down Expand Up @@ -74,9 +74,19 @@ sed -i \
package/feeds/kiddin9/*/Makefile

(
if [ -f cache.tar.gz ]; then
tar -zxf cache.tar.gz
rm -f cache.tar.gz
find build_dir/{host*,toolchain-*} -name .built* -exec touch {} \;; touch staging_dir/{host*,toolchain-*}/stamp/.*
if [ -f sdk.tar.xz ]; then
sed -i 's,$(STAGING_DIR_HOST)/bin/upx,upx,' package/feeds/kiddin9/*/Makefile
mkdir sdk
tar -xJf sdk.tar.xz -C sdk
cp -rf sdk/*/staging_dir/* ./staging_dir/
rm -rf sdk.tar.xz sdk
rm -rf `find "staging_dir/host/" -maxdepth 2 -name 'libelf*'` || true
sed -i '/\(tools\|toolchain\)\/Makefile/d' Makefile
if [ -f /usr/bin/python ]; then
ln -sf /usr/bin/python staging_dir/host/bin/python
else
ln -sf /usr/bin/python3 staging_dir/host/bin/python
fi
ln -sf /usr/bin/python3 staging_dir/host/bin/python3
fi
) &
2 changes: 1 addition & 1 deletion devices/common/patches/targets.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- kmod-nft-offload \
+ dnsmasq-full \
+ firewall \
+ nftables iptables-legacy ip6tables-legacy \
+ nftables iptables-legacy ip6tables-legacy ipset \
+ kmod-ipt-offload \
odhcp6c \
odhcpd-ipv6only \
Expand Down
2 changes: 2 additions & 0 deletions devices/ipq807x/.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ CONFIG_TARGET_DEVICE_ipq807x_generic_DEVICE_xiaomi_ax9000=y
CONFIG_PACKAGE_luci-app-turboacc_INCLUDE_SHORTCUT_FE_DRV=n
CONFIG_PACKAGE_luci-app-turboacc_INCLUDE_SHORTCUT_FE=y

CONFIG_ALL_KMODS=n

CONFIG_PACKAGE_kmod-qca-mcs=n
CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc=n
CONFIG_PACKAGE_kmod-qca-nss-ecm=n
Expand Down
8 changes: 4 additions & 4 deletions devices/ipq807x/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ svn export https://github.com/Boos4721/openwrt/trunk/package/qca package/qca
svn export https://github.com/Boos4721/openwrt/trunk/package/qat package/qat
svn export https://github.com/Boos4721/openwrt/trunk/package/kernel/mac80211 package/kernel/mac80211

rm -rf target/linux/ipq807x/!(patches-5.15)
svn co https://github.com/Boos4721/openwrt/trunk/target/linux/ipq807x target/linux/ipq807x
rm -rf target/linux/ipq807x/{.svn,patches-5.15/.svn}
svn co https://github.com/Boos4721/openwrt/trunk/target/linux/ipq807x/patches-5.15 target/linux/ipq807x/patches-5.15

rm -rf target/linux
svn export https://github.com/Boos4721/openwrt/trunk/target/linux target/linux
rm -rf target/linux/generic/hack-5.15/531-debloat_lzma.patch target/linux/generic/hack-5.15/600-bridge_offload.patch

sed -i 's/autocore-arm /my-autocore-arm /' target/linux/ipq807x/Makefile
sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += luci-app-turboacc/' target/linux/ipq807x/Makefile
Expand Down
2 changes: 1 addition & 1 deletion devices/x86_64/.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ CONFIG_GRUB_EFI_IMAGES=y
CONFIG_VMDK_IMAGES=n

# 其他需要安装的软件包:
CONFIG_PACKAGE_kmod-r8168=n
#CONFIG_PACKAGE_kmod-r8168=n

CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=n
2 changes: 1 addition & 1 deletion devices/x86_64/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rm -rf target/linux/x86/patches-5.15/.svn
sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += my-autocore-x86 lm-sensors-detect kmod-r8125 kmod-vmxnet3 kmod-igc kmod-drm-i915 kmod-mlx4-core kmod-usb2 kmod-usb3 fdisk/' target/linux/x86/Makefile

mv -f tmp/r81* feeds/kiddin9/
#sed -i 's,kmod-r8169,kmod-r8168,g' target/linux/x86/image/64.mk
sed -i 's,kmod-r8169,kmod-r8168,g' target/linux/x86/image/64.mk

echo '
CONFIG_CRYPTO_CHACHA20_X86_64=y
Expand Down