forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 17
73 lines (64 loc) · 2.34 KB
/
foss_snapshot.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
name: build foss snapshot image
on: workflow_dispatch
env:
SOURCE_REPO: "https://github.com/openwrt/openwrt.git"
SOURCE_BRANCH: "main"
SCRIPT_REPO: "https://github.com/arix00/openwrt-mx4300.git"
SCRIPT_BRANCH: "build"
SCRIPT_INIT: "init_build.sh"
BUILD_TYPE: "foss"
BUILD_VER: "snapshot"
jobs:
build:
name: build foss snapshot image
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install packages
run: |
sudo apt-get update && \
sudo apt-get install -y \
build-essential \
clang \
flex \
bison \
g++ \
gawk \
gcc-multilib \
g++-multilib \
gettext \
git \
libncurses-dev \
libssl-dev \
python3-setuptools \
rsync \
unzip \
zlib1g-dev \
file \
jq \
wget && \
sudo apt-get clean
- name: Prepare source code
run: |
git clone $SOURCE_REPO --branch $SOURCE_BRANCH .
git clone $SCRIPT_REPO --branch $SCRIPT_BRANCH $SCRIPT_BRANCH
cp $SCRIPT_BRANCH/script/*.sh .
rm -rf $SCRIPT_BRANCH
sh $SCRIPT_INIT $BUILD_TYPE $BUILD_VER
- name: Update feeds
run: scripts/feeds update -a && scripts/feeds install -a
- name: Generate config
run: sh genconfig_foss.sh $BUILD_VER
- name: Build firmware images
run: make -j$(($(nproc)+1)) world
- name: Check build version
run: cat `find staging_dir -name banner`
- name: Prepare release
run: sh release_foss.sh $BUILD_VER
- name: Release
uses: ncipollo/release-action@v1
with:
tag: qualcommax-${{ env.BUILD_TYPE }}-${{ env.BUILD_VER }}-${{ env.build_id }}
artifacts: release/*
bodyFile: note.md