Skip to content

Build_gl_mt3000

Build_gl_mt3000 #16

name: Build_gl_mt3000
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: ["gl_mt3000"]
include:
- model: "gl_mt3000"
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: linkease/gl-infra-builder
ref: istore_dev
token: ${{ secrets.AC_TOKEN }}
path: openwrt-${{ matrix.model }}
- name: Start build
working-directory: ./openwrt-${{ matrix.model }}
run: |
python3 setup.py -c configs/config-mt798x-7.6.6.1.yml
cd mt7981
./scripts/gen_config.py target_mt7981_gl-mt3000
cd -
- name: Download package
working-directory: ./openwrt-${{ matrix.model }}
run: |
cd mt7981
mkdir -p dl
cp ../dl/* dl/
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 mt7981
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 }}/mt7981/bin/targets/mediatek/mt7981/istoreos-mediatek-mt7981-glinet_gl-mt3000-squashfs-factory.img artifacts/${{ matrix.model }}/istoreos-21.02-$(date '+%Y%m%d%H')-mt3000-squashfs-factory.img
cp -a openwrt-${{ matrix.model }}/mt7981/bin/targets/mediatek/mt7981/istoreos-mediatek-mt7981-glinet_gl-mt3000-squashfs-sysupgrade.tar artifacts/${{ matrix.model }}/istoreos-21.02-$(date '+%Y%m%d%H')-mt3000-squashfs-sysupgrade.tar
- name: Upload Firmware Artifacts
uses: actions/upload-artifact@main
with:
name: ${{ matrix.model }}-firmware
path: artifacts/${{ matrix.model }}/*.*