-
-
Notifications
You must be signed in to change notification settings - Fork 35
192 lines (150 loc) · 4.17 KB
/
build.yml
File metadata and controls
192 lines (150 loc) · 4.17 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
name: build
on:
push:
branches:
- master
paths-ignore:
- README.md
- ChangeLog.md
- docs/**
pull_request:
branches:
- master
paths-ignore:
- README.md
- ChangeLog.md
- docs/**
jobs:
build_linux:
runs-on: ubuntu-22.04
env:
DOCKER_IMAGE: ubuntu-14.04
BUILD_TYPE: Release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build docker image
run: ci/docker/build_image.sh
- name: Install apps
run: ci/linux_install.sh
- name: Build
run: ci/linux_build.sh
- name: Test
run: ci/linux_test.sh
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: packages-linux
if-no-files-found: error
path: |
ci_build/${{ env.BUILD_TYPE }}/*.deb
ci_build/${{ env.BUILD_TYPE }}/*.tar.xz
build_macos:
strategy:
fail-fast: false
matrix:
os:
- macos-26
- macos-15-intel
runs-on: ${{ matrix.os }}
env:
BUILD_TYPE: Release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Increase yarn timeout
run: yarn config set network-timeout 300000
- name: Install apps
run: ci/macos_install.sh
- name: Build
run: ci/macos_build.sh
- name: Test
run: ci/macos_test.sh
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.os }}
if-no-files-found: error
path: |
ci_build/${{ env.BUILD_TYPE }}/*.fb2k-component
ci_build/${{ env.BUILD_TYPE }}/*.zip
build_windows:
runs-on: windows-2022
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
arch:
- Win32
- x64
env:
BUILD_TYPE: Release
BUILD_ARCH: ${{ matrix.arch }}
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Install apps
run: cmd /c ci\windows_install.cmd
- name: Build
run: cmd /c ci\windows_build.cmd
- name: Test
run: cmd /c ci\windows_test.cmd
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: 'packages-windows-${{ matrix.arch }}'
if-no-files-found: error
path: 'ci_build\${{ env.BUILD_TYPE }}\*.fb2k-component'
build_universal_fb2k_package:
runs-on: macos-26
needs:
- build_macos
- build_windows
steps:
- name: Download Windows packages
uses: actions/download-artifact@v4
with:
pattern: packages-windows-*
merge-multiple: true
path: input
- name: Download macOS packages
uses: actions/download-artifact@v4
with:
pattern: packages-macos-*
merge-multiple: true
path: input
- name: Build package
run: |
pkg_ext=fb2k-component
pkg_windows_x32=$(pwd)/input/*-windows-x86.$pkg_ext
pkg_windows_x64=$(pwd)/input/*-windows-x86_64.$pkg_ext
pkg_mac_arm=$(pwd)/input/*-macos-arm64.$pkg_ext
pkg_mac_x64=$(pwd)/input/*-macos-x86_64.$pkg_ext
pkg_universal=$(pwd)/output/$(basename $pkg_mac_arm -macos-arm64.$pkg_ext).$pkg_ext
mac_binary=mac/foo_beefweb.component/Contents/MacOS/foo_beefweb
mkdir -p work/lipo work/pkg output
unzip -d work/lipo/arm -j $pkg_mac_arm $mac_binary
unzip -d work/lipo/x64 -j $pkg_mac_x64 $mac_binary
unzip -d work/pkg $pkg_mac_arm
unzip -d work/pkg $pkg_windows_x32
unzip -d work/pkg $pkg_windows_x64 x64/foo_beefweb.dll
lipo -create work/lipo/arm/foo_beefweb work/lipo/x64/foo_beefweb \
-output work/pkg/$mac_binary
lipo -info work/pkg/$mac_binary
(cd work/pkg && zip -r -9 $pkg_universal *)
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: packages-fb2k-universal
if-no-files-found: error
path: output/*.fb2k-component