Skip to content

OpenWrt-CI

OpenWrt-CI #19

Workflow file for this run

#
# <https://github.com/KFERMercer/OpenWrt-CI>
#
# Copyright (C) 2019 P3TERX
#
# Copyright (C) 2020 KFERMercer
#
name: OpenWrt-CI
on:
release:
types: [published]
push:
branches:
- 21.02
watch:
types: [started]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Cache
uses: klever1988/cachewrtbuild@main
with:
ccache: 'true'
- name: Initialization environment
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
sudo -E apt-get -y purge ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mysql* php* android*
sudo -E apt-get update
sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler antlr3 gperf swig
sudo -E apt-get -y autoremove --purge
sudo -E apt-get clean
- name: Download dependencies
run: |
git clone https://github.com/vernesong/OpenClash package/luci-app-openclash --no-checkout --depth=1
cd package/luci-app-openclash
git sparse-checkout init --cone
git sparse-checkout set luci-app-openclash
git checkout
cd ../../
- name: Add passwall
run: |
echo "src-git PWpackages https://github.com/xiaorouji/openwrt-passwall.git;packages" >> feeds.conf.default
echo "src-git PWluci https://github.com/xiaorouji/openwrt-passwall.git;luci" >> feeds.conf.default
- name: Update & Install feeds
run: |
./scripts/feeds update -a
./scripts/feeds install -a
- name: Generate configuration file
run: |
git restore .config
echo -e 'CONFIG_DEVEL=y\nCONFIG_CCACHE=y' >> .config
make defconfig
cat .config
- name: Download package
run: |
make download -j$(nproc)
find dl -size -1024c -exec rm -f {} \;
- name: Build firmware
run: |
echo -e "$(nproc) thread build."
make -j$(nproc) IGNORE_ERRORS="n m" V=s
- name : Upload artifact
uses: actions/upload-artifact@master
with:
name: OpenWrt
path: ./bin/