Skip to content

Commit 4cb1cc4

Browse files
committed
chore: support openwrt-24.10
1 parent f4594dc commit 4cb1cc4

File tree

3 files changed

+132
-11
lines changed

3 files changed

+132
-11
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Build Packages (Legacy 21/22)
2+
3+
on:
4+
push:
5+
tags:
6+
- v3.**
7+
8+
jobs:
9+
resolve-legacy-ref:
10+
name: Resolve Legacy Ref
11+
runs-on: ubuntu-latest
12+
outputs:
13+
legacy_ref: ${{ steps.pick.outputs.legacy_ref }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Pick ref from git history
20+
id: pick
21+
shell: bash
22+
run: |
23+
set -euo pipefail
24+
25+
legacy_ref=""
26+
while IFS= read -r commit; do
27+
if git show "${commit}:.github/workflows/release-build.yml" 2>/dev/null | grep -q 'openwrt-21.02' && \
28+
git show "${commit}:.github/workflows/release-build.yml" 2>/dev/null | grep -q 'openwrt-22.03'; then
29+
legacy_ref="${commit}"
30+
break
31+
fi
32+
done < <(git rev-list --first-parent "${GITHUB_SHA}")
33+
34+
if [ -z "${legacy_ref}" ] && git rev-parse "${GITHUB_SHA}^" >/dev/null 2>&1; then
35+
legacy_ref="$(git rev-parse "${GITHUB_SHA}^")"
36+
elif [ -z "${legacy_ref}" ]; then
37+
legacy_ref="${GITHUB_SHA}"
38+
fi
39+
40+
echo "legacy_ref=${legacy_ref}" >> "${GITHUB_OUTPUT}"
41+
echo "Use legacy ref: ${legacy_ref}"
42+
43+
build:
44+
name: Build ${{ matrix.arch }}-${{ matrix.sdk }}
45+
runs-on: ubuntu-latest
46+
needs: resolve-legacy-ref
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
arch:
51+
- aarch64_cortex-a53
52+
- aarch64_cortex-a72
53+
- aarch64_generic
54+
- arm_arm1176jzf-s_vfp
55+
- arm_arm926ej-s
56+
- arm_cortex-a15_neon-vfpv4
57+
- arm_cortex-a5_vfpv4
58+
- arm_cortex-a7
59+
- arm_cortex-a7_neon-vfpv4
60+
- arm_cortex-a8_vfpv3
61+
- arm_cortex-a9
62+
- arm_cortex-a9_neon
63+
- arm_cortex-a9_vfpv3-d16
64+
- arm_fa526
65+
- arm_mpcore
66+
- arm_xscale
67+
- i386_pentium-mmx
68+
- i386_pentium4
69+
- mips64_octeonplus
70+
- mips_24kc
71+
- mips_4kec
72+
- mips_mips32
73+
- mipsel_24kc
74+
- mipsel_24kc_24kf
75+
- mipsel_74kc
76+
- mipsel_mips32
77+
- x86_64
78+
sdk:
79+
- openwrt-21.02
80+
- openwrt-22.03
81+
82+
steps:
83+
- uses: actions/checkout@v4
84+
with:
85+
fetch-depth: 0
86+
ref: ${{ needs.resolve-legacy-ref.outputs.legacy_ref }}
87+
88+
- name: Build
89+
uses: sbwml/openwrt-gh-action-sdk@go1.24
90+
env:
91+
ARCH: ${{ matrix.arch }}-${{ matrix.sdk }}
92+
FEEDNAME: packages_ci
93+
PACKAGES: luci-app-alist
94+
NO_REFRESH_CHECK: true
95+
96+
- name: Upload artifacts
97+
uses: actions/upload-artifact@v4
98+
with:
99+
name: legacy-${{ matrix.arch }}-${{ matrix.sdk }}
100+
path: bin/packages/${{ matrix.arch }}/packages_ci/*.ipk
101+
102+
- name: Create compress files
103+
run: |
104+
tar -zcvf ${{ matrix.sdk }}-${{ matrix.arch }}.tar.gz -C bin/packages/${{ matrix.arch }}/ packages_ci
105+
106+
- name: Upload packages
107+
uses: ncipollo/release-action@v1
108+
with:
109+
name: ${{ github.ref_name }}
110+
token: ${{ secrets.GITHUB_TOKEN }}
111+
allowUpdates: true
112+
replacesArtifacts: true
113+
artifacts: "${{ matrix.sdk }}-${{ matrix.arch }}.tar.gz"

.github/workflows/release-build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build Packages (24.10)
22

33
on:
44
push:
@@ -15,34 +15,38 @@ jobs:
1515
arch:
1616
- aarch64_cortex-a53
1717
- aarch64_cortex-a72
18+
- aarch64_cortex-a76
1819
- aarch64_generic
1920
- arm_arm1176jzf-s_vfp
2021
- arm_arm926ej-s
2122
- arm_cortex-a15_neon-vfpv4
2223
- arm_cortex-a5_vfpv4
2324
- arm_cortex-a7
2425
- arm_cortex-a7_neon-vfpv4
26+
- arm_cortex-a7_vfpv4
2527
- arm_cortex-a8_vfpv3
2628
- arm_cortex-a9
2729
- arm_cortex-a9_neon
2830
- arm_cortex-a9_vfpv3-d16
2931
- arm_fa526
30-
- arm_mpcore
3132
- arm_xscale
3233
- i386_pentium-mmx
3334
- i386_pentium4
35+
- loongarch64_generic
36+
- mips64_mips64r2
3437
- mips64_octeonplus
38+
- mips64el_mips64r2
3539
- mips_24kc
3640
- mips_4kec
3741
- mips_mips32
3842
- mipsel_24kc
3943
- mipsel_24kc_24kf
4044
- mipsel_74kc
4145
- mipsel_mips32
46+
- riscv64_riscv64
4247
- x86_64
4348
sdk:
44-
- openwrt-21.02
45-
- openwrt-22.03
49+
- openwrt-24.10
4650

4751
steps:
4852
- uses: actions/checkout@v4

install.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ RES='\e[0m'
66
# sysinfo
77
if [ -f /etc/openwrt_release ]; then
88
. /etc/openwrt_release
9-
version=$(echo ${DISTRIB_RELEASE%%.*})
10-
platform=$(echo $DISTRIB_ARCH)
11-
ldd_version=$(ldd --version 2>&1 | grep Version | awk '{print $2}')
12-
[ ${ldd_version%.*} = "1.2" ] && sdk=22.03 || sdk=21.02
9+
version=$(echo "$DISTRIB_RELEASE" | sed 's/-.*//')
10+
platform=$(echo "$DISTRIB_ARCH")
11+
case "$version" in
12+
24.10*|24.10) sdk=24.10 ;;
13+
22.03*|22.03) sdk=22.03 ;;
14+
21.02*|21.02) sdk=21.02 ;;
15+
*) sdk=24.10 ;;
16+
esac
1317
else
1418
echo -e "${RED_COLOR}Unknown OpenWRT Version${RES}"
1519
exit 1
@@ -43,9 +47,9 @@ CHECK() (
4347
exit 1;
4448
fi
4549
echo -e "\n${GREEN_COLOR}Checking platform ...${RES}\n"
46-
prebuilt="aarch64_cortex-a53 aarch64_cortex-a72 aarch64_generic arm_arm1176jzf-s_vfp arm_arm926ej-s arm_cortex-a15_neon-vfpv4 arm_cortex-a5_vfpv4 arm_cortex-a7 arm_cortex-a7_neon-vfpv4 arm_cortex-a8_vfpv3 arm_cortex-a9 arm_cortex-a9_neon arm_cortex-a9_vfpv3-d16 arm_fa526 arm_mpcore arm_xscale i386_pentium-mmx i386_pentium4 mips64_octeonplus mips_24kc mips_4kec mips_mips32 mipsel_24kc mipsel_24kc_24kf mipsel_74kc mipsel_mips32 x86_64"
47-
verif=$(expr match "$prebuilt" ".*\($platform\)")
48-
if [[ ! $verif ]]; then
50+
prebuilt="aarch64_cortex-a53 aarch64_cortex-a72 aarch64_cortex-a76 aarch64_generic arm_arm1176jzf-s_vfp arm_arm926ej-s arm_cortex-a15_neon-vfpv4 arm_cortex-a5_vfpv4 arm_cortex-a7 arm_cortex-a7_neon-vfpv4 arm_cortex-a7_vfpv4 arm_cortex-a8_vfpv3 arm_cortex-a9 arm_cortex-a9_neon arm_cortex-a9_vfpv3-d16 arm_fa526 arm_xscale i386_pentium-mmx i386_pentium4 loongarch64_generic mips64_mips64r2 mips64_octeonplus mips64el_mips64r2 mips_24kc mips_4kec mips_mips32 mipsel_24kc mipsel_24kc_24kf mipsel_74kc mipsel_mips32 riscv64_riscv64 x86_64"
51+
verif=$(echo " $prebuilt " | grep -o " $platform " || true)
52+
if [ -z "$verif" ]; then
4953
echo -e "${RED_COLOR}Error! The current \"$platform\" platform is not currently supported.${RES}"
5054
exit 1;
5155
fi

0 commit comments

Comments
 (0)