chore: build profiling and production versions
This commit is contained in:
parent
9e85ee2e91
commit
0ec7a54258
54
.github/workflows/publish.yaml
vendored
54
.github/workflows/publish.yaml
vendored
@ -20,6 +20,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, macos-latest]
|
||||
buildType: ['production', 'profiling']
|
||||
include:
|
||||
- os: macos-latest
|
||||
target: arm64
|
||||
@ -51,6 +52,10 @@ jobs:
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Update package.json
|
||||
if: ${{ matrix.buildType == 'profiling' }}
|
||||
run: pnpm version prerelease --no-git-tag-version --preid profiling
|
||||
|
||||
- name: Install node_modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
@ -68,27 +73,55 @@ jobs:
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
|
||||
with:
|
||||
name: sqlcipher-${{matrix.os}}
|
||||
name: sqlcipher-${{matrix.buildType}}-${{matrix.os}}
|
||||
path: prebuilds/*
|
||||
|
||||
prebuild_linux:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
buildType: ['production', 'profiling']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||
with:
|
||||
version: 10.3.0
|
||||
|
||||
- name: Get Node version from .nvmrc
|
||||
id: get-nvm-version
|
||||
shell: bash
|
||||
run: echo "node-version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Update package.json
|
||||
if: ${{ matrix.buildType == 'profiling' }}
|
||||
run: pnpm version prerelease --no-git-tag-version --preid profiling
|
||||
|
||||
- name: Build in docker container
|
||||
run: ./docker-prebuildify.sh
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
|
||||
with:
|
||||
name: sqlcipher-linux-latest
|
||||
name: sqlcipher-${{matrix.buildType}}-linux-latest
|
||||
path: prebuilds/*
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
buildType: ['production', 'profiling']
|
||||
|
||||
permissions:
|
||||
# Needed for ncipollo/release-action.
|
||||
contents: 'write'
|
||||
@ -116,10 +149,14 @@ jobs:
|
||||
- name: Download built libraries
|
||||
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.19.1
|
||||
with:
|
||||
pattern: sqlcipher-*
|
||||
pattern: sqlcipher-${{matrix.buildType}}-*
|
||||
path: prebuilds
|
||||
merge-multiple: true
|
||||
|
||||
- name: Update package.json
|
||||
if: ${{ matrix.buildType == 'profiling' }}
|
||||
run: pnpm version prerelease --no-git-tag-version --preid profiling
|
||||
|
||||
- name: Install node_modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
@ -133,11 +170,18 @@ jobs:
|
||||
env:
|
||||
PREBUILDS_ONLY: 1
|
||||
|
||||
- name: Publish
|
||||
- name: Publish production
|
||||
if: ${{ matrix.buildType == 'production' }}
|
||||
run: pnpm publish --tag '${{ github.event.inputs.npm_tag }}' --access public --no-git-checks ${{ inputs.dry_run && '--dry-run' || ''}}
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Publish profiling
|
||||
if: ${{ matrix.buildType == 'profiling' }}
|
||||
run: pnpm publish --tag 'profiling' --access public --no-git-checks ${{ inputs.dry_run && '--dry-run' || ''}}
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Rename symbols
|
||||
run: |
|
||||
mv prebuilds/darwin-arm64/node_sqlcipher.sym prebuilds/node_sqlcipher_darwin_arm64.sym
|
||||
@ -150,7 +194,7 @@ jobs:
|
||||
# This step is expected to fail if not run on a tag.
|
||||
- name: Upload debug info to release
|
||||
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
|
||||
if: ${{ !inputs.dry_run }}
|
||||
if: ${{ !inputs.dry_run && matrix.buildType == 'production' }}
|
||||
with:
|
||||
allowUpdates: true
|
||||
artifactErrorsFailBuild: true
|
||||
|
||||
2
deps/sqlcipher/sqlcipher.gyp
vendored
2
deps/sqlcipher/sqlcipher.gyp
vendored
@ -99,7 +99,7 @@
|
||||
}],
|
||||
|
||||
# Profiling
|
||||
["\"<!(node -p \"require('../../package.json').version\")\".endswith(\"-profiling\")", {
|
||||
["\"-profiling\.\" in \"<!(node -p \"require('../../package.json').version\")\"", {
|
||||
'defines': [
|
||||
'SQLITE_ENABLE_STMT_SCANSTATUS'
|
||||
],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user