Update openwrt-ci.yml
This commit is contained in:
53
.github/workflows/openwrt-ci.yml
vendored
53
.github/workflows/openwrt-ci.yml
vendored
@@ -50,15 +50,20 @@ jobs:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
docker rmi `docker images -q`
|
||||
sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android
|
||||
sudo -E apt-get update
|
||||
sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android
|
||||
sudo -E apt-mark hold grub-efi-amd64-signed
|
||||
sudo -E apt-get -y install ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
|
||||
pip3 install pyelftools
|
||||
sudo -E apt-get -y autoremove --purge
|
||||
sudo -E apt-get clean
|
||||
df -h
|
||||
sudo -E apt update
|
||||
sudo -E apt -y purge azure-cli* docker* ghc* zulu* llvm* firefox google* dotnet* powershell* openjdk* mysql* php* mongodb* dotnet* snap*
|
||||
sudo -E apt -y full-upgrade
|
||||
sudo -E apt -y install ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache clang cmake cpio curl device-tree-compiler flex gawk gcc-multilib g++-multilib gettext genisoimage git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev libssl-dev libtool llvm lrzsz msmtp ninja-build p7zip p7zip-full patch pkgconf python3 python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
|
||||
sudo -E systemctl daemon-reload
|
||||
sudo -E apt -y autoremove --purge
|
||||
sudo -E apt clean
|
||||
sudo -E timedatectl set-timezone "Asia/Shanghai"
|
||||
|
||||
- name: Checkout OpenWrt
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Update feeds
|
||||
run: |
|
||||
./scripts/feeds update -a
|
||||
@@ -98,10 +103,8 @@ jobs:
|
||||
- name: Generate configuration file
|
||||
run: make defconfig
|
||||
|
||||
- name: Make download
|
||||
run: |
|
||||
make download -j8
|
||||
find dl -size -1024c -exec rm -f {} \;
|
||||
- name: Download packages
|
||||
run: make download -j16
|
||||
|
||||
- name: Compile firmware
|
||||
run: |
|
||||
@@ -114,40 +117,30 @@ jobs:
|
||||
du -h --max-depth=1 ./ --exclude=build_dir --exclude=bin
|
||||
du -h --max-depth=1 ./build_dir
|
||||
du -h --max-depth=1 ./bin
|
||||
|
||||
- name: Prepare artifact
|
||||
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) ./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: Deliver buildinfo
|
||||
uses: actions/upload-artifact@v3
|
||||
|
||||
- name: Upload buildinfo
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: OpenWrt_buildinfo
|
||||
path: ./artifact/buildinfo/
|
||||
|
||||
- name: Deliver package
|
||||
uses: actions/upload-artifact@v3
|
||||
- name: Upload package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: OpenWrt_package
|
||||
path: ./artifact/package/
|
||||
|
||||
- name: Deliver firmware
|
||||
uses: actions/upload-artifact@v3
|
||||
- name: Upload firmware
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: OpenWrt_firmware
|
||||
path: ./bin/targets/
|
||||
|
||||
|
||||
- name: Upload release asset
|
||||
if: github.event == 'release'
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.YOURTOKEN }}
|
||||
file: ./artifact/firmware/*
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user