MayamaTakeshi / sip-lab

A node module that helps to write SIP functional tests
3 stars 2 forks source link

Use customized prebuildify-cross #35

Closed MayamaTakeshi closed 1 year ago

MayamaTakeshi commented 1 year ago

The official prebuildify-cross always will try to pull the image from ghcr.io even if it exists in the local docker repo. Instead, we should modify our fork: https://github.com/MayamaTakeshi/prebuildify-cross to check if the image already exists and if yes, to use it. This will avoid the need to push images to ghcr.io.

MayamaTakeshi commented 1 year ago

I have prepared a PR (https://github.com/prebuild/prebuildify-cross/pull/16) but it might not be accepted so for now, we will install prebuildify-cross from our branch.

Sample usage:

takeshi@takeshi-desktop:~/src/git/MayamaTakeshi/sip-lab$ npx prebuildify-cross -i mayamatakeshi/sip-lab-jammy:latest -i mayamatakeshi/sip-lab-debian11:latest -t 16.0.0 --strip 

The above would generate and overwrite the same file as the platform is the same for both images:

takeshi@takeshi-desktop:~/src/git/MayamaTakeshi/sip-lab$ ls -l prebuilds/linux-x64/*
-rwxr-xr-x 1 takeshi takeshi 1784768 11月 13 08:28 prebuilds/linux-x64/node.abi93.node

but what matters is that it finished without errors.