-
Notifications
You must be signed in to change notification settings - Fork 69
153 lines (139 loc) · 4.55 KB
/
multi-arch-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
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
name: Build v2rayA feed
on:
workflow_dispatch:
release:
types:
- published
jobs:
build:
name: Build packages for ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64_cortex-a53
runtime_test: false
- arch: aarch64_cortex-a72
runtime_test: false
- arch: aarch64_generic
runtime_test: true
- arch: arm_arm1176jzf-s_vfp
runtime_test: false
- arch: arm_arm926ej-s
runtime_test: false
- arch: arm_cortex-a15_neon-vfpv4
runtime_test: true
- arch: arm_cortex-a5_vfpv4
runtime_test: false
- arch: arm_cortex-a7
runtime_test: false
- arch: arm_cortex-a7_neon-vfpv4
runtime_test: false
- arch: arm_cortex-a8_vfpv3
runtime_test: false
- arch: arm_cortex-a9
runtime_test: false
- arch: arm_cortex-a9_neon
runtime_test: false
- arch: arm_cortex-a9_vfpv3-d16
runtime_test: false
- arch: arm_fa526
runtime_test: false
- arch: arm_mpcore
runtime_test: false
- arch: arm_xscale
runtime_test: false
- arch: i386_pentium-mmx
runtime_test: true
- arch: i386_pentium4
runtime_test: false
- arch: mips64_octeonplus
runtime_test: false
- arch: mips_24kc
runtime_test: true
- arch: mips_4kec
runtime_test: false
- arch: mips_mips32
runtime_test: false
- arch: mipsel_24kc
runtime_test: false
- arch: mipsel_24kc_24kf
runtime_test: false
- arch: mipsel_74kc
runtime_test: false
- arch: mipsel_mips32
runtime_test: false
- arch: riscv64_riscv64
runtime_test: false
- arch: x86_64
runtime_test: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build
uses: immortalwrt/gh-action-sdk@v4
env:
ARCH: ${{ matrix.arch }}
FEEDNAME: v2raya_ci
PACKAGES: ca-certificates v2fly-geodata v2ray-core xray-core v2raya luci-app-v2raya
NO_REFRESH_CHECK: 1
- name: Generate metadata
env:
BUILD_ARCH: ${{ matrix.arch }}
DEBIAN_FRONTEND: noninteractive
USIGN_KEY: ${{ secrets.USIGN_KEY }}
run: |
sudo -H apt -qq install signify-openbsd
sudo -H chown -R runner:runner bin
./scripts/generate_index.sh
- name: Upload feed
uses: Pendect/action-rsyncer@8e05ffa5c93e5d9c9b167796b26044d2c616b2b9
with:
flags: '-ahvHP'
options: '--delete'
src: 'bin/packages/${{ matrix.arch }}/v2raya_ci/'
dest: '${{ secrets.SF_USER }}@frs.sourceforge.net:/home/frs/project/v2raya/openwrt/${{ matrix.arch }}/'
env:
DEPLOY_KEY: ${{ secrets.SF_KEY }}
- name: Move created packages to project dir
run: cp bin/packages/${{ matrix.arch }}/v2raya_ci/*.ipk . || true
- name: Store packages
uses: actions/upload-artifact@v3
if: github.event_name != 'release'
with:
name: ${{ matrix.arch }}-${{ github.sha }}-packages
path: "*.ipk"
- name: Release packages
uses: svenstaro/upload-release-action@7319e4733ec7a184d739a6f412c40ffc339b69c7
if: github.event_name == 'release'
with:
overwrite: true
repo_token: ${{ github.token }}
tag: ${{ github.ref }}
file: "*.ipk"
file_glob: true
- name: Store logs
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.arch }}-${{ github.sha }}-logs
path: logs/
- name: Remove logs
run: sudo rm -rf logs/ || true
- name: Register QEMU
if: ${{ matrix.runtime_test }}
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static binfmt-support
sudo update-binfmts --import
- name: Build Docker container
if: ${{ matrix.runtime_test }}
run: |
docker build -t test-container --build-arg ARCH .github/workflows/
env:
ARCH: ${{ matrix.arch }}
- name: Test via Docker container
if: ${{ matrix.runtime_test }}
run: |
docker run --rm -v $GITHUB_WORKSPACE:/ci test-container