Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 58 additions & 15 deletions .github/workflows/push_branches.workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,56 @@
- beta

jobs:
prebuild:
name: Prebuild on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-13, macos-latest]
include:
- os: ubuntu-22.04
arch: x64
# - os: windows-latest
# arch: x64
# macOS Intel (x64)
- os: macos-13
arch: x64
# macOS Apple Silicon (arm64)
- os: macos-latest
arch: arm64

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Build prebuilds (Windows/Linux)
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'windows-latest'
run: npm run build -- --arch=x64

- name: Build prebuilds (macOS)
if: startsWith(matrix.os, 'macos')
run: npm run build -- --arch=${{ matrix.arch }}

- name: Upload prebuilds
uses: actions/upload-artifact@v4
with:
name: prebuilds-${{ matrix.os }}-${{ matrix.arch }}
path: prebuilds/
retention-days: 1

release:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
needs: prebuild
name: Release process
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
contents: write
issues: write
Expand All @@ -19,22 +66,18 @@
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
scope: "@kuzzleio"

- name: Install
run: npm ci

node-version: 20
cache: "npm"

- name: configure
run: npm run configure

- name: Build
run: npm run build
- name: Download all prebuilds
uses: actions/download-artifact@v4
with:
pattern: prebuilds-*
path: prebuilds/
merge-multiple: true

- name: Release
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

# node-gyp
build/
prebuilds/

# dependencies
node_modules/
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var BSI = require('bindings')('BoostSpatialIndex');
var BSI = require('node-gyp-build')(__dirname);

/**
* @constructor
Expand Down
Loading
Loading