-
Notifications
You must be signed in to change notification settings - Fork 311
add dll path #731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xiaobaidadada
wants to merge
41
commits into
microsoft:main
Choose a base branch
from
xiaobaidadada:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add dll path #731
Changes from 6 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
2f0934b
预构建
xiaobaidadada aa3c85e
预构建版本
xiaobaidadada c7b100b
构建环境
xiaobaidadada 9eb94d1
构建环境
xiaobaidadada e940f7d
lock版本
xiaobaidadada 1b786f1
prebuild
xiaobaidadada 1cf3c48
prebuild
xiaobaidadada a733355
prebuild
xiaobaidadada 75f8bc6
prebuild
xiaobaidadada a5e0be4
prebuild
xiaobaidadada 8df4a7f
powershell的问题
xiaobaidadada 803a4eb
分别用不同的参数
xiaobaidadada 13631eb
区分环境编译
xiaobaidadada 0c6c36c
build
xiaobaidadada 22464aa
push
xiaobaidadada 9a184e3
--access public
xiaobaidadada 4e259f7
Update build.yml
xiaobaidadada 2dab267
Update post-install.js
xiaobaidadada 9ddd6c1
Update package.json
xiaobaidadada 29713fc
Update build.yml
xiaobaidadada 0565109
Update build.yml
xiaobaidadada 994a540
Update build.yml
xiaobaidadada aa8ccbb
Update build.yml
xiaobaidadada 728bbb5
1.0.3
xiaobaidadada e2db91a
预构建
xiaobaidadada d478ec8
预构建
xiaobaidadada 2ee9c07
预构建
xiaobaidadada 8e15ebd
NODE_BUILD_CMD
xiaobaidadada e945bbd
x64
xiaobaidadada 9373f68
conpty(resize也需要dll)也支持动态dll路径
xiaobaidadada 2c9e900
webpack打包适应,线程处理
xiaobaidadada c4fb1b2
require
xiaobaidadada 62a5f94
查找全部子进程todo
xiaobaidadada 91ebf9a
1.0.3打包测试
xiaobaidadada 1ba971b
Debug路径下require
xiaobaidadada 0f9be4f
1.0.4
xiaobaidadada 817e125
build.yml
xiaobaidadada 171ed44
workflow修改
xiaobaidadada 6d9bf9a
Merge branch 'main' into main
xiaobaidadada b213620
package.json
xiaobaidadada 27b078d
declare fix
xiaobaidadada File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,178 @@ | ||
| name: "Run prebuild's and Create GitHub and NPM release" | ||
| run-name: Package against ${{ github.ref_name }} # 每次运行的时候显示的名字 | ||
|
|
||
| # 本yml参考于 https://github.com/WiseLibs/better-sqlite3/blob/master/.github/workflows/build.yml | ||
| on: | ||
| workflow_dispatch: # 手动触发 | ||
| inputs: # 定义触发的时候可以输入的参数 | ||
| job: # 参数名称 通过 ${{ github.event.inputs.job }} 访问值 下面是参数的要求描述 | ||
| description: "任务类型" | ||
| required: true | ||
| default: prebuild | ||
| type: string | ||
|
|
||
| env: # 用来定义环境变量 可用于工作流中所有作业的步骤的变量的 map | ||
| # See https://github.com/nodejs/release#release-schedule | ||
| # Node.js v16 EOL = 2023-09-11. v21 EOL = 2024-06-01. | ||
| NODE_BUILD_CMD: npx --no-install prebuild -r node -t 16.0.0 -t 18.0.0 -t 20.0.0 -t 22.0.0 --include-regex '\.(node|exe|dll|pdb)$' | ||
| # Merge with NODE_BUILD_CMD when Node.js v18 is EOL | ||
| NO_V18_NODE_BUILD_CMD: npx --no-install prebuild -r node -t 20.0.0 -t 22.0.0 --include-regex '\.(node|exe|dll|pdb)$' | ||
| # See https://www.electronjs.org/docs/latest/tutorial/electron-timelines#version-support-policy | ||
| # Electron v25 EOL = 2023-12-05. v26 EOL = 2024-02-20. v27 EOL = 2024-04-16. v28 EOL = 2024-06-11. v29 EOL = 2024-08-20. | ||
| ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 -t 31.0.0 -t 32.0.0 --include-regex '\.(node|exe|dll|pdb)$' | ||
|
|
||
| # 所有的jobs下的任务都会被执行 | ||
| jobs: | ||
| test: | ||
| strategy: | ||
| matrix: # 定义在多个维度版本进行构建的 虚拟环境 矩阵(就是os * node的组合) | ||
| os: | ||
| - ubuntu-20.04 | ||
| - macos-13 | ||
| - macos-14 | ||
| - windows-2019 | ||
| node: | ||
| - 18 | ||
| - 20 | ||
| - 22 | ||
| name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} | ||
| if: ${{ github.event_name == 'test' }} # 让某个job执行 | ||
| runs-on: ${{ matrix.os }} # 使用matrix.os中的 运行环境 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
| - if: ${{ startsWith(matrix.os, 'windows') }} | ||
| run: pip.exe install setuptools | ||
| - if: ${{ startsWith(matrix.os, 'macos') }} | ||
| run: brew install python-setuptools | ||
| - if: ${{ !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos') }} | ||
| run: python3 -m pip install setuptools | ||
| - if: ${{ startsWith(matrix.os, 'ubuntu') }} | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install gcc-10 g++-10 -y | ||
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10 | ||
| - run: npm install --ignore-scripts | ||
| - run: npm run build-debug | ||
| - run: npm test | ||
| - name: Test SpatiaLite extension | ||
| if: ${{ startsWith(matrix.os, 'ubuntu') }} | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install libsqlite3-mod-spatialite -y | ||
| node -e "require('./lib/index.js')(':memory:').loadExtension('mod_spatialite').exec('SELECT InitSpatialMetaData();')" | ||
|
|
||
| publish-npm: | ||
| if: ${{ github.event.inputs.job == 'push-npm' }} | ||
| name: Publishing to NPM | ||
| runs-on: ubuntu-20.04 | ||
| #needs: # 等待别的 job 任务完成 | ||
| #- prebuild | ||
| #- prebuild-alpine | ||
| #- prebuild-alpine-arm | ||
| #- prebuild-linux-arm | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18 | ||
| registry-url: https://registry.npmjs.org | ||
| - run: npm publish | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
|
||
| prebuild: # 执行node的 预构建 | ||
| if: ${{ github.event.inputs.job == 'prebuild' }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: | ||
| - ubuntu-20.04 | ||
| #- macos-13 | ||
| #- macos-14 | ||
| - windows-2019 | ||
| name: Prebuild on ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| # needs: test | ||
| steps: | ||
| - uses: actions/checkout@v4 # 使用社区的指令 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18 | ||
| - if: ${{ startsWith(matrix.os, 'windows') }} | ||
| run: pip.exe install setuptools | ||
| - if: ${{ startsWith(matrix.os, 'macos') }} | ||
| run: brew install python-setuptools | ||
| - if: ${{ !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos') }} | ||
| run: python3 -m pip install setuptools | ||
| - if: ${{ startsWith(matrix.os, 'ubuntu') }} | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install gcc-10 g++-10 -y | ||
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10 | ||
| - run: npm install --ignore-scripts | ||
| - run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }} | ||
| - run: ${{ env.ELECTRON_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }} | ||
| - if: matrix.os == 'windows-2019' | ||
| run: | | ||
| ${{ env.NODE_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }} | ||
| ${{ env.NO_V18_NODE_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} | ||
| ${{ env.ELECTRON_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }} | ||
| ${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| prebuild-alpine: | ||
| if: ${{ github.event.inputs.job == 'alpine' }} | ||
| strategy: | ||
| fail-fast: false | ||
| name: Prebuild on alpine | ||
| runs-on: ubuntu-latest | ||
| container: node:18-alpine | ||
| #needs: test | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: apk add build-base git python3 py3-setuptools --update-cache | ||
| - run: npm install --ignore-scripts | ||
| - run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| prebuild-alpine-arm: | ||
| if: ${{ github.event.inputs.job == 'alpine-arm' }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| arch: | ||
| - arm/v7 | ||
| - arm64 | ||
| name: Prebuild on alpine (${{ matrix.arch }}) | ||
| runs-on: ubuntu-latest | ||
| #needs: test | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: docker/setup-qemu-action@v3 | ||
| - run: | | ||
| docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18-alpine -c "\ | ||
| apk add build-base git python3 py3-setuptools --update-cache && \ | ||
| cd /tmp/project && \ | ||
| npm install --ignore-scripts && \ | ||
| ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}" | ||
|
|
||
| prebuild-linux-arm: | ||
| if: ${{ github.event.inputs.job == 'linux-arm' }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| arch: | ||
| - arm/v7 | ||
| - arm64 | ||
| name: Prebuild on Linux (${{ matrix.arch }}) | ||
| runs-on: ubuntu-latest | ||
| #needs: test | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: docker/setup-qemu-action@v3 | ||
| - run: | | ||
| docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18-bullseye -c "\ | ||
| cd /tmp/project && \ | ||
| npm install --ignore-scripts && \ | ||
| ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}" | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| # 为什么要这个配置 https://github.com/nodejs/node-gyp/issues/26 | ||
| 'cflags!': ['-fno-exceptions'], | ||
| 'cflags_cc!': ['-fno-exceptions'], | ||
| "include_dirs": [ | ||
| "<!@(node -p \"require('node-addon-api').include\")", | ||
| ], | ||
| "dependencies": [ | ||
| "<!(node -p \"require('node-addon-api').gyp\")" | ||
| ], | ||
| 'conditions': [ | ||
| ['OS=="mac"', { | ||
| 'cflags+': ['-fvisibility=hidden'], | ||
| 'xcode_settings': { | ||
| 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', | ||
| 'CLANG_CXX_LIBRARY': 'libc++', | ||
| 'MACOSX_DEPLOYMENT_TARGET': '10.7', | ||
| 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden | ||
| } | ||
| }], | ||
| ['OS=="win"', { | ||
| 'msvs_settings': { | ||
| 'VCCLCompilerTool': { | ||
| 'ExceptionHandling': 1, | ||
| 'AdditionalOptions': ['/source-charset:utf-8'] | ||
| }, | ||
| }, | ||
| 'defines':[ | ||
| '_HAS_EXCEPTIONS=1', | ||
| 'NOMINMAX' | ||
| ] | ||
| }] | ||
| ], | ||
| # node16 打包会出现的问题 | ||
| 'variables' : { | ||
| 'openssl_fips': '', | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.