Build_zx3000 #12
This file contains hidden or 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: Build_zx3000 | |
| on: | |
| repository_dispatch: | |
| workflow_dispatch: | |
| # schedule: | |
| # - cron: '10 19 * * 5' | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.model }} | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| model: ["zx3000"] | |
| include: | |
| - model: "zx3000" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Free disk space | |
| uses: xiangfeidexiaohuo/actions@2204 | |
| with: | |
| build-mount-path: /home/runner/work/isos-build/isos-build | |
| - name: Initialization environment | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| run: | | |
| sudo timedatectl set-timezone "Asia/Shanghai" | |
| sudo -E apt-get update -y | |
| sudo -E apt-get install -y ack antlr3 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 python3 python3-pyelftools libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev libfuse-dev python3-setuptools g++ file clang nano genisoimage python2 | |
| pip install aligo | |
| sudo -E apt-get clean | |
| git config --global user.name 'GitHub Actions' && git config --global user.email 'noreply@github.com' | |
| df -h | |
| - name: Checkout Main repo | |
| uses: actions/checkout@main | |
| with: | |
| repository: istoreos/zx-mtk-priv | |
| ref: dev_zx | |
| token: ${{ secrets.AC_TOKEN }} | |
| path: openwrt-${{ matrix.model }} | |
| - name: Start build | |
| working-directory: ./openwrt-${{ matrix.model }} | |
| run: | | |
| cd openwrt | |
| ./scripts/gen_config.py target_mt7981_zx-7981ep | |
| cd - | |
| - name: Download package | |
| working-directory: ./openwrt-${{ matrix.model }} | |
| run: | | |
| cd openwrt | |
| make download -j$(nproc) | |
| find dl -size -1024c -exec ls -l {} \; | |
| find dl -size -1024c -exec rm -f {} \; | |
| cd - | |
| - name: Build firmware | |
| working-directory: ./openwrt-${{ matrix.model }} | |
| run: | | |
| cd openwrt | |
| wget http://launchpadlibrarian.net/366014597/make_4.1-9.1ubuntu1_amd64.deb | |
| sudo dpkg -i make_4.1-9.1ubuntu1_amd64.deb | |
| date '+%Y%m%d%H' > version | |
| make -j$(nproc) V=s || make -j1 V=s | |
| cd - | |
| - name: Prepare artifacts | |
| id: prepare_artifacts | |
| run: | | |
| mkdir -p artifacts/${{ matrix.model }} | |
| cp -a openwrt-${{ matrix.model }}/openwrt/bin/targets/mediatek/mt7981/istoreos-mediatek-mt7981-ZX7981EP-squashfs-sysupgrade.bin artifacts/${{ matrix.model }}/istoreos-21.02-zx-7981ep-sysupgrade-$(date '+%Y%m%d%H').bin | |
| - name: Upload Firmware Artifacts | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: ${{ matrix.model }}-firmware | |
| path: artifacts/${{ matrix.model }}/*.* | |