-
Notifications
You must be signed in to change notification settings - Fork 0
198 lines (171 loc) · 6.13 KB
/
Copy pathmain.yaml
File metadata and controls
198 lines (171 loc) · 6.13 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
name: Deploy OpenWRT feeds to GiHub Pages
on:
# Runs on pushes targeting the default branch
#push:
# branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
env:
TASK_OUTPUT_MODE: prefixed
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
target:
- target: x86_64
sdk-path: x86/64
sdk-name: x86-64_gcc-14.3.0_musl
- target: aarch64_generic
sdk-path: rockchip/armv8
sdk-name: rockchip-armv8_gcc-14.3.0_musl
- target: aarch64_cortex-a53
sdk-path: sunxi/cortexa53
sdk-name: sunxi-cortexa53_gcc-14.3.0_musl
- target: aarch64_cortex-a72
sdk-path: bcm27xx/bcm2711
sdk-name: bcm27xx-bcm2711_gcc-14.3.0_musl
- target: aarch64_cortex-a76
sdk-path: bcm27xx/bcm2712
sdk-name: bcm27xx-bcm2712_gcc-14.3.0_musl
- target: arm_cortex-a7
sdk-path: mediatek/mt7629
sdk-name: mediatek-mt7629_gcc-14.3.0_musl_eabi
- target: arm_cortex-a7_neon-vfpv4
sdk-path: sunxi/cortexa7
sdk-name: sunxi-cortexa7_gcc-14.3.0_musl_eabi
- target: arm_cortex-a8_vfpv3
sdk-path: sunxi/cortexa8
sdk-name: sunxi-cortexa8_gcc-14.3.0_musl_eabi
- target: arm_cortex-a9
sdk-path: bcm53xx/generic
sdk-name: bcm53xx-generic_gcc-14.3.0_musl_eabi
- target: arm_cortex-a9_neon
sdk-path: imx/cortexa9
sdk-name: imx-cortexa9_gcc-14.3.0_musl_eabi
- target: arm_cortex-a9_vfpv3-d16
sdk-path: mvebu/cortexa9
sdk-name: mvebu-cortexa9_gcc-14.3.0_musl_eabi
- target: arm_cortex-a15_neon-vfpv4
sdk-path: ipq806x/generic
sdk-name: ipq806x-generic_gcc-14.3.0_musl_eabi
- target: arm_arm1176jzf-s_vfp
sdk-path: bcm27xx/bcm2708
sdk-name: bcm27xx-bcm2708_gcc-14.3.0_musl_eabi
- target: mipsel_mips32
sdk-path: bcm47xx/generic
sdk-name: bcm47xx-generic_gcc-14.3.0_musl
- target: riscv64_riscv64
sdk-path: starfive/generic
sdk-name: starfive-generic_gcc-14.3.0_musl
- target: mips64_mips64r2
sdk-path: malta/be64
sdk-name: malta-be64_gcc-14.3.0_musl
- target: mips64el_mips64r2
sdk-path: malta/le64
sdk-name: malta-le64_gcc-14.3.0_musl
steps:
- name: Install required packages
env:
DEBIAN_FRONTEND: noninteractive
DEBIAN_PRIORITY: critical
DEBCONF_NONINTERACTIVE_SEEN: 'true'
DEBCONF_NOWARNINGS: 'yes'
run: |
sudo apt-get -qq update -y
sudo apt-get -qq -o Dpkg::Use-Pty=0 -o APT::Acquire::Retries=10 install -y --no-install-recommends python3-pyelftools
- name: Install Task
uses: go-task/setup-task@v2
- name: Checkout
uses: actions/checkout@v6
- name: Calculate image name and URL
id: owrtsdk
run: |
image_name=openwrt-sdk-25.12.2-${{matrix.target.sdk-name}}.Linux-x86_64
image_url=http://downloads.openwrt.org/releases/25.12.2/targets/${{matrix.target.sdk-path}}
echo "IMAGE_NAME=$image_name" >> $GITHUB_OUTPUT
echo "IMAGE_URL=$image_url" >> $GITHUB_OUTPUT
- name: Download and extract SDK
run: |
wget -q ${{steps.owrtsdk.outputs.IMAGE_URL}}/${{steps.owrtsdk.outputs.IMAGE_NAME}}.tar.zst
tar -xf ${{steps.owrtsdk.outputs.IMAGE_NAME}}.tar.zst
ln -s ${{steps.owrtsdk.outputs.IMAGE_NAME}} openwrt-sdk
- name: Prepare signing key
run: |
mkdir -p signing-key
cat << PEM > signing-key/private-key.pem
${{secrets.APK_BUILDKEY_PRIV}}
PEM
cat << PEM > signing-key/public-key.pem
${{secrets.APK_BUILDKEY_PUB}}
PEM
- name: Build packages
run: task -o ${{ env.TASK_OUTPUT_MODE }} build
- name: Copy packages
run: task -o ${{ env.TASK_OUTPUT_MODE }} package-copy-to-feeds
- name: Upload feed
uses: actions/upload-artifact@v7
with:
name: owrt-feed-${{ matrix.target.target }}
path: feeds/*
if-no-files-found: error
retention-days: 1
compression-level: 0
- name: Upload signing key
if: matrix.target.target == 'x86_64'
uses: actions/upload-artifact@v7
with:
name: signing-key
path: |
signing-key/*
!signing-key/private-key.pem
if-no-files-found: error
retention-days: 1
compression-level: 0
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Install Task
uses: go-task/setup-task@v2
- name: Checkout
id: checkout
uses: actions/checkout@v6
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Download feeds
uses: actions/download-artifact@v8
with:
path: feeds
pattern: owrt-feed-*
merge-multiple: true
- name: Download signing key
uses: actions/download-artifact@v8
with:
path: signing-key
name: signing-key
- name: Prepare feeds
run: task -o ${{ env.TASK_OUTPUT_MODE }} feeds-prepare
env:
GIT_COMMIT: '${{steps.checkout.outputs.commit}}'
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: feeds
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5