Merge remote-tracking branch 'upstream/openwrt-24.10' into openwrt-24.10 #8
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: OpenWrt 24.10 Test CI | |
on: | |
push: | |
branches: | |
- openwrt-24.10 | |
# tags: | |
# - 'v*' | |
# schedule: | |
# - cron: 0 20 * * * | |
#release: | |
# types: [published] | |
jobs: | |
build_openwrt_glibc: | |
name: Build OpenWrt OpenWrt-24.10 glibc dev firmware | |
runs-on: ubuntu-24.04 | |
if: github.event.repository.owner.id == github.event.sender.id | |
steps: | |
- name: Set workspace | |
run: | | |
sudo mkdir -p -m 777 /mnt/openwrt | |
echo "WORK_PATH=/mnt/openwrt" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: openwrt-24.10 | |
- name: Set variables | |
run: | | |
sudo -E timedatectl set-timezone Asia/Shanghai | |
- name: Configure compilation environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo -E apt-get -qq update | |
sudo -E apt-get -qq install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ | |
bzip2 ccache clang cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib \ | |
g++-multilib git libgnutls28-dev gperf haveged help2man intltool lib32gcc-s1 libc6-dev-i386 libelf-dev \ | |
libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses-dev \ | |
libncurses-dev libpython3-dev libreadline-dev libssl-dev libtool lld llvm lrzsz genisoimage msmtp \ | |
nano ninja-build p7zip p7zip-full patch pkgconf python3 python3-pip python3-ply \ | |
python3-docutils python3-pyelftools qemu-utils re2c rsync scons squashfs-tools subversion swig \ | |
texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev zstd yasm | |
sudo -E apt-get -qq autoremove --purge | |
sudo -E apt-get -qq clean | |
df -h | |
- name: Move Build Path | |
run: | | |
cp -r ./. ${{ env.WORK_PATH }}/ | |
- name: Update feeds | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
./tool.sh feed | |
- name: Generate configuration file | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
rm -f ./.config* | |
cp ./configs/base_glibc_config ./.config | |
make defconfig | |
- name: Make download | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
make download -j8 || make download -j1 V=s | |
rm -rf $(find ./dl/ -size -1024c) | |
df -h | |
- name: Compile firmware | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
make -j$(nproc) || make -j1 V=s | |
- name: Clean Build Files | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
rm -rf ./staging_dir | |
rm -rf ./build_dir | |
- name: Prepare artifact | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
mkdir -p ./artifact/firmware | |
mkdir -p ./artifact/package | |
mkdir -p ./artifact/buildinfo | |
rm -rf $(find ./bin/targets/ -type d -name "packages") | |
cp -rf $(find ./bin/targets/ -type f -name "immortalwrt-*") ./artifact/firmware/ | |
cp -rf $(find ./bin/targets/ -type f -name "sha256sums") ./artifact/firmware/ | |
cp -rf $(find ./bin/packages/ -type f -name "*.ipk") ./artifact/package/ | |
cp -rf $(find ./bin/targets/ -type f -name "*.buildinfo" -o -name "*.manifest") ./artifact/buildinfo/ | |
- name: Clean Bin Files | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
rm -rf ./bin | |
- name: Deliver buildinfo | |
uses: actions/upload-artifact@v4 | |
with: | |
name: OpenWrt_buildinfo_glic | |
path: ${{ env.WORK_PATH }}/artifact/buildinfo/ | |
- name: Deliver package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: OpenWrt_package_glic | |
path: ${{ env.WORK_PATH }}/artifact/package/ | |
- name: Deliver firmware | |
uses: actions/upload-artifact@v4 | |
with: | |
name: OpenWrt_firmware_glic | |
path: ${{ env.WORK_PATH }}/artifact/firmware/ | |
build_openwrt_musl: | |
name: Build OpenWrt OpenWrt-24.10 musl dev firmware | |
runs-on: ubuntu-24.04 | |
if: github.event.repository.owner.id == github.event.sender.id | |
steps: | |
- name: Set workspace | |
run: | | |
sudo mkdir -p -m 777 /mnt/openwrt | |
echo "WORK_PATH=/mnt/openwrt" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: openwrt-24.10 | |
- name: Set variables | |
run: | | |
sudo -E timedatectl set-timezone Asia/Shanghai | |
- name: Configure compilation environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo -E apt-get -qq update | |
sudo -E apt-get -qq install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ | |
bzip2 ccache clang cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib \ | |
g++-multilib git libgnutls28-dev gperf haveged help2man intltool lib32gcc-s1 libc6-dev-i386 libelf-dev \ | |
libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses-dev \ | |
libncurses-dev libpython3-dev libreadline-dev libssl-dev libtool lld llvm lrzsz genisoimage msmtp \ | |
nano ninja-build p7zip p7zip-full patch pkgconf python3 python3-pip python3-ply \ | |
python3-docutils python3-pyelftools qemu-utils re2c rsync scons squashfs-tools subversion swig \ | |
texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev zstd yasm | |
sudo -E apt-get -qq autoremove --purge | |
sudo -E apt-get -qq clean | |
df -h | |
- name: Move Build Path | |
run: | | |
cp -r ./. ${{ env.WORK_PATH }}/ | |
- name: Update feeds | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
./tool.sh feed | |
- name: Generate configuration file | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
rm -f ./.config* | |
cp ./configs/base_musl_config ./.config | |
make defconfig | |
- name: Make download | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
make download -j8 || make download -j1 V=s | |
rm -rf $(find ./dl/ -size -1024c) | |
df -h | |
- name: Compile firmware | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
make -j$(nproc) || make -j1 V=s | |
- name: Clean Build Files | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
rm -rf ./staging_dir | |
rm -rf ./build_dir | |
- name: Prepare artifact | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
mkdir -p ./artifact/firmware | |
mkdir -p ./artifact/package | |
mkdir -p ./artifact/buildinfo | |
rm -rf $(find ./bin/targets/ -type d -name "packages") | |
cp -rf $(find ./bin/targets/ -type f -name "immortalwrt-*") ./artifact/firmware/ | |
cp -rf $(find ./bin/targets/ -type f -name "sha256sums") ./artifact/firmware/ | |
cp -rf $(find ./bin/packages/ -type f -name "*.ipk") ./artifact/package/ | |
cp -rf $(find ./bin/targets/ -type f -name "*.buildinfo" -o -name "*.manifest") ./artifact/buildinfo/ | |
- name: Clean Bin Files | |
working-directory: ${{ env.WORK_PATH }} | |
run: | | |
rm -rf ./bin | |
- name: Deliver buildinfo | |
uses: actions/upload-artifact@v4 | |
with: | |
name: OpenWrt_buildinfo_musl | |
path: ${{ env.WORK_PATH }}/artifact/buildinfo/ | |
- name: Deliver package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: OpenWrt_package_musl | |
path: ${{ env.WORK_PATH }}/artifact/package/ | |
- name: Deliver firmware | |
uses: actions/upload-artifact@v4 | |
with: | |
name: OpenWrt_firmware_musl | |
path: ${{ env.WORK_PATH }}/artifact/firmware/ | |
push_msg: | |
name: push weixing msg | |
needs: [build_openwrt_glibc, build_openwrt_musl] | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Push Msg | |
run: | | |
sh .github/push.sh ${{ secrets.CORPID }} ${{ secrets.CORPSECRET }} ${{ secrets.AGENTID }} "x86_64" "dev on ${{ github.ref_name }}" | |