-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (62 loc) · 1.8 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
name: Test Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
name: Test ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64_generic
target: arm64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
repository: lhuanyun/luci
ref: main
- name: Determine branch name
run: |
BRANCH="main"
echo "Building for $BRANCH"
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
- name: Set package to build
run: |
PACKAGES="luci-app-commands luci-base luci-i18n-commands-zh-cn"
echo "Building $PACKAGES"
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
- name: Build
uses: openwrt/gh-action-sdk@v5
env:
ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
FEEDNAME: packages_ci
- name: Move created packages to project dir
run: |
mkdir -p output
find bin/packages/${{ matrix.arch }}/packages_ci -name 'luci-*.ipk' -exec cp {} output/ \;
- name: Debug - List package contents
run: |
for ipk in output/*.ipk; do
echo "Contents of $ipk:"
ar x "$ipk" data.tar.gz
tar -tvzf data.tar.gz | grep -E 'luci|commands'
echo "Full content of $ipk:"
tar -tvzf data.tar.gz
rm data.tar.gz
done
- name: Store packages
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.arch}}-luci-packages
path: "output/*.ipk"
- name: Store logs
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.arch}}-logs
path: logs/