This repository has been archived by the owner on Sep 13, 2024. It is now read-only.
forked from IchthysMaranatha/asterisk-chan-quectel
-
Notifications
You must be signed in to change notification settings - Fork 10
94 lines (91 loc) · 3.12 KB
/
build-owrt.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
#
# Building chan_quectel - OpenWRT
#
name: Build channel - OpenWRT
on:
workflow_dispatch:
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jidicula/[email protected]
with:
clang-format-version: 18
check-path: src
build:
runs-on: ubuntu-latest
needs: formatting-check
continue-on-error: true
strategy:
matrix:
include:
- owrt: 19.07.9
gcc: 7.5.0
ast: 162502
- owrt: 21.02.7
gcc: 8.4.0
ast: 180501
- owrt: 22.03.6
gcc: 11.2.0
ast: 181501
- owrt: 23.05.3
gcc: 12.3.0
ast: 200300
steps:
- name: Checkout actions
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
- uses: ./.github/actions/install-required-packages
- uses: ./.github/actions/install-openwrt-sdk
with:
openwrt-version: ${{ matrix.owrt }}
gcc-version: ${{ matrix.gcc }}
target: x86-64
arch: x86_64
- name: Tweak OpenWRT SDK - use CMake from the host
run: |
rm owrtsdk/x86-64/staging_dir/host/bin/cmake
cp -s $(which cmake) owrtsdk/x86-64/staging_dir/host/bin/cmake
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: asterisk-modules/asterisk-chan-quectel
- name: Configure project
run: cmake -P asterisk-modules/asterisk-chan-quectel/configure-openwrt-makefile.cmake ${{ matrix.ast }}
- name: Generate OpenWRT Makefile
run: cmake -P asterisk-modules/asterisk-chan-quectel/install-openwrt-makefile.cmake
- name: Show CMake variables
working-directory: asterisk-modules/asterisk-chan-quectel/install/openwrt/feed/net/asterisk-chan-quectel/src
run: cat pkg-vars.cmake
- name: Check OpenWRT SDK config file existience
id: check-owrt-cfg
uses: andstor/file-existence-action@v3
with:
files: "owrtsdk/x86-64/.config"
- name: Prepare OpenWRT SDK (symlink)
run: |
owrtsdk=$(cd owrtsdk; pwd)
cd asterisk-modules/asterisk-chan-quectel/install/openwrt
ln -sf ${owrtsdk}/x86-64 x86-64
- name: Prepare OpenWRT SDK (files)
if: steps.check-owrt-cfg.outputs.files_exists != 'true'
working-directory: asterisk-modules/asterisk-chan-quectel/install/openwrt
run: cp feeds-strskx.conf diffconfig build-opk.sh x86-64
- name: Prepare OpenWRT SDK (feeds)
if: steps.check-owrt-cfg.outputs.files_exists == 'true'
working-directory: asterisk-modules/asterisk-chan-quectel/install/openwrt/x86-64
run: ./scripts/feeds install asterisk-chan-quectel
- name: Build OpenWRT packages
working-directory: asterisk-modules/asterisk-chan-quectel/install/openwrt/x86-64
run: ./build-opk.sh V=s
- name: Check OpenWRT package existience
id: check-owrt-ipk
uses: andstor/file-existence-action@v3
with:
files: "asterisk-modules/asterisk-chan-quectel/install/openwrt/x86-64/bin/packages/*/strskx/*.ipk"
fail: true