Skip to content

Merge pull request #2 from databrainhq/databrain #5

Merge pull request #2 from databrainhq/databrain

Merge pull request #2 from databrainhq/databrain #5

name: DuckDB Node Bindings & API

Check failure on line 1 in .github/workflows/DuckDBNodeBindingsAndAPI.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/DuckDBNodeBindingsAndAPI.yml

Invalid workflow file

(Line: 118, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory, (Line: 124, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory, (Line: 130, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory, (Line: 280, Col: 5): 'name' is already defined, (Line: 281, Col: 5): 'runs-on' is already defined, (Line: 282, Col: 5): 'if' is already defined, (Line: 283, Col: 5): 'steps' is already defined
on:
pull_request:
workflow_dispatch:
inputs:
publish:
description: 'Publish'
type: boolean
required: true
default: false
publish_dry_run:
description: 'Publish Dry Run'
type: boolean
required: true
default: true
linux_x64:
description: 'Run on Linux x64'
type: boolean
required: true
default: false
# publish_linux_x64:
# description: 'Publish Bindings for Linux x64'
# type: boolean
# required: true
# default: false
# publish_bindings:
# description: 'Publish Bindings (from Linux x64)'
# type: boolean
# required: true
# default: false
# publish_api:
# description: 'Publish API (from Linux x64)'
# type: boolean
# required: true
# default: false
linux_arm64:
description: 'Run on Linux arm64'
type: boolean
required: true
default: false
# publish_linux_arm64:
# description: 'Publish Bindings for Linux arm64'
# type: boolean
# required: true
# default: false
macos_arm64:
description: 'Run on Mac OS X arm64'
type: boolean
required: true
default: false
# publish_darwin_arm64:
# description: 'Publish Bindings for Darwin arm64'
# type: boolean
# required: true
# default: false
macos_x64:
description: 'Run on Mac OS X x64'
type: boolean
required: true
default: false
windows_x64:
description: 'Run on Windows x64'
type: boolean
required: true
default: false
# publish_win32_x64:
# description: 'Publish Bindings for Win32 x64'
# type: boolean
# required: true
# default: false
repository_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
cancel-in-progress: false
jobs:
linux_x64:
name: Linux x64
runs-on: ubuntu-latest
if: ${{ inputs.linux_x64 }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Workspace - Install
run: pnpm install --ignore-scripts
- name: Bindings - Build
working-directory: bindings
run: pnpm run build
- name: Bindings - Test
working-directory: bindings
run: pnpm test
- name: API - Build
working-directory: api
run: pnpm run build
# - name: API - Test
# working-directory: api
# run: pnpm test
- name: Git Status
if: ${{ inputs.publish }}
run: git status
- name: Publish - Bindings - Linux x64
- uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.DUCKDB_NPM_TOKEN }}
package: bindings/pkgs/@databrainhq/node-bindings-linux-x64
- name: Publish - Bindings
- uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.DUCKDB_NPM_TOKEN }}
package: bindings/pkgs/@databrainhq/node-bindings
- name: Publish - API
- uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.DUCKDB_NPM_TOKEN }}
package: api/pkgs/@databrainhq/node-api
# linux_arm64:
# name: Linux arm64
# runs-on: ubuntu-latest
# if: ${{ inputs.linux_arm64 }}
# env:
# TARGET_ARCH: arm64
# CC: aarch64-linux-gnu-gcc
# CXX: aarch64-linux-gnu-g++
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
# steps:
# - name: Install aarch64 compilers
# run: sudo apt-get update && sudo apt install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# registry-url: 'https://registry.npmjs.org/'
# - uses: pnpm/action-setup@v3
# with:
# version: 9
# - name: Workspace - Install
# run: pnpm install --ignore-scripts
# - name: Bindings - Build
# working-directory: bindings
# run: pnpm run build
# - name: Git Status
# if: ${{ inputs.publish }}
# run: git status
# - name: Publish - Bindings - Linux arm64
# if: ${{ inputs.publish }}
# working-directory: bindings/pkgs/@databrainhq/node-bindings-linux-arm64
# run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
# env:
# NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
# macos_arm64:
# name: Mac OS X arm64
# runs-on: macos-latest
# if: ${{ inputs.macos_arm64 }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# registry-url: 'https://registry.npmjs.org/'
# - uses: pnpm/action-setup@v3
# with:
# version: 9
# - name: Workspace - Install
# run: pnpm install --ignore-scripts
# - name: Bindings - Build
# working-directory: bindings
# run: pnpm run build
# - name: Bindings - Test
# working-directory: bindings
# run: pnpm test
# - name: API - Build
# working-directory: api
# run: pnpm run build
# # - name: API - Test
# # working-directory: api
# # run: pnpm test
# - name: Git Status
# if: ${{ inputs.publish }}
# run: git status
# - name: Publish - Bindings - Darwin arm64
# if: ${{ inputs.publish }}
# working-directory: bindings/pkgs/@databrainhq/node-bindings-darwin-arm64
# run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
# env:
# NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
# macos_x64:
# name: Mac OS X x64
# runs-on: macos-13
# if: ${{ inputs.macos_x64 }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# registry-url: 'https://registry.npmjs.org/'
# - uses: pnpm/action-setup@v3
# with:
# version: 9
# - name: Workspace - Install
# run: pnpm install --ignore-scripts
# - name: Bindings - Build
# working-directory: bindings
# run: pnpm run build
# - name: Bindings - Test
# working-directory: bindings
# run: pnpm test
# - name: API - Build
# working-directory: api
# run: pnpm run build
# # - name: API - Test
# # working-directory: api
# # run: pnpm test
# - name: Git Status
# if: ${{ inputs.publish }}
# run: git status
# - name: Publish - Bindings - Darwin x64
# if: ${{ inputs.publish }}
# working-directory: bindings/pkgs/@databrainhq/node-bindings-darwin-x64
# run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
# env:
# NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
# windows_x64:
name: Windows x64
runs-on: windows-latest
if: ${{ inputs.windows_x64 }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Workspace - Install
run: pnpm install --ignore-scripts
- name: Bindings - Build
working-directory: bindings
run: pnpm run build
- name: Bindings - Test
working-directory: bindings
run: pnpm test
- name: API - Build
working-directory: api
run: pnpm run build
# - name: API - Test
# working-directory: api
# run: pnpm test
- name: Git Status
if: ${{ inputs.publish }}
run: git status
- name: Publish - Bindings - Win32 x64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@databrainhq/node-bindings-win32-x64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
env:
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}