Skip to content

Commit

Permalink
Merge tag 'v8.1.6'
Browse files Browse the repository at this point in the history
8.1.6
  • Loading branch information
Rush committed Jan 19, 2025
2 parents b0bf86a + c16e31e commit ce4d57b
Show file tree
Hide file tree
Showing 58 changed files with 5,204 additions and 4,382 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: ci
on:
push:
# branches: [ master ]
pull_request:
branches: [ master ]
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x, 22.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- if: runner.os == 'Linux'
run: sudo apt-get install -y build-essential libgl1-mesa-dri libglapi-mesa
libglew-dev libglu1-mesa-dev libosmesa6
libxi-dev mesa-utils pkg-config
- run: npm ci
- run: npm run build --if-present
- if: runner.os == 'Linux'
run: xvfb-run npm test
- if: runner.os != 'Linux'
run: npm test
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Prebuild, Create Release, Publish

on:
push:
tags:
- 'v*'

jobs:
build:
strategy:
matrix:
node-version: [22.x]
os: [ubuntu-latest, windows-latest, macos-latest]
target: ["18.0.0", "20.0.0", "22.0.0"]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: write
attestations: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- if: runner.os == 'Linux'
run: sudo apt-get install -y build-essential libgl1-mesa-dri libglapi-mesa
libglew-dev libglu1-mesa-dev libosmesa6
libxi-dev mesa-utils pkg-config
- run: npm ci --ignore-scripts
- name: Prebuild and Publish
shell: bash
run: node ./node_modules/prebuild/bin.js -t ${{ matrix.target }} --strip --include-regex "\.(node|dll)$" -u ${{ secrets.GITHUB_TOKEN }} --verbose
- name: Prebuild and Publish (musl)
if: runner.os == 'Linux'
shell: bash
run: node ./node_modules/prebuild/bin.js --libc=musl -t ${{ matrix.target }} --strip -u ${{ secrets.GITHUB_TOKEN }} --verbose
- name: Attest
uses: actions/attest-build-provenance@v1
with:
subject-path: 'prebuilds/*.tar.gz'

publish:
name: Publish to NPM
needs:
- build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci --ignore-scripts
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 15 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,36 @@ git:
submodules: true
env:
global:
- secure: H9lQEk76gGIi0TM9dGSZYmezr+8x4a4HQuwyJ1Z7wnWuW6diWtftfaim85AvjRpNnhpfz5ia6hmzLruOXbjDxCYp2RN9nhebBlGp9iYQsoyzZlTphWVNj0cGC9AIkxEtobswU3/A79FgnMhZxo5vSu4eotTgxo7nyiUaTuKB2nI=
- secure: "YEhcMuHvycqdfQZhCJhDz9aw56tmvvfr+k/1hiGsIQx7zyZbLR03wUT4EUQAKdG57lOGHZwUdb4koW+OAG3ZVD7rWlw2UOw4G7BiWbQeVXO8isQiFd3CtIRvqbeEzDsu/AQGa8MSb9zoEbFRvV7MDd9TuKbiwVDoPyKGI6qZioA="
matrix:
include:
# - os: linux
# sudo: required
# dist: bionic
# compiler: g++
# env:
# - NODE_VERSION=12
# - os: linux
# sudo: required
# dist: bionic
# compiler: g++
# env:
# - NODE_VERSION=14
- os: linux
sudo: required
dist: bionic
dist: focal
compiler: g++
env:
- NODE_VERSION=16
- NODE_VERSION=20
- os: linux
sudo: required
dist: focal
compiler: g++
env:
- NODE_VERSION=22
# - os: osx
# osx_image: xcode12.5
# osx_image: xcode13.4
# compiler: clang
# env:
# - NODE_VERSION=12
# - NODE_VERSION=14
# - os: osx
# osx_image: xcode12.5
# osx_image: xcode13.4
# compiler: clang
# env:
# - NODE_VERSION=14
# - NODE_VERSION=16
# - os: osx
# osx_image: xcode12.5
# osx_image: xcode13.4
# compiler: clang
# env:
# - NODE_VERSION=16
# - NODE_VERSION=18
addons:
apt:
sources:
Expand Down
31 changes: 0 additions & 31 deletions CHANGES.md

This file was deleted.

23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# gl

[![Travis CI](https://travis-ci.com/stackgl/headless-gl.svg?branch=master)](https://travis-ci.com/stackgl/headless-gl)
[![Appveyor](https://ci.appveyor.com/api/projects/status/g5ypwyffmtg1iu83/branch/master?svg=true)](https://ci.appveyor.com/project/dhritzkiv/headless-gl)
[![ci](https://github.com/stackgl/headless-gl/actions/workflows/ci.yml/badge.svg)](https://github.com/stackgl/headless-gl/actions/workflows/ci.yml)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

`gl` lets you create a WebGL context in [Node.js](https://nodejs.org/en/) without making a window or loading a full browser environment.
Expand Down Expand Up @@ -39,17 +38,15 @@ Installing `headless-gl` on a supported platform is a snap using one of the preb
npm install gl
```

And you are good to go! If your system is not supported, then please see the [development](#system-dependencies) section on how to configure your build environment. Patches to improve support are always welcome!
And you are good to go!

Prebuilt binaries are generally available for LTS node versions (e.g. 18, 20). If your system is not supported, then please see the [development](#system-dependencies) section on how to configure your build environment. Patches to improve support are always welcome!

## Supported platforms and Node.js versions

gl runs on Linux, macOS, and Windows.

Node.js versions 8 and up are supported.

**Note [macOS only]: due to an inadvertant low-level breaking change in libuv's process handling code, this package doesn't return a gl context when running nodejs version 12.13.1 through to 12.16.1, and 13.0.0 through to 13.6.0 on macOS. A fix has been released in Node.js versions 12.16.2 and 13.7.0. Other platforms are unaffected.**

To support Node.js versions less than 8, use version 4.2.2 of this package.
Node.js versions 16 and up are supported.

## API

Expand Down Expand Up @@ -133,12 +130,12 @@ In most cases installing `headless-gl` from npm should just work. However, if y

#### Mac OS X

* [Python 2.7](https://www.python.org/)
* [Python 3](https://www.python.org/)
* [XCode](https://developer.apple.com/xcode/)

#### Ubuntu/Debian

* [Python 2.7](https://www.python.org/)
* [Python 3](https://www.python.org/)
* A GNU C++ environment (available via the `build-essential` package on `apt`)
* [libxi-dev](http://www.x.org/wiki/)
* Working and up to date OpenGL drivers
Expand All @@ -151,7 +148,7 @@ $ sudo apt-get install -y build-essential libxi-dev libglu1-mesa-dev libglew-dev

#### Windows

* [Python 2.7](https://www.python.org/)
* [Python 3](https://www.python.org/)
* [Microsoft Visual Studio](https://www.microsoft.com/en-us/download/details.aspx?id=5555)
* d3dcompiler_47.dll should be in c:\windows\system32, but if isn't then you can find another copy in the deps/ folder

Expand Down Expand Up @@ -179,7 +176,7 @@ addons:
- libglapi-mesa
- libosmesa6
node_js:
- '8'
- '20'
before_script:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
```
Expand Down Expand Up @@ -219,9 +216,11 @@ Only the following for now:
* [`OES_texture_float`](https://www.khronos.org/registry/webgl/extensions/OES_texture_float/)
* [`OES_texture_float_linear`](https://www.khronos.org/registry/webgl/extensions/OES_texture_float_linear/)
* [`OES_vertex_array_object`](https://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/)
* [`OES_standard_derivatives`](https://www.khronos.org/registry/webgl/extensions/OES_standard_derivatives/)
* [`WEBGL_draw_buffers`](https://www.khronos.org/registry/webgl/extensions/WEBGL_draw_buffers/)
* [`EXT_blend_minmax`](https://www.khronos.org/registry/webgl/extensions/EXT_blend_minmax/)
* [`EXT_texture_filter_anisotropic`](https://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/)
* [`EXT_shader_texture_lod`](https://www.khronos.org/registry/webgl/extensions/EXT_shader_texture_lod/)

### How can I keep up to date with what has changed in headless-gl?

Expand Down
2 changes: 1 addition & 1 deletion angle
17 changes: 9 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
image:
- Visual Studio 2022

platform:
- x64

environment:
GITHUB_TOKEN:
secure: 8dsj2oODP6p82OsCyVjldh0v/KktBJYWWPFWmrg+bh7y0CNpQPwtww+IjX14LMrx
matrix:
# - nodejs_version: "12"
# - nodejs_version: "14"
- nodejs_version: "16"
- nodejs_version: "22"

install:
- ps: Install-Module VSSetup -Scope CurrentUser
- cmd: git submodule update --init
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:PLATFORM
- npm config set msvs_version 2015 --global
- npm config set target_arch %PLATFORM% --global
- npm install -g node-gyp

build_script:
Expand All @@ -24,4 +22,7 @@ test_script:
- npm test

deploy_script:
- ps: if ($env:APPVEYOR_REPO_TAG -eq "true") {./node_modules/.bin/prebuild -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 --strip -u $env:GITHUB_TOKEN --include-regex "\.(node|dll)$"}
- ps: if ($env:APPVEYOR_REPO_TAG -eq "true" -or $env:FORCE_PREBUILD -ne $null) {./node_modules/.bin/prebuild -t 18.0.0 -t 20.0.0 -t 22.0.0 --strip -u $env:GITHUB_TOKEN --include-regex "\.(node|dll)$"}

cache:
- '%APPDATA%\npm-cache' # npm cache
1 change: 1 addition & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
'variables': {
'platform': '<(OS)',
'openssl_fips' : '0',
},
'conditions': [
['platform == "mac"', {'variables': {'platform': 'darwin'}}],
Expand Down
Loading

0 comments on commit ce4d57b

Please sign in to comment.