-
Notifications
You must be signed in to change notification settings - Fork 689
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
1 parent
5495e47
commit 72087c4
Showing
2 changed files
with
325 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,159 @@ | ||
# | ||
# Copyright (C) 2022-2024 hugcabbage <[email protected]> | ||
# | ||
# This is free software, licensed under the MIT License. | ||
# | ||
# <https://github.com/hugcabbage/shared-lede> | ||
# | ||
name: build multi devices | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
record: | ||
description: 'input version description' | ||
required: false | ||
default: 'details: kernel bumped, application version updated' | ||
type: string | ||
release: | ||
description: 'upload firmware to release' | ||
required: false | ||
default: true | ||
type: boolean | ||
artifact: | ||
description: 'upload firmware to artifact' | ||
required: false | ||
default: false | ||
type: boolean | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
to-build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
env: | ||
EXTRA_STR: _some | ||
steps: | ||
|
||
- name: Display initial disk space | ||
run: | | ||
df -h | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ env.EXTRA_STR }} | ||
|
||
- name: Prepare environments | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install gcc-multilib gettext | ||
sudo apt-get clean | ||
- name: Prepare deployment | ||
id: prepare-deployment | ||
env: | ||
DEPLOY_DIR: ${{ env.EXTRA_STR }}/preset-openwrt | ||
run: | | ||
CLONE_SH=$DEPLOY_DIR/1.clone.sh | ||
echo "modelname=${GITHUB_WORKFLOW#* }" >> "$GITHUB_OUTPUT" | ||
echo "codedir=$(grep '^CODE_DIR=' $CLONE_SH | cut -d '=' -f 2)" >> "$GITHUB_OUTPUT" | ||
echo "clone_sh=$CLONE_SH" >> "$GITHUB_OUTPUT" | ||
echo "modify_sh=$DEPLOY_DIR/1.modify.sh" >> "$GITHUB_OUTPUT" | ||
echo "dot_config=$DEPLOY_DIR/multi.config" >> "$GITHUB_OUTPUT" | ||
- name: Clone sources | ||
env: | ||
CLONE_SH: ${{ steps.prepare-deployment.outputs.clone_sh }} | ||
run: | | ||
chmod +x $CLONE_SH | ||
$CLONE_SH | ||
- name: Update feeds | ||
run: | | ||
./scripts/feeds update -a | ||
./scripts/feeds install -a | ||
- name: Modify configuration | ||
env: | ||
MODIFY_SH: ${{ steps.prepare-deployment.outputs.modify_sh }} | ||
run: | | ||
chmod +x $MODIFY_SH | ||
$MODIFY_SH | ||
- name: Generate .config | ||
env: | ||
DOT_CONFIG: ${{ steps.prepare-deployment.outputs.dot_config }} | ||
run: | | ||
mv $DOT_CONFIG .config | ||
make defconfig | ||
- name: Make download | ||
run: | | ||
make download -j8 || make download -j1 V=s | ||
- name: Compile | ||
run: | | ||
make -j$(nproc) || make -j1 V=s | ||
- name: Pick up files | ||
run: | | ||
mkdir -p _collected_firmware/packages | ||
rm -rf $(find bin/targets/ -type d -name 'packages') | ||
cp $(find bin/targets/ -type f) _collected_firmware | ||
cp $(find bin/packages/ -type f -name '*.ipk') _collected_firmware/packages | ||
cd _collected_firmware | ||
zip -r allfiles.zip * | ||
cd packages | ||
zip -r ../packages.zip * | ||
- name: Generate summary | ||
continue-on-error: true | ||
id: generate-summary | ||
env: | ||
MODEL_NAME: ${{ steps.prepare-deployment.outputs.modelname }} | ||
CODE_DIR: ${{ steps.prepare-deployment.outputs.codedir }} | ||
TRANSIT_PY: ${{ env.EXTRA_STR }}/extra-files/transit.py | ||
run: | | ||
chmod +x $TRANSIT_PY | ||
$TRANSIT_PY | ||
- name: Calculate tag version | ||
id: calculate-version | ||
if: inputs.release == true | ||
uses: hugcabbage/next-version@v1 | ||
with: | ||
repo_path: ${{ env.EXTRA_STR }} | ||
|
||
- name: Upload firmware to release | ||
id: to-release | ||
if: steps.calculate-version.conclusion == 'success' && inputs.release == true | ||
continue-on-error: true | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: _collected_firmware/* | ||
tag: ${{ steps.calculate-version.outputs.version }} | ||
release_name: ${{ steps.calculate-version.outputs.version }} ${{ steps.generate-summary.outputs.stitle }} | ||
overwrite: true | ||
prerelease: false | ||
body: | | ||
${{ inputs.record }} | ||
${{ steps.generate-summary.outputs.summary }} | ||
file_glob: true | ||
|
||
- name: Upload firmware to artifact | ||
if: inputs.artifact == true || steps.to-release.outcome != 'success' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: collected_firmware | ||
path: | | ||
_collected_firmware/ | ||
!_collected_firmware/*.zip | ||
- name: Display finishing disk space | ||
run: | | ||
df -h | ||
echo "----------------------------" | ||
du -h --max-depth=1 |
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,166 @@ | ||
# Targets | ||
CONFIG_TARGET_ramips=y | ||
CONFIG_TARGET_ramips_mt7621=y | ||
CONFIG_TARGET_MULTI_PROFILE=y | ||
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_mi-router-ac2100=y | ||
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_mi-router-cr6606=y | ||
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_mi-router-cr6608=y | ||
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_mi-router-cr6609=y | ||
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_redmi-router-ac2100=y | ||
|
||
# Extra packages | ||
# CONFIG_PACKAGE_luci-app-xray is not set | ||
|
||
# Collections | ||
CONFIG_PACKAGE_luci=y | ||
|
||
# Translations | ||
CONFIG_LUCI_LANG_zh_Hans=y | ||
|
||
# Applications | ||
# CONFIG_PACKAGE_luci-app-acl is not set | ||
# CONFIG_PACKAGE_luci-app-acme is not set | ||
# CONFIG_PACKAGE_luci-app-adblock is not set | ||
# CONFIG_PACKAGE_luci-app-adblock-fast is not set | ||
# CONFIG_PACKAGE_luci-app-advanced-reboot is not set | ||
# CONFIG_PACKAGE_luci-app-ahcp is not set | ||
# CONFIG_PACKAGE_luci-app-apinger is not set | ||
CONFIG_PACKAGE_luci-app-argon-config=y | ||
# CONFIG_PACKAGE_luci-app-aria2 is not set | ||
# CONFIG_PACKAGE_luci-app-attendedsysupgrade is not set | ||
# CONFIG_PACKAGE_luci-app-babeld is not set | ||
# CONFIG_PACKAGE_luci-app-banip is not set | ||
# CONFIG_PACKAGE_luci-app-bcp38 is not set | ||
# CONFIG_PACKAGE_luci-app-bird1-ipv4 is not set | ||
# CONFIG_PACKAGE_luci-app-bird1-ipv6 is not set | ||
# CONFIG_PACKAGE_luci-app-bmx7 is not set | ||
# CONFIG_PACKAGE_luci-app-cjdns is not set | ||
# CONFIG_PACKAGE_luci-app-clamav is not set | ||
# CONFIG_PACKAGE_luci-app-commands is not set | ||
# CONFIG_PACKAGE_luci-app-crowdsec-firewall-bouncer is not set | ||
# CONFIG_PACKAGE_luci-app-cshark is not set | ||
# CONFIG_PACKAGE_luci-app-dawn is not set | ||
# CONFIG_PACKAGE_luci-app-dcwapd is not set | ||
CONFIG_PACKAGE_luci-app-ddns=y | ||
# CONFIG_PACKAGE_luci-app-diag-core is not set | ||
# CONFIG_PACKAGE_luci-app-dnscrypt-proxy is not set | ||
# CONFIG_PACKAGE_luci-app-dump1090 is not set | ||
# CONFIG_PACKAGE_luci-app-dynapoint is not set | ||
# CONFIG_PACKAGE_luci-app-eoip is not set | ||
# CONFIG_PACKAGE_luci-app-example is not set | ||
CONFIG_PACKAGE_luci-app-firewall=y | ||
# CONFIG_PACKAGE_luci-app-frpc is not set | ||
# CONFIG_PACKAGE_luci-app-frps is not set | ||
# CONFIG_PACKAGE_luci-app-fwknopd is not set | ||
# CONFIG_PACKAGE_luci-app-hd-idle is not set | ||
# CONFIG_PACKAGE_luci-app-hnet is not set | ||
# CONFIG_PACKAGE_luci-app-https-dns-proxy is not set | ||
# CONFIG_PACKAGE_luci-app-keepalived is not set | ||
# CONFIG_PACKAGE_luci-app-ksmbd is not set | ||
# CONFIG_PACKAGE_luci-app-ledtrig-rssi is not set | ||
# CONFIG_PACKAGE_luci-app-ledtrig-switch is not set | ||
# CONFIG_PACKAGE_luci-app-ledtrig-usbport is not set | ||
# CONFIG_PACKAGE_luci-app-lorawan-basicstation is not set | ||
# CONFIG_PACKAGE_luci-app-lxc is not set | ||
# CONFIG_PACKAGE_luci-app-minidlna is not set | ||
# CONFIG_PACKAGE_luci-app-mjpg-streamer is not set | ||
# CONFIG_PACKAGE_luci-app-mwan3 is not set | ||
# CONFIG_PACKAGE_luci-app-natmap is not set | ||
# CONFIG_PACKAGE_luci-app-nextdns is not set | ||
# CONFIG_PACKAGE_luci-app-nft-qos is not set | ||
CONFIG_PACKAGE_luci-app-nlbwmon=y | ||
# CONFIG_PACKAGE_luci-app-ntpc is not set | ||
# CONFIG_PACKAGE_luci-app-nut is not set | ||
# CONFIG_PACKAGE_luci-app-ocserv is not set | ||
# CONFIG_PACKAGE_luci-app-olsr is not set | ||
# CONFIG_PACKAGE_luci-app-olsr-services is not set | ||
# CONFIG_PACKAGE_luci-app-olsr-viz is not set | ||
# CONFIG_PACKAGE_luci-app-olsrd2 is not set | ||
# CONFIG_PACKAGE_luci-app-omcproxy is not set | ||
# CONFIG_PACKAGE_luci-app-openclash is not set | ||
# CONFIG_PACKAGE_iptables-mod-tproxy is not set | ||
# CONFIG_PACKAGE_iptables-mod-extra is not set | ||
# CONFIG_PACKAGE_luci-app-openvpn is not set | ||
# CONFIG_PACKAGE_luci-app-openwisp is not set | ||
CONFIG_PACKAGE_luci-app-opkg=y | ||
# CONFIG_PACKAGE_luci-app-p910nd is not set | ||
# CONFIG_PACKAGE_luci-app-pagekitec is not set | ||
# CONFIG_PACKAGE_luci-app-passwall is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Brook is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Haproxy is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Hysteria is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_NaiveProxy is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Shadowsocks_Libev_Client is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Shadowsocks_Libev_Server is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Shadowsocks_Rust_Client is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Shadowsocks_Rust_Server is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_ShadowsocksR_Libev_Client is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_ShadowsocksR_Libev_Server is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Simple_Obfs is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_SingBox is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Trojan_GO is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Trojan_Plus is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_V2ray_Geodata is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_V2ray_Plugin is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Xray is not set | ||
# CONFIG_PACKAGE_luci-app-passwall_INCLUDE_Xray_Plugin is not set | ||
CONFIG_PACKAGE_luci-app-passwall2=y | ||
# CONFIG_PACKAGE_luci-app-passwall2_Iptables_Transparent_Proxy is not set | ||
CONFIG_PACKAGE_luci-app-passwall2_Nftables_Transparent_Proxy=y | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Brook is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Haproxy is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Hysteria is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_NaiveProxy is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Shadowsocks_Libev_Client is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Shadowsocks_Libev_Server is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Shadowsocks_Rust_Client is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Shadowsocks_Rust_Server is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_ShadowsocksR_Libev_Client is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_ShadowsocksR_Libev_Server is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_Simple_Obfs is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_SingBox is not set | ||
# CONFIG_PACKAGE_luci-app-passwall2_INCLUDE_V2ray_Plugin is not set | ||
# CONFIG_PACKAGE_luci-app-pbr is not set | ||
# CONFIG_PACKAGE_luci-app-polipo is not set | ||
# CONFIG_PACKAGE_luci-app-privoxy is not set | ||
# CONFIG_PACKAGE_luci-app-qos is not set | ||
# CONFIG_PACKAGE_luci-app-radicale is not set | ||
# CONFIG_PACKAGE_luci-app-radicale2 is not set | ||
# CONFIG_PACKAGE_luci-app-rp-pppoe-server is not set | ||
# CONFIG_PACKAGE_luci-app-samba4 is not set | ||
# CONFIG_PACKAGE_luci-app-ser2net is not set | ||
# CONFIG_PACKAGE_luci-app-shadowsocks-libev is not set | ||
# CONFIG_PACKAGE_luci-app-shairplay is not set | ||
# CONFIG_PACKAGE_luci-app-siitwizard is not set | ||
# CONFIG_PACKAGE_luci-app-smartdns is not set | ||
# CONFIG_PACKAGE_luci-app-snmpd is not set | ||
# CONFIG_PACKAGE_luci-app-softether is not set | ||
# CONFIG_PACKAGE_luci-app-splash is not set | ||
# CONFIG_PACKAGE_luci-app-sqm is not set | ||
# CONFIG_PACKAGE_luci-app-squid is not set | ||
# CONFIG_PACKAGE_luci-app-sshtunnel is not set | ||
# CONFIG_PACKAGE_luci-app-statistics is not set | ||
# CONFIG_PACKAGE_luci-app-tinyproxy is not set | ||
# CONFIG_PACKAGE_luci-app-tor is not set | ||
# CONFIG_PACKAGE_luci-app-transmission is not set | ||
# CONFIG_PACKAGE_luci-app-travelmate is not set | ||
# CONFIG_PACKAGE_luci-app-ttyd is not set | ||
# CONFIG_PACKAGE_luci-app-udpxy is not set | ||
# CONFIG_PACKAGE_luci-app-uhttpd is not set | ||
# CONFIG_PACKAGE_luci-app-unbound is not set | ||
CONFIG_PACKAGE_luci-app-upnp=y | ||
# CONFIG_PACKAGE_luci-app-usteer is not set | ||
# CONFIG_PACKAGE_luci-app-vnstat is not set | ||
# CONFIG_PACKAGE_luci-app-vnstat2 is not set | ||
# CONFIG_PACKAGE_luci-app-watchcat is not set | ||
# CONFIG_PACKAGE_luci-app-wifischedule is not set | ||
# CONFIG_PACKAGE_luci-app-wol is not set | ||
# CONFIG_PACKAGE_luci-app-xfrpc is not set | ||
# CONFIG_PACKAGE_luci-app-xinetd is not set | ||
|
||
# Themes | ||
CONFIG_PACKAGE_luci-theme-argon=y | ||
CONFIG_PACKAGE_luci-theme-bootstrap=y | ||
# CONFIG_PACKAGE_luci-theme-material is not set | ||
# CONFIG_PACKAGE_luci-theme-openwrt is not set | ||
# CONFIG_PACKAGE_luci-theme-openwrt-2020 is not set |