-
-
Notifications
You must be signed in to change notification settings - Fork 5
233 lines (200 loc) · 7.04 KB
/
test-dev.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
name: Development CI
on:
workflow_dispatch:
push:
branches: main
paths-ignore:
- 'CHANGELOG.md'
- 'README.md'
pull_request:
branches: main
paths-ignore:
- 'CHANGELOG.md'
- 'README.md'
jobs:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install the dependencies
run: npm install --skip-magickwand-native --skip-magickwand-wasm
- name: Lint
run: npm run lint
swig:
name: Generate the SWIG wrappers
uses:
./.github/workflows/swig.yml
native:
needs: swig
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- macos-13
- macos-latest
- windows-latest
dependencies:
- system
- conan
uses:
./.github/workflows/build.yml
with:
native: true
wasm: false
platform: ${{ matrix.platform }}
dependencies: ${{ matrix.dependencies }}
integration: node
install_cmd: "node -e \"fs.symlinkSync(process.env.GITHUB_WORKSPACE, path.resolve('node_modules', 'magickwand.js'), os.platform() == 'win32' ? 'junction': 'dir')\""
light: ${{ matrix.dependencies == 'conan' }}
extralight: ${{ matrix.dependencies == 'system' && startsWith(matrix.platform, 'windows') }}
conan_id: native
native-light:
needs: swig
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
uses:
./.github/workflows/build.yml
with:
native: true
wasm: false
platform: ${{ matrix.platform }}
dependencies: conan
integration: ''
install_cmd: ''
light: true
extra_npm_opts: '--disable-fonts --enable-jpeg --enable-png --disable-tiff --disable-webp --disable-jpeg2000 --disable-raw --disable-openmedia --disable-brotli --disable-h265 --disable-exr --disable-fftw --disable-heif --disable-color --disable-xml --enable-gzip --disable-zip --disable-bzip2 --disable-zstd --disable-xz --disable-lzma --disable-simd --disable-openmp --disable-display --disable-jbig --disable-cairo'
conan_id: native-light
native-xpack:
needs: swig
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- macos-13
- macos-latest
- windows-latest
uses:
./.github/workflows/build.yml
with:
native: true
wasm: false
platform: ${{ matrix.platform }}
dependencies: conan
integration: node
install_cmd: "node -e \"fs.symlinkSync(process.env.GITHUB_WORKSPACE, path.resolve('node_modules', 'magickwand.js'), os.platform() == 'win32' ? 'junction': 'dir')\""
extra_npm_opts: '--enable-standalone-build'
conan_id: native-xpack
native-xpack-minimal-container:
needs: swig
uses:
./.github/workflows/build.yml
with:
native: true
wasm: false
platform: ubuntu-latest
dependencies: conan
integration: node
install_cmd: "node -e \"fs.symlinkSync(process.env.GITHUB_WORKSPACE, path.resolve('node_modules', 'magickwand.js'), os.platform() == 'win32' ? 'junction': 'dir')\""
extra_npm_opts: '--enable-standalone-build'
container: ubuntu:latest
container_init: 'apt-get update && apt-get install -y libc6-dev libstdc++-11-dev libgcc-11-dev binutils ca-certificates fonts-ubuntu'
conan_id: native-xpack-minimal-container
wasm:
needs: swig
uses:
./.github/workflows/build.yml
with:
native: false
wasm: true
platform: ubuntu-latest
dependencies: conan
integration: browser
install_cmd: "node -e \"fs.symlinkSync(process.env.GITHUB_WORKSPACE, path.resolve('node_modules', 'magickwand.js'), os.platform() == 'win32' ? 'junction': 'dir')\""
conan_id: wasm
wasm-light:
needs: swig
uses:
./.github/workflows/build.yml
with:
native: false
wasm: true
platform: ubuntu-latest
dependencies: conan
integration: browser
install_cmd: "node -e \"fs.symlinkSync(process.env.GITHUB_WORKSPACE, path.resolve('node_modules', 'magickwand.js'), os.platform() == 'win32' ? 'junction': 'dir')\""
light: true
extra_npm_opts: '--disable-fonts --enable-jpeg --enable-png --disable-tiff --disable-webp --disable-jpeg2000 --disable-raw --disable-openmedia --disable-brotli --disable-h265 --disable-exr --disable-fftw --disable-heif --disable-color --disable-xml --enable-gzip --disable-zip --disable-bzip2 --disable-zstd --disable-xz --disable-lzma --disable-simd --disable-openmp --disable-display --disable-jbig --disable-cairo'
conan_id: wasm-light
external:
needs: swig
uses:
./.github/workflows/build.yml
with:
native: true
wasm: false
platform: ubuntu-22.04
dependencies: conan
integration: node
install_cmd: "node -e \"fs.symlinkSync(process.env.GITHUB_WORKSPACE, path.resolve('node_modules', 'magickwand.js'), os.platform() == 'win32' ? 'junction': 'dir')\""
container_init: 'cd deps/ImageMagick && sh configure --prefix /usr && make -j4 && sudo make install'
extra_npm_opts: '--enable-external --enable-shared --cpp-args="`pkg-config --cflags Magick++`" --cpp-link-args="`pkg-config --libs Magick++`"'
conan_id: external
debug-asan:
runs-on: ubuntu-22.04
needs: swig
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Download the SWIG-generated wrappers
uses: actions/download-artifact@v4
with:
name: swig
path: swig
- name: Install the xpacks
run: |
npm install xpm
npx xpm install
- name: Get conan home
shell: bash
id: conan_home
run: |
npx xpm run -q conan -- version
echo path=`npx xpm run -q conan -- config home` >> $GITHUB_OUTPUT
- name: Cache conan artifacts
id: conan-artifacts
uses: actions/cache@v4
with:
path: ${{ steps.conan_home.outputs.path }}
key: linux-debug-asan-conan
- name: Install fonts on Ubuntu
run: sudo apt-get install -y fonts-ubuntu || true
- name: Install the dependencies
run: npm install --skip-magickwand-wasm --skip-magickwand-native
- name: Build with ASAN
run: |
npx xpm install
npx xpm run prepare --config native-debug
npx xpm run configure --config native-debug -- -Db_sanitize=address
npx xpm run build --config native-debug
env:
npm_config_enable_conan: true
- run: node node_modules/mocha/bin/mocha.js -i -g Security --repeats 1000 test/node.test.ts
env:
LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libasan.so.6
LSAN_OPTIONS: suppressions=${{ github.workspace }}/test/napi-leaks-suppression.txt