Skip to content

Commit

Permalink
wire the xpack build to an npm option
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Sep 27, 2024
1 parent e88d1a8 commit dfe94cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/test-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,8 @@ jobs:
run: rm `which pkg-config`*
if: runner.os == 'Windows'
- name: Build with xPack
run: |
npx xpm install
npx xpm install --config native-xpack
npx xpm run prepare --config native-xpack
npx xpm run build --config native-xpack
run: npm install --build-from-source --verbose --foreground-scripts --skip-magickwand-wasm --enable-conan --enable-standalone-build
env:
npm_config_enable_conan: true
C_INCLUDE_PATH: /usr/local/include
CPLUS_INCLUDE_PATH: /usr/local/include
- name: Locate addon file
Expand Down Expand Up @@ -324,11 +319,7 @@ jobs:
- name: Install fonts on Ubuntu
run: apt-get install -y fonts-ubuntu
- name: Build with xPack
run: |
npx xpm install
npx xpm install --config native-xpack
npx xpm run prepare --config native-xpack
npx xpm run build --config native-xpack
run: npm install --build-from-source --verbose --foreground-scripts --skip-magickwand-wasm --enable-conan --enable-standalone-build
env:
npm_config_enable_conan: true
C_INCLUDE_PATH: /usr/local/include
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"linux": "env",
"darwin": "env"
},
"configNative": "{% if env.npm_config_enable_standalone_build %}native-xpack{% else %}native{% endif %}",
"cwd": "{{ path.sep | path_relative: '.' }}",
"commandGenerateImageMagickConfigure": "cmake -S deps/ImageMagick -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMAGICK_HDRI_ENABLE=ON -DMAGICKCORE_QUANTUM_DEPTH=16 -B preconf",
"commandGenerate_magickcore": "node src/deps.js src/deps-stub.cc MagickCore swig/magickcore.i",
Expand All @@ -159,7 +160,7 @@
"commandInstall": "meson install -C {{ properties.buildFolderRelativePath }}",
"commandClean": "meson compile -C {{ properties.buildFolderRelativePath }} --clean",
"verbose": "{% if env.npm_config_loglevel %}--verbose{% endif %}",
"scriptInstallNative": "npx prebuild-install -d {{ properties.verbose }} || ( npx xpm install && xpm run prepare --config native && xpm run build --config native )",
"scriptInstallNative": "npx prebuild-install -d {{ properties.verbose }} || ( npx xpm install && npx xpm install --config {{ properties.configNative }} && xpm run prepare --config {{ properties.configNative }} && xpm run build --config {{ properties.configNative }} )",
"scriptInstallWASM": "npx prebuild-install --platform emscripten --arch wasm32 -d {{ properties.verbose }} || ( npx xpm install && xpm run prepare --config wasm && xpm run build --config wasm )"
},
"actions": {
Expand Down

0 comments on commit dfe94cb

Please sign in to comment.