Prerequisites:
- aws cli tools (for the s3 test)
yarn install
- installs dependencies including downloading duckdbyarn build:ts
- builds typescriptyarn test
- runs all tests
Prerequisites:
- OpenSSL v1.1+ (on Mac you may need to specify
OPENSSL_ROOT_DIR
, e.g.export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
)
yarn download-duckdb
: downloads the version of duckdb specified in the package.json commandyarn build
: will build the DuckDB sources, the C++ addon sources and the typescript sources
Other useful scripts:
yarn build
- build everythingyarn build:addon
- build just the bindings codeyarn build:duckdb
- build just the duckdb databaseyarn build:ts
- build just the typescript codeyarn lint
- lint the projectyarn test
- run all testsyarn test csv
- run just the csv test suite
Workflow notes:
- if addon code is changed in your PR, the package.json version should also be changed manually, otherwise the old binary will be used in CI/CD and elsewhere
Only allow external contributors' PR jobs to be run after inspecting the changes for any security issues (namely exposing github/appveyor tokens/secrets).
DeepDuckla
- GitHub/AppVeyor user.- GitHub credentials are found in 1Password under the name
DeepDuckla
. - Login to AppVeyor via GitHub.
- User's PATs are used to run GitHub actions and AppVeyor jobs.
- GitHub credentials are found in 1Password under the name
dforsber-duckdb-test
- AWS user for running s3 tests- Credentials in Dev IAM.
- It's only needed to access the amazon s3 bucket, so any external user can create his own user if need be.
deepcrawl-tech
- NPM User- Credentials in 1Password
- Used to publish to NPM
All tokens have the minimum required permissions and are exposed via GitHub secrets or AppVeyor secure variables.
Once master
is ready to be released:
- Stop merging into
master
- In github:
- Go to
Actions
->Automatic Release
->Run Workflow
- Click
Run Workflow
- Go to
This will do the following:
- Changelog will be amended and package version will be bumped using semantic commits
- The new version of
node-duckdb
with Linux binaries will be published to npm. The package will be tagged asprovisional-release
instead oflatest
, meaning that users won't get the version of the package if they just doyarn install node-duckdb
. - The commit and the tag will be pushed
- A github release will be created
- The commit will then be tested with the
build
job - Appveyor will build and publish the MacOs binaries, and then run the tests
At the end you should see that:
- the
Auto Release
job has been run successfully (visible on the screen where you triggered theRelease
job) - the
Build
job has been run successfully for thechore(release): a.b.c
commit (visible in the github commit history) - The Appveyor job (
continuous-integration/appveyor/branch
) has been run successfully (visible in the github commit history)
If the above checks are all green and you want to make the release a non-provisional one do:
yarn tag add node-duckdb@xxx latest
You can now continue merging into master.
On a mac:
export GITHUB_TOKEN=<your PAT>
- create a PAT in github that allows uploading artifacts to github releasesyarn login && yarn publish && yarn prebuild:linux && yarn prebuild:upload
- publish will do a bunch of various stuff, including prebuilding binaries for linux/mac and publishing those