-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (99 loc) · 4.97 KB
/
Openwrt.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Build for openwrt
on:
repository_dispatch:
workflow_dispatch:
inputs:
tag:
description: 'Tag to release'
required: true
default: 'v0.0.5'
jobs:
openwrt:
name: OpenWrt Package - ${{ matrix.target.arch }}
runs-on: ubuntu-latest
environment: OpenWrt
strategy:
matrix:
target:
- arch: "aarch64_generic"
sdk: "https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-sdk-rockchip-armv8_gcc-11.3.0_musl.Linux-x86_64.tar.xz"
- arch: "arm_cortex-a9"
sdk: "https://downloads.openwrt.org/snapshots/targets/bcm53xx/generic/openwrt-sdk-bcm53xx-generic_gcc-11.3.0_musl_eabi.Linux-x86_64.tar.xz"
- arch: "aarch64_cortex-a53"
sdk: "https://downloads.openwrt.org/snapshots/targets/bcm27xx/bcm2710/openwrt-sdk-bcm27xx-bcm2710_gcc-11.3.0_musl.Linux-x86_64.tar.xz"
- arch: "aarch64_cortex-a72"
sdk: "https://downloads.openwrt.org/snapshots/targets/bcm27xx/bcm2711/openwrt-sdk-bcm27xx-bcm2711_gcc-11.3.0_musl.Linux-x86_64.tar.xz"
- arch: "x86_64"
sdk: "https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-sdk-x86-64_gcc-11.3.0_musl.Linux-x86_64.tar.xz"
- arch: "i386_pentium4"
sdk: "https://downloads.openwrt.org/snapshots/targets/x86/generic/openwrt-sdk-x86-generic_gcc-11.3.0_musl.Linux-x86_64.tar.xz"
- arch: "arm_mpcore"
sdk: "https://downloads.openwrt.org/snapshots/targets/oxnas/ox820/openwrt-sdk-oxnas-ox820_gcc-11.3.0_musl_eabi.Linux-x86_64.tar.xz"
- arch: "arm_cortex-a5_vfpv4"
sdk: "https://downloads.openwrt.org/snapshots/targets/at91/sama5/openwrt-sdk-at91-sama5_gcc-11.3.0_musl_eabi.Linux-x86_64.tar.xz"
- arch: "arm_cortex-a7_neon-vfpv4"
sdk: "https://downloads.openwrt.org/snapshots/targets/ipq40xx/generic/openwrt-sdk-ipq40xx-generic_gcc-11.3.0_musl_eabi.Linux-x86_64.tar.xz"
# - arch: "mipsel_24kc"
# sdk: "https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/openwrt-sdk-ramips-mt7621_gcc-11.3.0_musl.Linux-x86_64.tar.xz"
# - arch: "mips_24kc"
# sdk: "https://archive.openwrt.org/releases/19.07.7/targets/ar71xx/nand/openwrt-sdk-19.07.7-ar71xx-nand_gcc-7.5.0_musl.Linux-x86_64.tar.xz"
steps:
- uses: actions/checkout@v2
- name: Install build requirements
run: |
sudo apt-get update
sudo apt-get install -y build-essential ccache ecj fastjar file g++ gawk \
gettext git java-propose-classpath libelf-dev libncurses5-dev \
libncursesw5-dev libssl-dev python python2.7-dev python3 unzip wget \
python3-distutils python3-setuptools python3-dev rsync subversion \
swig time xsltproc zlib1g-dev
- name: Install OpenWrt SDK
run: |
wget -O openwrt-sdk.tar.xz ${{ matrix.target.sdk }}
xz -q -d openwrt-sdk.tar.xz && tar -xvf openwrt-sdk.tar
mv -f openwrt-sdk-* openwrt-sdk
- name: Build Package
run: |
echo "src-link axumweb $GITHUB_WORKSPACE/openwrt" > openwrt-sdk/feeds.conf
echo 'CONFIG_PACKAGE_axum-web=y
CONFIG_PACKAGE_luci-app-axum-web=y
' >> openwrt-sdk/.config
cd openwrt-sdk
cat feeds.conf.default >> feeds.conf
cat feeds.conf
./scripts/feeds update -a > /dev/null
make defconfig
./scripts/feeds install -d y -f -a
make package/axum-web/compile V=s
make package/luci-app-axum-web/compile V=s
tree bin/packages/
- name: Archive package
uses: actions/upload-artifact@v3
with:
name: axum-web-openwrt-${{ matrix.target.arch }}
path: openwrt-sdk/bin/packages/*/axumweb/axum-web*.ipk
if-no-files-found: error
- name: Archive luci packages
uses: actions/upload-artifact@v3
if: ${{ matrix.target.arch == 'aarch64_generic' }}
with:
name: axum-web-openwrt-${{ matrix.target.arch }}
path: openwrt-sdk/bin/packages/*/axumweb/luci-*.ipk
if-no-files-found: error
- name: Upload package to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
overwrite: true
file: openwrt-sdk/bin/packages/*/axumweb/axum-web*.ipk
tag: "refs/tags/${{ github.event.inputs.tag }}"
- name: Upload luci packages to GitHub Release
uses: svenstaro/upload-release-action@v2
if: ${{ matrix.target.arch == 'aarch64_generic' }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
overwrite: true
file: openwrt-sdk/bin/packages/*/axumweb/luci-*.ipk
tag: "refs/tags/${{ github.event.inputs.tag }}"