Skip to content

Commit 89631c3

Browse files
authored
feat: upgrade all deps (#132)
1 parent cc953ea commit 89631c3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+5494
-5452
lines changed

.cargo/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[target.i686-pc-windows-msvc]
2-
rustflags = ["-C", "target-feature=+sse4.2"]
2+
rustflags = ["-C", "target-feature=+avx2"]
33
[target.x86_64-unknown-linux-gnu]
4-
rustflags = ["-C", "target-feature=+sse4.2"]
4+
rustflags = ["-C", "target-feature=+avx2"]
55
[target.x86_64-unknown-linux-musl]
66
rustflags = ["-C", "target-feature=-crt-static"]
77
[target.aarch64-unknown-linux-gnu]

.github/workflows/CI.yml

Lines changed: 105 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,30 @@ jobs:
4545
python -m pip install meson
4646
yarn workspace @napi-rs/image build --target x86_64-pc-windows-msvc --features with_simd
4747
target: x86_64-pc-windows-msvc
48+
- host: macos-latest
49+
target: aarch64-pc-windows-msvc
50+
setup: |
51+
brew update
52+
brew install meson llvm
53+
build: |
54+
export XWIN_CACHE_DIR="$(pwd)/.xwin"
55+
export XWIN_ARCH=aarch64
56+
export PATH="$(brew --prefix llvm)/bin:$PATH"
57+
clang --version
58+
CFLAGS="-mneon /FIintrin.h" yarn workspace @napi-rs/image build -x --features with_simd --target aarch64-pc-windows-msvc
4859
- host: macos-latest
4960
setup: |
5061
brew update
5162
brew install meson llvm
5263
build: |
5364
export XWIN_CACHE_DIR="$(pwd)/.xwin"
5465
export XWIN_ARCH=x86
55-
export CFLAGS="-mavx2 -mpclmul"
66+
export CFLAGS="-mavx2 -mpclmul /FIintrin.h"
5667
export CXXFLAGS="-mavx2 -mpclmul"
5768
export CARGO_PROFILE_RELEASE_LTO="false"
5869
export PATH="$(brew --prefix llvm)/bin:$PATH"
5970
clang --version
60-
CARGO="cargo-xwin" yarn workspace @napi-rs/image build --features with_simd --target i686-pc-windows-msvc
71+
yarn workspace @napi-rs/image build -x --features with_simd --target i686-pc-windows-msvc
6172
target: i686-pc-windows-msvc
6273
- host: ubuntu-latest
6374
target: x86_64-unknown-linux-gnu
@@ -74,17 +85,16 @@ jobs:
7485
chmod -R 777 target
7586
- host: ubuntu-latest
7687
target: x86_64-unknown-linux-musl
77-
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
88+
docker: ghcr.io/brooooooklyn/canvas/musl-builder:lts
7889
build: >-
7990
set -e &&
80-
unset RUSTFLAGS &&
81-
unset CC &&
82-
unset CXX &&
83-
apk add --update --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing --no-cache perl nasm aom-dev meson &&
84-
export LIB_AOM_STATIC_LIB_PATH=/usr/lib &&
85-
export LIB_AOM_INCLUDE_PATH=/usr/include/aom/aom &&
86-
export LIB_AOM_PKG_CONFIG_PATH=/usr/lib/pkgconfig &&
87-
yarn workspace @napi-rs/image build --target x86_64-unknown-linux-musl --features with_simd &&
91+
apk add libc++-dev libc++-static &&
92+
cp /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/*.o /usr/lib/ &&
93+
cp /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/libgcc.a /usr/lib/ &&
94+
cp /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/libgcc_eh.a /usr/lib/ &&
95+
wget "https://github.com/Brooooooklyn/canvas/releases/download/libcxxabi-$(cat llvm-version)/libc++abi-x86_64.a" &&
96+
mv libc++abi-x86_64.a /usr/lib/libc++abi.a &&
97+
CXXFLAGS="-std=c++20 -stdlib=libc++ -static -fPIC -fno-cxx-exceptions -fno-exceptions -I/usr/include/c++/v1" CC=clang CXX=clang++ yarn workspace @napi-rs/image build --target x86_64-unknown-linux-musl --features with_simd &&
8898
chmod -R 777 target
8999
- host: macos-latest
90100
target: aarch64-apple-darwin
@@ -113,15 +123,6 @@ jobs:
113123
export CXXFLAGS="-fuse-ld=lld -mcrc -B/usr/aarch64-unknown-linux-gnu/lib/gcc/aarch64-unknown-linux-gnu/4.8.5 --sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot -L/usr/aarch64-unknown-linux-gnu/lib/llvm-18/lib -stdlib=libc++" &&
114124
yarn workspace @napi-rs/image build --features with_simd --target aarch64-unknown-linux-gnu &&
115125
chmod -R 777 target
116-
- host: ubuntu-latest
117-
target: armv7-unknown-linux-gnueabihf
118-
setup: |
119-
sudo apt-get update
120-
sudo apt-get install meson gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
121-
build: |
122-
export CC="arm-linux-gnueabihf-gcc"
123-
export CARGO_CFG_TARGET_FEATURE="neon"
124-
yarn workspace @napi-rs/image build --target armv7-unknown-linux-gnueabihf --features oxipng_libdeflater --use-napi-cross
125126
- host: ubuntu-latest
126127
target: aarch64-linux-android
127128
build: |
@@ -153,7 +154,7 @@ jobs:
153154
export CMAKE_BUILD_PARALLEL_LEVEL=2
154155
yarn workspace @napi-rs/image build --target wasm32-wasip1-threads
155156
156-
name: stable - ${{ matrix.settings.target }} - node@20
157+
name: stable - ${{ matrix.settings.target }} - node@22
157158
runs-on: ${{ matrix.settings.host }}
158159
env:
159160
RUST_TARGET: ${{ matrix.settings.target }}
@@ -162,14 +163,14 @@ jobs:
162163
- name: Setup node
163164
uses: actions/setup-node@v4
164165
with:
165-
node-version: 20
166+
node-version: 22
166167
cache: yarn
167168
- name: Setup nasm
168169
uses: ilammy/setup-nasm@v1
169170
if: matrix.settings.target == 'x86_64-pc-windows-msvc' || matrix.settings.target == 'x86_64-apple-darwin' || matrix.settings.target == 'i686-pc-windows-msvc'
170171
- name: Install cargo-xwin
171172
uses: taiki-e/install-action@v2
172-
if: matrix.settings.target == 'i686-pc-windows-msvc'
173+
if: matrix.settings.target == 'i686-pc-windows-msvc' || matrix.settings.target == 'aarch64-pc-windows-msvc'
173174
env:
174175
GITHUB_TOKEN: ${{ github.token }}
175176
with:
@@ -194,11 +195,16 @@ jobs:
194195
- uses: goto-bus-stop/setup-zig@v2
195196
if: ${{ contains(matrix.settings.target, 'musl') }}
196197
with:
197-
version: 0.13.0
198+
version: 0.14.1
198199
- name: Setup toolchain
199200
run: ${{ matrix.settings.setup }}
200201
if: ${{ matrix.settings.setup }}
201202
shell: bash
203+
- name: Install LLVM and Clang
204+
uses: KyleMayes/install-llvm-action@v2
205+
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
206+
with:
207+
version: '20'
202208
- name: Install dependencies
203209
run: yarn install --immutable --mode=skip-build
204210
- name: Build in docker
@@ -220,22 +226,75 @@ jobs:
220226
packages/*/*.node
221227
packages/*/*.wasm
222228
if-no-files-found: error
229+
230+
231+
build-armv7-linux-gnueabihf:
232+
name: Build armv7-unknown-linux-gnueabihf
233+
runs-on: ubuntu-latest
234+
container:
235+
image: debian:buster
236+
steps:
237+
- name: Setup tools
238+
run: |
239+
apt-get update
240+
apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libatomic1-armhf-cross git build-essential cmake ninja-build wget curl gnupg
241+
echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-18 main" >> /etc/apt/sources.list
242+
echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-18 main" >> /etc/apt/sources.list
243+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
244+
apt-get update
245+
apt-get install -y clang-18
246+
ln -s /usr/bin/clang-18 /usr/bin/clang
247+
ln -s /usr/bin/clang++-18 /usr/bin/clang++
248+
- uses: actions/checkout@v4
249+
with:
250+
submodules: true
251+
- name: Setup cmake
252+
uses: jwlawson/actions-setup-cmake@v2
253+
with:
254+
cmake-version: '3.x'
255+
- name: Setup node
256+
uses: actions/setup-node@v4
257+
with:
258+
node-version: 22
259+
- name: Install
260+
uses: dtolnay/rust-toolchain@stable
261+
with:
262+
toolchain: stable
263+
targets: 'armv7-unknown-linux-gnueabihf'
264+
- name: Install dependencies
265+
run: |
266+
corepack enable
267+
yarn install --immutable --mode=skip-build
268+
- name: Config git
269+
run: git config --global --add safe.directory "$(pwd)"
270+
- name: Build
271+
run: |
272+
export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
273+
yarn workspace @napi-rs/image build --target armv7-unknown-linux-gnueabihf --features oxipng_libdeflater
274+
- name: Upload artifact
275+
uses: actions/upload-artifact@v4
276+
with:
277+
name: bindings-armv7-unknown-linux-gnueabihf
278+
path: |
279+
packages/*/*.node
280+
if-no-files-found: error
281+
223282
build-freebsd:
224283
runs-on: ubuntu-latest
225284
name: Build FreeBSD
226285
steps:
227286
- uses: actions/checkout@v4
228287
- name: Build
229288
id: build
230-
uses: cross-platform-actions/action@v0.26.0
289+
uses: cross-platform-actions/action@v0.28.0
231290
env:
232291
DEBUG: 'napi:*'
233292
RUSTUP_HOME: /home/runner/rustup
234293
CARGO_HOME: /home/runner/cargo
235294
RUSTUP_IO_THREADS: 1
236295
with:
237296
operating_system: freebsd
238-
version: '14.0'
297+
version: '14.2'
239298
memory: 8G
240299
cpu_count: 3
241300
environment_variables: 'DEBUG RUSTUP_IO_THREADS'
@@ -284,8 +343,8 @@ jobs:
284343
- host: macos-latest
285344
target: aarch64-apple-darwin
286345
node:
287-
- '18'
288346
- '20'
347+
- '22'
289348
runs-on: ${{ matrix.settings.host }}
290349
steps:
291350
- uses: actions/checkout@v4
@@ -310,6 +369,8 @@ jobs:
310369
with:
311370
name: bindings-${{ matrix.settings.target }}
312371
path: artifacts
372+
- name: Create npm dirs
373+
run: yarn workspace @napi-rs/image napi create-npm-dirs
313374
- name: Move artifacts
314375
run: yarn artifacts
315376
shell: bash
@@ -332,8 +393,8 @@ jobs:
332393
fail-fast: false
333394
matrix:
334395
node:
335-
- '18'
336396
- '20'
397+
- '22'
337398
runs-on: ubuntu-latest
338399
steps:
339400
- uses: actions/checkout@v4
@@ -349,6 +410,8 @@ jobs:
349410
with:
350411
name: bindings-x86_64-unknown-linux-gnu
351412
path: artifacts
413+
- name: Create npm dirs
414+
run: yarn workspace @napi-rs/image napi create-npm-dirs
352415
- name: Move artifacts
353416
run: yarn artifacts
354417
shell: bash
@@ -365,8 +428,8 @@ jobs:
365428
fail-fast: false
366429
matrix:
367430
node:
368-
- '18'
369431
- '20'
432+
- '22'
370433
runs-on: ubuntu-latest
371434
steps:
372435
- uses: actions/checkout@v4
@@ -382,6 +445,8 @@ jobs:
382445
with:
383446
name: bindings-x86_64-unknown-linux-musl
384447
path: artifacts
448+
- name: Create npm dirs
449+
run: yarn workspace @napi-rs/image napi create-npm-dirs
385450
- name: Move artifacts
386451
run: yarn artifacts
387452
shell: bash
@@ -409,6 +474,8 @@ jobs:
409474
path: artifacts
410475
- name: Install dependencies
411476
run: yarn install --immutable --mode=skip-build
477+
- name: Create npm dirs
478+
run: yarn workspace @napi-rs/image napi create-npm-dirs
412479
- name: Move artifacts
413480
run: yarn artifacts
414481
shell: bash
@@ -429,13 +496,13 @@ jobs:
429496
test-linux-arm-gnueabihf-binding:
430497
name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }}
431498
needs:
432-
- build
499+
- build-armv7-linux-gnueabihf
433500
strategy:
434501
fail-fast: false
435502
matrix:
436503
node:
437-
- '18'
438504
- '20'
505+
- '22'
439506
runs-on: ubuntu-latest
440507
steps:
441508
- uses: actions/checkout@v4
@@ -446,6 +513,8 @@ jobs:
446513
path: artifacts
447514
- name: Install dependencies
448515
run: yarn install --immutable --mode=skip-build
516+
- name: Create npm dirs
517+
run: yarn workspace @napi-rs/image napi create-npm-dirs
449518
- name: Move artifacts
450519
run: yarn artifacts
451520
shell: bash
@@ -477,6 +546,8 @@ jobs:
477546
path: artifacts
478547
- name: Install dependencies
479548
run: yarn install --immutable --mode=skip-build
549+
- name: Create npm dirs
550+
run: yarn workspace @napi-rs/image napi create-npm-dirs
480551
- name: Move artifacts
481552
run: yarn artifacts
482553
shell: bash
@@ -504,10 +575,12 @@ jobs:
504575
- name: Setup node
505576
uses: actions/setup-node@v4
506577
with:
507-
node-version: 20
578+
node-version: 22
508579
cache: yarn
509580
- name: Install dependencies
510581
run: yarn install --immutable --mode=skip-build
582+
- name: Create npm dirs
583+
run: yarn workspace @napi-rs/image napi create-npm-dirs
511584
- name: Download all artifacts
512585
uses: actions/download-artifact@v4
513586
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ nasa-small.*
2424
output-overlay-png.png
2525
output-debian.jpeg
2626
*.wasm
27+
packages/binding/npm

0 commit comments

Comments
 (0)