Merge remote-tracking branch 'upstream/master' into dev #122
Workflow file for this run
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-dev-CI | |
on: | |
push: | |
branches: | |
- dev | |
# tags: | |
# - 'v*' | |
# schedule: | |
# - cron: 0 20 * * * | |
#release: | |
# types: [published] | |
jobs: | |
build_openwrt: | |
name: Build OpenWrt dev firmware | |
runs-on: ubuntu-22.04 | |
if: github.event.repository.owner.id == github.event.sender.id | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: dev | |
- name: Set variables | |
run: | | |
sudo -E timedatectl set-timezone Asia/Shanghai | |
- name: Space cleanup | |
env: | |
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 -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* adoptopenjdk* mysql* php* mongodb* dotnet* moby* snapd* || true | |
sudo -E apt-get update | |
sudo -E apt 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 gnutls-dev gperf haveged help2man intltool lib32gcc-s1 libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5 libncursesw5-dev libpython3-dev libreadline-dev libssl-dev libtool lld llvm lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 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 yasm jq | |
sudo -E apt-get -y autoremove --purge | |
sudo -E apt-get clean | |
df -h | |
- name: Update feeds | |
run: | | |
./tool.sh feed | |
- name: Generate configuration file | |
run: | | |
rm -f ./.config* | |
cp .github/x86.config ./.config | |
make defconfig | |
- name: Make download | |
run: | | |
make download -j8 || make download -j1 V=s | |
rm -rf $(find ./dl/ -size -1024c) | |
- name: Compile firmware | |
run: | | |
make -j$(nproc) || make -j1 V=s | |
- name: Clean Build Files | |
run: | | |
rm -rf ./staging_dir | |
rm -rf ./build_dir | |
- 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 -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 | |
run: | | |
rm -rf ./bin | |
- name: Deliver buildinfo | |
uses: actions/upload-artifact@v3 | |
with: | |
name: OpenWrt_buildinfo | |
path: ./artifact/buildinfo/ | |
- name: Deliver package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: OpenWrt_package | |
path: ./artifact/package/ | |
- name: Deliver firmware | |
uses: actions/upload-artifact@v3 | |
with: | |
name: OpenWrt_firmware | |
path: ./artifact/firmware/ | |
- name: Push Msg | |
run: | | |
sh .github/push.sh ${{ secrets.CORPID }} ${{ secrets.CORPSECRET }} ${{ secrets.AGENTID }} "x86_64" "dev on ${{ github.ref_name }}" | |