-
Notifications
You must be signed in to change notification settings - Fork 4
185 lines (177 loc) · 4.64 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
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
name: Build/release
on:
push:
# Sequence of patterns matched against refs/heads
branches:
- 'ci/**'
- 'ci-**'
- 'releases/**'
- 'dev'
- 'master'
- 'test_ci'
- 'feat/**'
tags:
- v0.*.*
- v1.*.*
pull_request:
branches:
- 'dev'
# release:
# # Only use the types keyword to narrow down the activity types that will trigger your workflow.
# types: [published, created, edited]
jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
include:
- os: ubuntu-20.04
arch: x64
type: release
- os: ubuntu-20.04
arch: x64
type: debug
- os: ubuntu-20.04
arch: ia32
type: release
- os: ubuntu-20.04
arch: ia32
type: debug
- os: ubuntu-20.04
arch: arm64
type: release
- os: ubuntu-20.04
arch: arm64
type: debug
- os: ubuntu-20.04
arch: arm
type: release
- os: ubuntu-20.04
arch: arm
type: debug
- os: ubuntu-20.04
arch: mips64
type: release
- os: ubuntu-20.04
arch: mips64
type: debug
- os: ubuntu-20.04
arch: ppc64
type: release
- os: ubuntu-20.04
arch: ppc64
type: debug
test: skip
- os: ubuntu-20.04
arch: riscv64
type: release
- os: ubuntu-20.04
arch: riscv64
type: debug
- os: ubuntu-20.04
arch: loong64
type: release
- os: ubuntu-20.04
arch: loong64
type: debug
test: skip
- os: ubuntu-20.04
arch: loong64ow
type: release
- os: ubuntu-20.04
arch: loong64ow
type: debug
- os: ubuntu-20.04
target: alpine
arch: x64
type: release
- os: ubuntu-20.04
target: alpine
arch: ia32
type: release
- os: ubuntu-20.04
target: alpine
arch: arm64
type: release
- os: ubuntu-20.04
target: android
arch: x64
type: release
test: skip
- os: ubuntu-20.04
target: android
arch: ia32
type: release
test: skip
- os: ubuntu-20.04
target: android
arch: arm64
type: release
test: skip
- os: ubuntu-20.04
target: android
arch: arm
type: release
test: skip
- os: windows-2022
arch: x64
type: release
- os: windows-2022
arch: ia32
type: release
- os: windows-2022
arch: arm64
type: release
test: skip
- os: macos-14
arch: x64
type: release
- os: macos-14
arch: x64
type: debug
- os: macos-14
arch: arm64
type: release
- os: macos-14
arch: arm64
type: debug
- os: macos-14
target: iphone
arch: arm64
type: release
test: skip
- os: macos-14
target: iphone
arch: x64
type: release
test: skip
steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup the environment
shell: bash
run: . ./build_tools/scripts/actions-env.sh
env:
BUILD_TARGET: ${{ matrix.target }}
BUILD_ARCH: ${{ matrix.arch }}
BUILD_TYPE: ${{ matrix.type }}
- name: Build the project
shell: bash
run: |
set -ev
bash build -j2 ${BUILD_ARCH} ${BUILD_TARGET} ${BUILD_TYPE}
tar -zcf ${BUILD_NAME}-${BUILD_TARGET}-${BUILD_ARCH}-${BUILD_TYPE}.tar.gz bin
- name: Release the project
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.BUILD_NAME }}-${{ env.BUILD_TARGET }}-${{ env.BUILD_ARCH }}-${{ env.BUILD_TYPE }}.tar.gz
tag: ${{ env.COMMIT_ID }}
overwrite: true
- name: Test
if: ${{ matrix.test != 'skip' }}
shell: bash
run: . ./.github/workflows/test.sh