Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8ab4038
added appspot and state share config
chrisj Jan 6, 2023
7117555
specific app config for cave-explorer
chrisj May 5, 2023
8ac681c
specific app config for spelunker
chrisj May 15, 2023
3acf4b8
trying to reduce flicker
chrisj May 16, 2023
bca340a
added graphene find path tool
chrisj Dec 6, 2022
51f4083
added custom error handler support for credentials provider so middle…
chrisj Jan 12, 2024
6197a37
feat(segmentation_user_layer): add individual segment color picker tool
chrisj Feb 22, 2024
6d5c72e
feat(tools): custom keybinds and layer independent tool keybinds
chrisj Feb 22, 2024
9d8df59
added custom bindings config
chrisj May 15, 2023
32a62b1
added ctrl+shift+x hide segments (same as seung lab neuroglancer)
chrisj Mar 13, 2024
cc9fee5
temp fix for our placeholder precomputed scales
chrisj Apr 22, 2024
f153437
feat(datasource/graphene) bumped bulk merge limit to 20
chrisj May 21, 2024
c3ae568
add registerLayerEvent/dispatchLayerEvent
chrisj Sep 30, 2024
d239218
add keybinds (alt+up arrow, alt+down arrow) to iterate through the cu…
chrisj Oct 1, 2024
882c34d
added annotation tagging feature
chrisj Oct 1, 2024
3e60828
displaying annotation tags in annotation list
chrisj Oct 2, 2024
aaade53
rebinding brackets [] to select-prev/select-next
chrisj Sep 19, 2024
f342666
quick fix for tags breaking precomputed annotations
chrisj Oct 2, 2024
d7d42f8
feat(datasource/graphene) added timestamp tool to graphene, timestamp…
chrisj Oct 22, 2024
d9b201b
added ability to upgrade state in UrlHashBinding.updateFromUrlHash fo…
chrisj Oct 22, 2024
205bea7
fix(datasource/graphene) disabling hide segment zero when activating …
chrisj Nov 4, 2024
ff5bee3
temp fix for layertools not rendering in tool palette
chrisj Jan 10, 2025
3da2b11
perf(datasource/graphene): group together segment id requests within …
chrisj Mar 6, 2025
3572590
fix(datasource/graphene) fixed fallback to legacy single-resolution m…
chrisj Apr 4, 2025
f4a2c6f
fly_v31 temp fix
chrisj Apr 4, 2025
ee51ff3
fix(datasource/graphene) multicut tool no longer relies on showing se…
chrisj May 7, 2025
1266b43
added appspot and state share config
chrisj Jan 6, 2023
7702853
specific app config for cave-explorer
chrisj May 5, 2023
80ea94f
specific app config for spelunker
chrisj May 15, 2023
86961a9
added graphene find path tool
chrisj Dec 6, 2022
2010d17
feat(datasource/graphene) added timestamp tool to graphene, timestamp…
chrisj Oct 22, 2024
6304c57
fix(datasource/graphene) disabling hide segment zero when activating …
chrisj Nov 4, 2024
8cc4b46
added appspot and state share config
chrisj Jan 6, 2023
69860db
added custom error handler support for credentials provider so middle…
chrisj Jan 12, 2024
62acf1e
feat(graphene): multiscale meshes
akhileshh Jan 26, 2025
883ceef
virutal nodes
akhileshh Jan 27, 2025
c711ae1
custom deployment for test branch
chrisj Nov 4, 2024
6e8c533
fix(auth): do not pass invalid credentials
akhileshh Jan 29, 2025
bf83701
fix: rebase conflicts
akhileshh Feb 16, 2025
1d6c57e
combine fragments per chunk
akhileshh Feb 18, 2025
5d22df8
remove virutal node mark
akhileshh Feb 18, 2025
352fd67
fix rebase mess
akhileshh May 12, 2025
e90f5da
fix: use the correct value for vertexQuantizationBits
akhileshh May 30, 2025
c9c7f70
fix(graphene): merge draco fragments after decoding (#627)
nkemnitz Jun 4, 2025
fc86a49
feat(neuroglancer_draco): ALlow for custom partition coordinates
nkemnitz Jun 6, 2025
85185bc
fix(graphene): octant-aware vertex and indices merging
nkemnitz Jun 6, 2025
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
375 changes: 54 additions & 321 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
name: Build

on:
push:
branches:
- master
tags:
- v**
pull_request:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
on: [push, pull_request]

jobs:
client:
build-and-deploy:
permissions:
contents: "read"
id-token: "write"
deployments: "write"
strategy:
matrix:
os:
- "ubuntu-latest"
- "windows-latest"
- "macos-latest"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -35,313 +24,57 @@ jobs:
cache: "npm"
cache-dependency-path: |
package-lock.json
# uv required for javascript tests
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
# go needed for fake_gcs_server used by the javascript tests
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: "stable"
- run: npm ci
- run: npm run format:fix
- name: Check for dirty working directory
run: git diff --exit-code
- run: npm run lint:check
examples/**/package-lock.json
fetch-depth: 0
- run: npm install
- name: Typecheck with TypeScript
run: npm run typecheck
- name: Build client bundles
run: |
build_info="{'tag':'$(git describe --always --tags)', 'url':'https://github.com/google/neuroglancer/commit/$(git rev-parse HEAD)', 'timestamp':'$(date)'}"
npm run build -- --no-typecheck --no-lint --define NEUROGLANCER_BUILD_INFO="${build_info}"
echo $build_info > ./dist/client/version.json
- name: Get branch name (merge)
if: github.event_name != 'pull_request'
shell: bash
- name: Build Python client bundles
run: npm run build-python -- --no-typecheck --no-lint
- run: npm run build-package
- run: npm publish --dry-run
working-directory: dist/package
- name: Run JavaScript tests (including WebGL)
run: npm test
if: ${{ runner.os != 'macOS' }}
- name: Run JavaScript tests (excluding WebGL)
run: npm test -- --project node
if: ${{ runner.os == 'macOS' }}
- name: Run JavaScript benchmarks
run: npm run benchmark
- name: Upload NPM package as artifact
uses: actions/upload-artifact@v4
with:
name: npm-package
path: dist/package
if: ${{ runner.os == 'Linux' }}
- name: Upload client as artifact
uses: actions/upload-artifact@v4
with:
name: client
path: dist/client
if: ${{ runner.os == 'Linux' }}
example-project-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "pnpm"
cache-dependency-path: |
examples/**/pnpm-lock.yaml
- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "npm"
cache-dependency-path: |
package-lock.json
- run: npm ci
- run: npm run example-project-test -- --reporter=html
- name: Upload report and built clients
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: example-project-test-results
path: |
playwright-report/
examples/*/*/dist/

# Builds Python package and runs Python tests
#
# On ubuntu-latest, this also runs browser-based tests. On Mac OS and
# Windows, this only runs tests that do not require a browser, since a working
# headless WebGL2 implementation is not available on Github actions.
python-tests:
strategy:
matrix:
python-version:
- "3.9"
- "3.12"
os:
- "ubuntu-latest"
- "windows-latest"
- "macos-latest"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
# Need full history to determine version number.
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22.x
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: ./.github/actions/setup-firefox
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- run: uvx nox -s lint format mypy
- name: Check for dirty working directory
run: git diff --exit-code
- name: Run python tests (skip browser tests)
run: uvx nox -s test -- --skip-browser-tests
if: ${{ runner.os != 'Linux' }}
- name: Run python tests (include browser tests)
run: uvx nox -s test_xvfb -- --browser firefox
if: ${{ runner.os == 'Linux' }}
# Verify that editable install works
- name: Test in editable form
run: uvx nox -s test_editable

python-build-package:
strategy:
matrix:
include:
- os: "ubuntu-latest"
cibw_build: "*"
wheel_identifier: "linux"
- os: "windows-latest"
cibw_build: "*"
wheel_identifier: "windows"
- os: "macos-14"
cibw_build: "*_x86_64"
wheel_identifier: "macos_x86_64"
- os: "macos-14"
cibw_build: "*_arm64"
wheel_identifier: "macos_arm64"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
# Need full history to determine version number.
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "npm"
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Get uv cache dir
id: uv-cache
run: |
echo "dir=$(uv cache dir)" >> "$GITHUB_OUTPUT"
- run: npm ci
- run: |
build_info="{'tag':'$(git describe --always --tags)', 'url':'https://github.com/google/neuroglancer/commit/$(git rev-parse HEAD)', 'timestamp':'$(date)'}"
npm run build-python -- --no-typecheck --no-lint --define NEUROGLANCER_BUILD_INFO="${build_info}"
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
- name: Get branch name (pull request)
if: github.event_name == 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
- run: echo "BRANCH_NAME_URL=$(echo ${{ env.BRANCH_NAME }} | tr / - | tr _ -)" >> $GITHUB_ENV
- name: Get build info
run: echo "BUILD_INFO={\"tag\":\"$(git describe --always --tags)\", \"url\":\"https://github.com/${{github.repository}}/commit/$(git rev-parse HEAD)\", \"timestamp\":\"$(date)\", \"branch\":\"${{github.repository}}/${{env.BRANCH_NAME}}\"}" >> $GITHUB_ENV
shell: bash
- name: Check for dirty working directory
run: git diff --exit-code
- name: Build Python source distribution (sdist)
run: uv build --sdist
if: ${{ runner.os == 'Linux' }}
- name: Build Python wheels
run: uvx nox -s cibuildwheel
env:
# On Linux, share uv cache with manylinux docker containers
CIBW_ENVIRONMENT_LINUX: UV_CACHE_DIR=/host${{ steps.uv-cache.outputs.dir }}
CIBW_BEFORE_ALL_LINUX: /project/python/build_tools/cibuildwheel_linux_cache_setup.sh /host${{ steps.uv-cache.outputs.dir }}
CIBW_BUILD: ${{ matrix.cibw_build }}
- name: Upload wheels as artifacts
uses: actions/upload-artifact@v4
with:
name: python-wheels-${{ matrix.wheel_identifier }}
path: |
dist/*.whl
dist/*.tar.gz

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2
with:
macos-skip-brew-update: "true"
- name: Build docs
run: uvx nox -s docs
- name: Upload docs as artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: |
dist/docs

publish-package:
# Only publish package on push to tag or default branch.
if: ${{ github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master') }}
runs-on: ubuntu-latest
needs:
- "client"
- "python-build-package"
- "docs"
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
registry-url: "https://registry.npmjs.org"
- uses: actions/download-artifact@v4
with:
pattern: python-wheels-*
path: dist
merge-multiple: true
- uses: actions/download-artifact@v4
with:
name: npm-package
path: npm-package
# - name: Publish to PyPI (test server)
# uses: pypa/gh-action-pypi-publish@54b39fb9371c0b3a6f9f14bb8a67394defc7a806 # 2020-09-25
# with:
# user: __token__
# password: ${{ secrets.pypi_test_token }}
- name: Publish to PyPI (main server)
uses: pypa/gh-action-pypi-publish@54b39fb9371c0b3a6f9f14bb8a67394defc7a806 # 2020-09-25
with:
user: __token__
password: ${{ secrets.pypi_token }}
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Publish to NPM registry
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: npm publish
working-directory: npm-package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Download dist/client after publishing to PyPI, because PyPI publish
# action fails if dist/client directory is present.
- uses: actions/download-artifact@v4
with:
name: client
path: dist/client
- name: Publish client to Firebase hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: "${{ secrets.FIREBASE_HOSTING_SERVICE_ACCOUNT_KEY }}"
projectId: neuroglancer-demo
channelId: live
target: app
# Download dist/docs after publishing to PyPI, because PyPI publish
# action fails if dist/docs directory is present.
- uses: actions/download-artifact@v4
with:
name: docs
path: dist/docs
- name: Publish docs to Firebase hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: "${{ secrets.FIREBASE_HOSTING_SERVICE_ACCOUNT_KEY }}"
projectId: neuroglancer-demo
channelId: live
target: docs

ngauth:
strategy:
matrix:
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ngauth_server/go.mod
cache-dependency-path: ngauth_server/go.sum
- run: go build .
working-directory: ngauth_server
wasm:
# Ensures that .wasm files are reproducible.
strategy:
matrix:
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: ./src/mesh/draco/build.sh
- run: ./src/sliceview/compresso/build.sh
- run: ./src/sliceview/png/build.sh
- run: ./src/sliceview/jxl/build.sh
# Check that there are no differences.
- run: git diff --exit-code
- name: Build client bundles
run: npm run build -- --no-typecheck --no-lint --define STATE_SERVERS=$(cat config/state_servers.json | tr -d " \t\n\r") --define NEUROGLANCER_BUILD_INFO='${{ env.BUILD_INFO }}' --define CUSTOM_BINDINGS=$(cat config/custom-keybinds.json | tr -d " \t\n\r")
- name: Write build info
run: echo $BUILD_INFO > ./dist/client/version.json
shell: bash
- run: cp -r ./dist/client appengine/frontend/static/
- name: start deployment
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{ env.BRANCH_NAME }}
desc: Setting up staging deployment for ${{ env.BRANCH_NAME }}
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
workload_identity_provider: "projects/483670036293/locations/global/workloadIdentityPools/neuroglancer-github/providers/github"
service_account: "[email protected]"
- id: deploy
uses: google-github-actions/deploy-appengine@main
with:
version: ${{ env.BRANCH_NAME_URL }}
deliverables: appengine/frontend/app.yaml
promote: false
- name: update deployment status
uses: bobheadxi/deployments@v1
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{ steps.deployment.outputs.env }}
env_url: ${{ steps.deploy.outputs.url }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
Loading
Loading