Created
November 7, 2018 12:05
-
-
Save MarkTiedemann/4f8d17aacad69471d94b968e375eb800 to your computer and use it in GitHub Desktop.
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
FROM microsoft/nanoserver:1709 | |
ADD https://nodejs.org/dist/v10.12.0/win-x64/node.exe C:/Windows/system32/node.exe | |
COPY prebuilt/addon_x64.node addon_x64.node |
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
@echo off | |
docker build --rm --tag 1709_x64 --file 1709_x64.Dockerfile . | |
docker build --rm --tag sac2016_x64 --file sac2016_x64.Dockerfile . | |
docker run --rm 1709_x64 node --print --eval require('./addon_x64.node').byId(1) | |
docker run --rm sac2016_x64 node --print --eval require('./addon_x64.node').byId(1) |
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
@echo off | |
:: install | |
nvm install 10.12.0 64 | |
nvm install 10.12.0 32 | |
nvm install 9.11.2 64 | |
nvm install 9.11.2 32 | |
nvm install 8.12.0 64 | |
nvm install 8.12.0 32 | |
:: nvm use 10.12.0 64 | |
:: cmd /c "npm install --global --production windows-build-tools --add-python-to-path --vs2015" | |
:: cmd /c "npm install --global --production windows-build-tools --add-python-to-path --vs2017" | |
:: clean | |
rmdir /q /s prebuilt | |
mkdir prebuilt | |
:: build | |
nvm use 10.12.0 64 | |
cmd /c "npm install node-gyp@3.8.0 --global && node-gyp clean configure build --arch x64 --msvs_version 2017 --loglevel warn --jobs 2" | |
copy build\Release\addon.node prebuilt\addon_x64.node | |
nvm use 10.12.0 32 | |
cmd /c "npm install node-gyp@3.8.0 --global && node-gyp clean configure build --arch ia32 --msvs_version 2017 --loglevel warn --jobs 2" | |
copy build\Release\addon.node prebuilt\addon_ia32.node | |
:: test | |
nvm use 10.12.0 64 | |
cmd /c "node --print --eval require('./prebuilt/addon_x64.node').byId(1)" | |
nvm use 10.12.0 32 | |
cmd /c "node --print --eval require('./prebuilt/addon_ia32.node').byId(1)" | |
nvm use 9.11.2 64 | |
cmd /c "node --no-warnings --print --eval require('./prebuilt/addon_x64.node').byId(1)" | |
nvm use 9.11.2 32 | |
cmd /c "node --no-warnings --print --eval require('./prebuilt/addon_ia32.node').byId(1)" | |
nvm use 8.12.0 64 | |
cmd /c "node --no-warnings --print --eval require('./prebuilt/addon_x64.node').byId(1)" | |
nvm use 8.12.0 32 | |
cmd /c "node --no-warnings --print --eval require('./prebuilt/addon_ia32.node').byId(1)" |
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
FROM microsoft/nanoserver:sac2016 | |
ADD https://nodejs.org/dist/v10.12.0/win-x64/node.exe C:/Windows/system32/node.exe | |
COPY prebuilt/addon_x64.node addon_x64.node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment