forked from TryGhost/node-sqlite3
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vscode related changes for releasing
@vscode/5.1.2-vscode
- Loading branch information
Showing
10 changed files
with
195 additions
and
204 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,174 +1,26 @@ | ||
name: CI | ||
name: Electron CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
env: | ||
FORCE_COLOR: 1 | ||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
branches: [ vscode ] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
posix: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
host: | ||
- x64 | ||
target: | ||
- x64 | ||
node: | ||
- 10 | ||
- 11 | ||
- 12 | ||
- 13 | ||
- 14 | ||
- 15 | ||
- 16 | ||
- 17 | ||
- 18 | ||
include: | ||
- os: windows-latest | ||
node: 16 | ||
host: x86 | ||
target: x86 | ||
- os: macos-m1 | ||
node: 16 | ||
host: arm64 | ||
target: arm64 | ||
name: ${{ matrix.os }} (node=${{ matrix.node }}, host=${{ matrix.host }}, target=${{ matrix.target }}) | ||
os: [macos-latest, ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
architecture: ${{ matrix.host }} | ||
|
||
- name: Add yarn (self-hosted) | ||
if: matrix.os == 'macos-m1' | ||
run: npm install -g yarn | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v1.1 | ||
if: contains(matrix.os, 'windows') | ||
with: | ||
msbuild-architecture: ${{ matrix.target }} | ||
|
||
- name: Install dependencies | ||
run: yarn install --ignore-scripts | ||
|
||
- name: Add env vars | ||
shell: bash | ||
run: | | ||
echo "V=1" >> $GITHUB_ENV | ||
if [ "${{ matrix.target }}" = "x86" ]; then | ||
echo "TARGET=ia32" >> $GITHUB_ENV | ||
else | ||
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV | ||
fi | ||
- name: Add Linux env vars | ||
if: contains(matrix.os, 'ubuntu') | ||
run: | | ||
echo "CFLAGS=${CFLAGS:-} -include ../src/gcc-preinclude.h" >> $GITHUB_ENV | ||
echo "CXXFLAGS=${CXXFLAGS:-} -include ../src/gcc-preinclude.h" >> $GITHUB_ENV | ||
- name: Configure build | ||
run: yarn node-pre-gyp configure --target_arch=${{ env.TARGET }} | ||
|
||
- name: Build binaries | ||
run: yarn node-pre-gyp build --target_arch=${{ env.TARGET }} | ||
|
||
- name: Print binary info | ||
if: contains(matrix.os, 'ubuntu') | ||
run: | | ||
ldd lib/binding/*/node_sqlite3.node | ||
echo "---" | ||
nm lib/binding/*/node_sqlite3.node | grep "GLIBC_" | c++filt || true | ||
echo "---" | ||
file lib/binding/napi-v*/* | ||
- name: Run tests | ||
run: yarn test | ||
|
||
- name: Package prebuilt binaries | ||
run: yarn node-pre-gyp package --target_arch=${{ env.TARGET }} | ||
|
||
- name: Upload binaries to commit artifacts | ||
uses: actions/upload-artifact@v3 | ||
if: matrix.node == 16 | ||
with: | ||
name: prebuilt-binaries | ||
path: build/stage/*/* | ||
retention-days: 7 | ||
|
||
- name: Upload binaries to GitHub Release | ||
run: yarn node-pre-gyp-github publish | ||
if: matrix.node == 16 && startsWith(github.ref, 'refs/tags/') | ||
env: | ||
NODE_PRE_GYP_GITHUB_TOKEN: ${{ github.token }} | ||
build-qemu: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') | ||
- uses: actions/checkout@v2 | ||
- run: yarn install | ||
- run: scripts/test-electron.sh | ||
windows: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: | ||
- 16 | ||
target: | ||
- linux/arm64 | ||
variant: | ||
- bullseye | ||
- alpine3.15 | ||
include: | ||
# musl x64 builds | ||
- target: linux/amd64 | ||
variant: alpine3.15 | ||
node: 16 | ||
name: ${{ matrix.variant }} (node=${{ matrix.node }}, target=${{ matrix.target }}) | ||
os: [windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build binaries and test | ||
run: | | ||
docker buildx build \ | ||
--file ./tools/BinaryBuilder.Dockerfile \ | ||
--load \ | ||
--tag sqlite-builder \ | ||
--platform ${{ matrix.target }} \ | ||
--no-cache \ | ||
--build-arg VARIANT=${{ matrix.variant }} \ | ||
--build-arg NODE_VERSION=${{ matrix.node }} \ | ||
. | ||
CONTAINER_ID=$(docker create -it sqlite-builder) | ||
docker cp $CONTAINER_ID:/usr/src/build/build/ ./build | ||
- name: Upload binaries to commit artifacts | ||
uses: actions/upload-artifact@v3 | ||
if: matrix.node == 16 | ||
with: | ||
name: prebuilt-binaries | ||
path: build/stage/*/* | ||
retention-days: 7 | ||
|
||
- name: Upload binaries to GitHub Release | ||
run: yarn install --ignore-scripts && yarn node-pre-gyp-github publish | ||
if: matrix.node == 16 && startsWith(github.ref, 'refs/tags/') | ||
env: | ||
NODE_PRE_GYP_GITHUB_TOKEN: ${{ github.token }} | ||
- uses: actions/checkout@v2 | ||
- run: yarn install | ||
- run: .\scripts\test-electron.bat |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
disturl "https://electronjs.org/headers" | ||
target "19.1.3" | ||
runtime "electron" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK --> | ||
|
||
## Security | ||
|
||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). | ||
|
||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. | ||
|
||
## Reporting Security Issues | ||
|
||
**Please do not report security vulnerabilities through public GitHub issues.** | ||
|
||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). | ||
|
||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). | ||
|
||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). | ||
|
||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: | ||
|
||
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) | ||
* Full paths of source file(s) related to the manifestation of the issue | ||
* The location of the affected source code (tag/branch/commit or direct URL) | ||
* Any special configuration required to reproduce the issue | ||
* Step-by-step instructions to reproduce the issue | ||
* Proof-of-concept or exploit code (if possible) | ||
* Impact of the issue, including how an attacker might exploit the issue | ||
|
||
This information will help us triage your report more quickly. | ||
|
||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. | ||
|
||
## Preferred Languages | ||
|
||
We prefer all communications to be in English. | ||
|
||
## Policy | ||
|
||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). | ||
|
||
<!-- END MICROSOFT SECURITY.MD BLOCK --> |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const binary = require('@mapbox/node-pre-gyp'); | ||
/*const binary = require('@mapbox/node-pre-gyp'); | ||
const path = require('path'); | ||
const binding_path = binary.find(path.resolve(path.join(__dirname,'../package.json'))); | ||
const binding = require(binding_path); | ||
const binding_path = binary.find(path.resolve(path.join(__dirname,'../package.json')));*/ | ||
const binding = require('../build/Release/vscode-sqlite3.node'); | ||
module.exports = exports = binding; |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@echo off | ||
setlocal | ||
|
||
pushd %~dp0\.. | ||
|
||
set ELECTRON_RUN_AS_NODE=1 | ||
|
||
call .\node_modules\.bin\electron .\test\support/createdb.js | ||
call .\node_modules\.bin\electron .\node_modules\.bin\mocha -R spec --timeout 480000 | ||
|
||
popd | ||
|
||
endlocal |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
export ELECTRON_RUN_AS_NODE=1 | ||
|
||
./node_modules/.bin/electron ./test/support/createdb.js | ||
./node_modules/.bin/electron ./node_modules/.bin/mocha -R spec --timeout 480000 |
Oops, something went wrong.