Skip to content

Build_n1

Build_n1 #3

Workflow file for this run

name: Build_n1
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: ["n1"]
include:
- model: "n1"
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
sudo -E apt-get clean
git config --global user.name 'GitHub Actions' && git config --global user.email 'noreply@github.com'
- name: Clone source code
env:
REPO_URL: https://github.com/istoreos/istoreos
REPO_BRANCH: istoreos-22.03
run: |
git clone https://github.com/xiangfeidexiaohuo/isos-build.git
git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt
cd openwrt
cp -f ../isos-build/diy/op/isos*.sh ./
chmod +x ./isos1.sh && ./isos1.sh
- name: Update & Install feeds & Config
working-directory: ./openwrt
run: |
./scripts/feeds update -a
./scripts/feeds install -a
chmod +x ./isos2.sh && ./isos2.sh
mv ../isos-build/diy/n1.config ./.config
make defconfig
- name: Download package
working-directory: ./openwrt
run: |
make download -j$(nproc)
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
- name: Build firmware
working-directory: ./openwrt
run: |
date '+%Y%m%d%H' > version
make -j$(nproc) V=s
- name: Prepare artifacts
id: prepare_artifacts
run: |
mkdir -p artifacts/${{ matrix.model }}
cp -a openwrt/.config artifacts/${{ matrix.model }}/n1.config
cp -a openwrt/bin/targets/amlogic/meson/istoreos-amlogic-meson-phicomm_n1-squashfs-sysupgrade.img.gz artifacts/${{ matrix.model }}/istoreos-22.03-$(date '+%Y%m%d%H')-phicomm_n1-squashfs-sysupgrade.img.gz
- name: Upload Firmware Artifacts
uses: actions/upload-artifact@main
with:
name: ${{ matrix.model }}-firmware
path: artifacts/${{ matrix.model }}/*.*