index.mjs is no longer generated #662
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
native: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Cache conan artifacts | |
id: conan-artifacts | |
uses: actions/cache@v3 | |
with: | |
path: ~/.conan | |
key: ${{ runner.os }}-conan | |
- name: Install fonts on Ubuntu | |
run: | | |
[[ '${{ matrix.platform }}' =~ 'ubuntu' ]] && sudo apt-get install -y fonts-ubuntu || true | |
shell: bash | |
- run: npm install --ignore-scripts | |
- run: npm run deps:download | |
- run: npx @mapbox/node-pre-gyp configure | |
- name: magick_configure.log | |
run: cat build/magick_configure.log | |
shell: bash | |
- run: npx @mapbox/node-pre-gyp build | |
- run: npx mocha test/node.test.ts test/integration.test.ts | |
env: | |
MOCHA_INTEGRATION: node | |
MOCHA_MAGICK_INSTALL: "node -e \"fs.symlinkSync(process.env.GITHUB_WORKSPACE, path.resolve('node_modules', 'magickwand.js'), os.platform() == 'win32' ? 'junction': 'dir')\"" | |
native-light: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache conan artifacts | |
id: conan-artifacts | |
uses: actions/cache@v3 | |
with: | |
path: ~/.conan | |
key: ${{ runner.os }}-conan | |
- name: Install fonts on Ubuntu | |
run: | | |
[[ '${{ matrix.platform }}' =~ 'ubuntu' ]] && sudo apt-get install -y fonts-ubuntu || true | |
shell: bash | |
- run: npm install --ignore-scripts | |
- run: npm run deps:download | |
- name: Configure light version | |
run: | | |
npx @mapbox/node-pre-gyp configure \ | |
--fonts=false --jpeg=true --png=false --tiff=false \ | |
--webp=false --jpeg2000=false --raw=false --openmedia=false \ | |
--brotli=false --h265=false --exr=false --fftw=false --heif=false \ | |
--jbig=true --cms=false --xml=false --gzip=false --zip=false \ | |
--bzip2=true --zstd=false --xz=false --lzma=false --simd=false \ | |
--openmp=true --display=false | |
- name: magick_configure.log | |
run: cat build/magick_configure.log | |
shell: bash | |
- run: npx @mapbox/node-pre-gyp build | |
wasm: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache conan artifacts | |
id: conan-artifacts | |
uses: actions/cache@v3 | |
with: | |
path: ~/.conan | |
key: wasm-conan | |
- run: npm install --ignore-scripts | |
- run: npm run deps:download | |
- run: npx @mapbox/node-pre-gyp configure --nodedir=./emscripten --target_arch=wasm32 --target_platform=emscripten | |
- name: magick_configure.log | |
run: cat build/magick_configure.log | |
shell: bash | |
- run: npx @mapbox/node-pre-gyp build | |
- name: Check size | |
run: | | |
echo "::notice::Default WASM version is $(( `gzip -9c lib/binding/emscripten-wasm32/magickwand.wasm | wc -c` / 1024 )) KBytes gzipped" | |
echo "::notice::Default WASM version is $(( `brotli -9c lib/binding/emscripten-wasm32/magickwand.wasm | wc -c` / 1024 )) KBytes brotlied" | |
- name: Run headless test | |
uses: GabrielBB/xvfb-action@v1 | |
env: | |
MOCHA_INTEGRATION: browser | |
MOCHA_MAGICK_INSTALL: ln -s ${{ github.workspace }} node_modules/magickwand.js | |
with: | |
run: npx mocha test/browser.test.ts test/integration.test.ts | |
wasm-light: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache conan artifacts | |
id: conan-artifacts | |
uses: actions/cache@v3 | |
with: | |
path: ~/.conan | |
key: wasm-light-conan | |
- run: npm install --ignore-scripts | |
- run: npm run deps:download | |
- name: Configure light version | |
run: | | |
npx @mapbox/node-pre-gyp configure \ | |
--nodedir=./emscripten --target_arch=wasm32 --target_platform=emscripten \ | |
--fonts=false --jpeg=false --png=false --tiff=false \ | |
--webp=false --jpeg2000=false --raw=false --openmedia=false \ | |
--brotli=false --h265=false --exr=false --fftw=false --heif=false \ | |
--jbig=false --cms=false --xml=false --gzip=false --zip=false \ | |
--bzip2=false --zstd=false --xz=false --lzma=false --simd=false \ | |
--openmp=false --display=false | |
- name: magick_configure.log | |
run: cat build/magick_configure.log | |
shell: bash | |
- run: npx @mapbox/node-pre-gyp build | |
- name: Check size | |
run: | | |
echo "::notice::Light WASM version is $(( `gzip -9c lib/binding/emscripten-wasm32/magickwand.wasm | wc -c` / 1024 )) KBytes gzipped" | |
echo "::notice::Light WASM version is $(( `brotli -9c lib/binding/emscripten-wasm32/magickwand.wasm | wc -c` / 1024 )) KBytes brotlied" | |
debug-asan: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-22.04] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache conan artifacts | |
id: conan-artifacts | |
uses: actions/cache@v3 | |
with: | |
path: ~/.conan | |
key: asan-conan | |
- name: Install fonts on Ubuntu | |
run: | | |
[[ '${{ matrix.platform }}' =~ 'ubuntu' ]] && sudo apt-get install -y fonts-ubuntu || true | |
shell: bash | |
- run: npm install --ignore-scripts | |
- run: npm run deps:download | |
- run: npx @mapbox/node-pre-gyp configure --debug --enable_asan | |
- name: magick_configure.log | |
run: cat build/magick_configure.log | |
shell: bash | |
- run: npx @mapbox/node-pre-gyp build | |
- 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 |