BuildImage-x86-64-all #310
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
name: BuildImage-x86-64-all | |
on: | |
workflow_dispatch: | |
push: | |
schedule: | |
- cron: "0 21 * * *" | |
# For SDK, the version is x86_64-master, x86_64-openwrt-19.07, x86_64-openwrt-21.02, x86_64-openwrt-22.03 | |
# For ImageBuilder: the version is x86-64-master, x86-64-openwrt-19.07, x86-64-openwrt-21.02, x86-64-openwrt-22.03 | |
jobs: | |
build_passwall: | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [master, 22.03-SNAPSHOT, 22.03.5] | |
arch: [x86-64] | |
name: Build Passwall for OpenWRT-${{ matrix.version }} | |
runs-on: ubuntu-latest | |
container: | |
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.version }} | |
options: --user root | |
defaults: | |
run: | |
shell: bash | |
steps: | |
# - uses: actions/checkout@v3 | |
- name: Run Make | |
run: | | |
export VOLUME_HOME=$(pwd) | |
export BUILD_DIR="/builder" | |
export BUILDER="buildbot" | |
cd $BUILD_DIR | |
apt-get update | |
apt install sudo -y | |
sudo -u $BUILDER echo "src-git passwall https://github.com/xiaorouji/openwrt-passwall" >> feeds.conf.default | |
## apt-get install upx -y | |
## sudo -u $BUILDER ln -s /usr/bin/upx staging_dir/host/bin/upx | |
## sudo -u $BUILDER ln -s /usr/bin/upx-ucl staging_dir/host/bin/upx-ucl | |
sudo -u $BUILDER ./scripts/feeds update -a | |
git clone -b luci https://github.com/xiaorouji/openwrt-passwall.git $VOLUME_HOME/openwrt-passwall-luci | |
cp -r $VOLUME_HOME/openwrt-passwall-luci/luci-app-passwall $BUILD_DIR/feeds/passwall/ | |
chown -R $BUILDER:$BUILDER $BUILD_DIR | |
sudo -u $BUILDER ./scripts/feeds update -a | |
sudo -u $BUILDER ./scripts/feeds install luci-app-passwall | |
sudo -u $BUILDER make defconfig | |
sudo -u $BUILDER sed -i "s/# \(CONFIG_PACKAGE_luci-app-passwall_.*\) is not set/\1=y/g" .config | |
sudo -u $BUILDER make package/luci-app-passwall/compile V=99 -j $(nproc) || ( find . -name "config.log" && exit -1 ) | |
cp -r bin/packages/x86_64/passwall $VOLUME_HOME | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: passwall-x86_64-${{ matrix.version }} | |
path: passwall | |
build_theme_argon: | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [master, 22.03-SNAPSHOT, 22.03.5] | |
arch: [x86-64] | |
name: Build Argon for OpenWRT-${{ matrix.arch }}-${{ matrix.version }} | |
runs-on: ubuntu-latest | |
container: | |
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.version }} | |
options: --user root | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run Make | |
run: | | |
export VOLUME_HOME=$(pwd) | |
export BUILD_DIR="/builder" | |
export BUILDER="buildbot" | |
cd $BUILD_DIR | |
apt-get update | |
apt install sudo -y | |
sudo -u $BUILDER git clone https://github.com/jerrykuku/luci-theme-argon.git package/luci-theme-argon | |
sudo -u $BUILDER ./scripts/feeds update -a | |
sudo -u $BUILDER make defconfig | |
sudo -u $BUILDER make package/luci-theme-argon/compile V=s -j1 | |
mkdir -p $VOLUME_HOME/luci-theme-argon | |
cp bin/packages/x86_64/base/luci-theme-argon*.ipk $VOLUME_HOME/luci-theme-argon/ | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: luci-theme-argon-x86_64-${{ matrix.version }} | |
path: luci-theme-argon | |
# luci app netdata has some bugs, so just not use it for now! | |
build_luci_app_netdata: | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [master, 22.03-SNAPSHOT, 22.03.5] | |
arch: [x86-64] | |
name: Build Luci App Netdata for OpenWRT-${{ matrix.arch }}-${{ matrix.version }} | |
runs-on: ubuntu-latest | |
container: | |
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.version }} | |
options: --user root | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run Make | |
run: | | |
export VOLUME_HOME=$(pwd) | |
export BUILD_DIR="/builder" | |
export BUILDER="buildbot" | |
cd $BUILD_DIR | |
apt-get update | |
apt install sudo -y | |
sudo -u $BUILDER git clone https://github.com/sirpdboy/luci-app-netdata package/luci-app-netdata | |
sudo -u $BUILDER ./scripts/feeds update -a | |
sudo -u $BUILDER ./scripts/feeds install -a | |
sudo -u $BUILDER make defconfig | |
sudo -u $BUILDER make package/luci-app-netdata/compile V=s -j1 | |
mkdir -p $VOLUME_HOME/luci-app-netdata | |
cp bin/packages/x86_64/base/luci-app-netdata*.ipk $VOLUME_HOME/luci-app-netdata/ | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: luci-app-netdata-x86_64-${{ matrix.version }} | |
path: luci-app-netdata | |
build_image: | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [master, 22.03-SNAPSHOT, 22.03.5] | |
arch: [x86-64] | |
if: ${{ always() }} | |
needs: [build_passwall, build_theme_argon, build_luci_app_netdata] | |
name: Build Image for OpenWRT-${{ matrix.arch }}-${{ matrix.version }} | |
runs-on: ubuntu-latest | |
container: | |
image: openwrt/imagebuilder:${{ matrix.arch }}-${{ matrix.version }} | |
options: --user root | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: passwall-x86_64-${{ matrix.version }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: luci-theme-argon-x86_64-${{ matrix.version }} | |
# - uses: actions/download-artifact@v3 | |
# with: | |
# name: luci-app-netdata | |
- name: Prepare Packages | |
run: | | |
export VOLUME_HOME=$(pwd) | |
export BUILD_DIR="/builder" | |
export BUILDER="buildbot" | |
cd $BUILD_DIR | |
mkdir -p $BUILD_DIR/packages/mypackages | |
cp -r $VOLUME_HOME/* packages/mypackages/ | |
- name: Debug Print | |
run: | | |
export VOLUME_HOME=$(pwd) | |
export BUILD_DIR="/builder" | |
export BUILDER="buildbot" | |
apt update | |
apt install tree sudo -y | |
tree $BUILD_DIR/packages | |
- name: Make Image | |
run: | | |
export VOLUME_HOME=$(pwd) | |
export BUILD_DIR="/builder" | |
export BUILDER="buildbot" | |
cd $BUILD_DIR | |
chown -R $BUILDER:$BUILDER packages | |
sudo -u $BUILDER sed -i "s/CONFIG_TARGET_ROOTFS_PARTSIZE=[0-9]\+/CONFIG_TARGET_ROOTFS_PARTSIZE=${{ env.rootfs_size }}/g;s/CONFIG_TARGET_KERNEL_PARTSIZE=[0-9]\+/CONFIG_TARGET_KERNEL_PARTSIZE=${{ env.kernel_size }}/g" .config | |
sudo -u $BUILDER make image PROFILE=${{ env.profile }} PACKAGES="${{ env.packages }} packages/mypackages/*" | |
mkdir -p $VOLUME_HOME/openwrt-${{ matrix.arch }}-${{ matrix.version }} | |
cp bin/targets/x86/64/* $VOLUME_HOME/openwrt-${{ matrix.arch }}-${{ matrix.version }}/ | |
env: | |
rootfs_size: 4096 | |
kernel_size: 256 | |
profile: generic | |
packages: luci luci-app-qos luci-app-upnp luci-proto-ipv6 kmod-igc kmod-mt7921e kmod-iwlwifi iwlwifi-firmware-ax210 kmod-usb-core kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-net-cdc-ncm kmod-usb-net-cdc-eem kmod-usb-net-cdc-ether kmod-usb-net-cdc-subset kmod-nls-base | |
luci-i18n-base-zh-cn netdata luci-app-ttyd ntpclient luci-app-ntpc pciutils kmod-l2tp | |
coreutils-timeout lm-sensors lm-sensors-detect fdisk shadow-useradd -dnsmasq usbmuxd libimobiledevice usbutils | |
vim python3 python3-yaml sudo docker dockerd docker-compose ipset samba4-server | |
openvpn-openssl luci-app-openvpn lsof kmod-usb-storage block-mount lsblk luci-app-samba4 curl wpa-supplicant | |
tcpdump zstd tmux bash netcat ip6tables-mod-nat iptables-mod-tproxy dnsmasq-full hostapd | |
wpa-supplicant xl2tpd tailscale kmod-loop nfs-kernel-server | |
# luci-theme-argon | |
# chinadns-ng dns2socks dns2tcp luci-app-passwall luci-i18n-passwall-zh-cn microsocks | |
# shadowsocksr-libev-ssr-check shadowsocksr-libev-ssr-local shadowsocksr-libev-ssr-nat | |
# shadowsocksr-libev-ssr-redir shadowsocksr-libev-ssr-server simple-obfs-server simple-obfs | |
# tcping trojan-plus v2ray-core v2ray-example v2ray-extra v2ray-plugin | |
# open-vm-tools | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: openwrt-${{ matrix.arch }}-${{ matrix.version }} | |
path: openwrt-${{ matrix.arch }}-${{ matrix.version }} |