-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (84 loc) · 3.82 KB
/
build.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
name: Build and Deploy Kismet for OpenWRT
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
RELEASE_VERSION: '23.05.3/bcm27xx/bcm2710'
SDK_TAR: 'openwrt-sdk-23.05.3-bcm27xx-bcm2710_gcc-12.3.0_musl.Linux-x86_64.tar.xz'
SDK_FOLDER: 'openwrt-sdk-23.05.3-bcm27xx-bcm2710_gcc-12.3.0_musl.Linux-x86_64'
SDK_URL: 'https://downloads.openwrt.org/releases/23.05.3/targets/bcm27xx/bcm2710/openwrt-sdk-23.05.3-bcm27xx-bcm2710_gcc-12.3.0_musl.Linux-x86_64.tar.xz'
BUILD_DIR: '${{ github.workspace }}'
SDK_DIR: '${{ github.workspace }}/openwrt-sdk'
KISMET_REPO_DIR: '${{ github.workspace }}/kismet-packages'
KISMET_PACKAGE: '${{ github.workspace }}/kismet-packages/openwrt/kismet-openwrt'
IPK_OUTPUT_DIR: '${{ github.workspace }}/openwrt-sdk/bin/packages/aarch64_cortex-a53/kismet'
CURRENT_REPO_DIR: '${{ github.workspace }}/release-repo'
steps:
- name: Checkout Kismet packaging code
uses: actions/checkout@v4
with:
repository: 'kismetwireless/kismet-packages'
path: ${{ env.KISMET_REPO_DIR }}
- name: Fix kismet-packages 2024
run: |
echo "[*] Add missing libopenssl support..."
sed -i 's/+libsensors/+libsensors +libopenssl/' $KISMET_PACKAGE/kismet/Makefile
- name: Download and prepare OpenWRT SDK
run: |
echo "[*] Downloading SDK..."
wget -q $SDK_URL -P $BUILD_DIR
echo "[*] Prepare folder"
tar xJf $BUILD_DIR/$SDK_TAR -C $BUILD_DIR
mv $BUILD_DIR/$SDK_FOLDER $SDK_DIR
- name: Prepare packages
run: |
echo "[*] Copying feeds configuration and adding Kismet"
cp $SDK_DIR/feeds.conf.default $SDK_DIR/feeds.conf
echo "src-link kismet $KISMET_PACKAGE" >> $SDK_DIR/feeds.conf
echo "[*] Update and install feeds"
cd $SDK_DIR
./scripts/feeds update -a
./scripts/feeds install -a
- name: Build packages
run: |
echo "[*] Update and install feeds"
cd $SDK_DIR
make defconfig
echo 'CONFIG_CCACHE=y' >> ${{ env.SDK_DIR }}/.config
make -j$(nproc) package/kismet/compile
make -j$(nproc) package/kismet-tools/compile
make -j$(nproc) package/kismet-manuf-database/compile
make -j$(nproc) package/kismet-icao-database/compile
make -j$(nproc) package/kismet-capture-sdr-rtl433/compile
make -j$(nproc) package/kismet-capture-sdr-rtlamr/compile
make -j$(nproc) package/kismet-capture-sdr-rtladsb/compile
make -j$(nproc) package/kismet-capture-linux-bluetooth/compile
make -j$(nproc) package/kismet-capture-rz-killerbee/compile
make -j$(nproc) package/kismet-capture-ti-cc2531/compile
make -j$(nproc) package/kismet-capture-linux-wifi/compile
make -j$(nproc) package/kismet-capture-ti-cc2540/compile
make -j$(nproc) package/kismet-capture-nxp-kw41z/compile
make -j$(nproc) package/kismet-capture-nrf-51822/compile
make -j$(nproc) package/kismet-capture-nrf-52840/compile
- name: Checkout current repo
uses: actions/checkout@v4
with:
path: ${{ env.CURRENT_REPO_DIR }}
- name: Move build output
run: |
mkdir -p $CURRENT_REPO_DIR/$RELEASE_VERSION
cp $IPK_OUTPUT_DIR/*.ipk $CURRENT_REPO_DIR/$RELEASE_VERSION
- name: Commit and push compiled packages
run: |
cd $CURRENT_REPO_DIR
git config user.name github-actions
git config user.email github-actions@github.com
git add .
if git diff --staged --quiet; then
echo "No changes to commit."
else
git commit -m "Automated build and deploy of Kismet packages for OpenWRT"
git push
fi