forked from Lienol/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (74 loc) · 2.54 KB
/
openwrt-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#
# <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/