Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
83bd845
test: migrate to vitest with parallel per-package CI + benchmark PR c…
sedghi May 19, 2026
adb0b61
chore: rename vitest configs to .mjs to silence Vite CJS deprecation
sedghi May 19, 2026
4088cc4
fix(ci): post benchmark comment on test failures, fix openjph + 12bit…
sedghi May 19, 2026
54f51bc
fix(ci): split build/test matrices so dicom-codec sees sibling dists;…
sedghi May 19, 2026
c3e46b5
perf(ci): stop rebuilding PR dist after main baseline benchmark
sedghi May 19, 2026
ec2d148
fix(ci): persist only per-package files to avoid concurrent workspace…
sedghi May 19, 2026
beab0fb
feat(bench): wire CodSpeed instrumented benchmarks via vitest
sedghi May 19, 2026
1452354
fix(ci): switch benchmark.js to .mjs + load endian dist instead of ES…
sedghi May 19, 2026
f90e537
fix(ci): use official CodSpeed installer URL
sedghi May 19, 2026
c69efe4
fix(ci): pass --mode instrumentation to codspeed run
sedghi May 19, 2026
10d4798
chore(ci): drop homegrown benchmark + comment infra, rely on CodSpeed
sedghi May 19, 2026
53d6821
test(fixtures): add real fixtures for .51/.57/.70/.81/.91/.5 + drop d…
sedghi May 20, 2026
51e17fd
test(bench): exercise every fixture/transfer-syntax via vitest bench
sedghi May 20, 2026
1c5f9db
fix(ci): create empty dist/ before persist so build-dicom-codec succeeds
sedghi May 20, 2026
5d42163
ci: trigger run to validate CodSpeed connection
sedghi May 20, 2026
fd32e83
ci: move PR build/test/bench to GitHub Actions; keep NPM publish on C…
sedghi May 20, 2026
0076b4f
ci: retrigger to pick up CODSPEED_TOKEN secret
sedghi May 20, 2026
098e16e
ci: adopt CodSpeed wizard improvements from PR #65
sedghi May 20, 2026
1f42981
fix(test): unbrittle 12-bit assertions + use byteLength for dispatcher
sedghi May 20, 2026
98ef3e2
fix(test): libjpeg-turbo-12bit returns Uint16Array — use byteLength
sedghi May 20, 2026
8c57ce1
fix(test): assert actual (buggy) bitsPerSample=8 with FIXME pointer
sedghi May 20, 2026
a5b8ee6
fix(ci): pin @codspeed/vitest-plugin to v4 + skip .51 transfer syntax
sedghi May 20, 2026
fa2db51
ci: empty commit to measure CodSpeed run-to-run variance
sedghi May 20, 2026
6f97516
perf(bench): split instantiation from decode/encode kernel measurement
sedghi May 20, 2026
098bb31
perf(bench): switch codec benches to shared decoder + warmup pattern
sedghi May 20, 2026
b4b14d1
perf(bench): split each codec bench into cold and warm variants
sedghi May 20, 2026
7fee128
docs(bench): explain the CPU-simulation measurement model
sedghi May 20, 2026
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
310 changes: 74 additions & 236 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,236 +1,74 @@
version: 2.1

#
## https://github.com/cypress-io/circleci-orb
# orbs:
# codecov: codecov/codecov@1.0.5
# cypress: cypress-io/cypress@1.26.0

#https://circleci.com/docs/2.0/configuration-reference/#docker--machine--macos--windows-executor
executors:
emscripten-porter:
docker:
# @see https://hub.docker.com/repository/r/emscripten/emsdk
- image: emscripten/emsdk:3.1.74
environment:
# Enable colors in term
TERM: xterm
# Avoid warnings by switching to noninteractive
DEBIAN_FRONTEND: noninteractive
# This Dockerfile's base image has a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
USERNAME: vscode
USER_UID: 1000
USER_GID: 1000 # $USER_UID
node:
docker:
- image: cimg/node:18.20.3
environment:
TERM: xterm # Enable colors in term
# Custom executor to override Cypress config
# deploy-to-prod-executor:
# docker:
# - image: 'cypress/browsers:node14.15.0-chrome86-ff82'
# environment:
# CYPRESS_BASE_URL: https://ohif-staging.netlify.com/
# chrome-and-pacs:
# docker:
# # Primary container image where all steps run.
# - image: 'cypress/browsers:node14.15.0-chrome86-ff82'
# - image: 'ohif/viewer-testdata:0.1-test'

jobs:
# Run build since main
# Run test since main
# Upload test results to CircleCI
# Upload test results to a ?? per package?
BUILD:
executor: emscripten-porter
working_directory: ~/repo
steps:
- run:
name: Configure apt and install packages
command: |
# apt-get update
# apt-get install -y gnupg

# Install & Setup Yarn
#curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
#echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

# apt-get update && apt install nodejs -y
npm install --global yarn@1.22.22

# Install C++ tools
apt-get update && apt-get -y install build-essential cppcheck valgrind kcachegrind

# Dependencies for libjpeg-turbo builds
# apt-get -y install nasm texinfo

# version 3.17 of cmake
wget -qO- "https://cmake.org/files/v3.17/cmake-3.17.4-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local

# [Optional] Update UID/GID if needed
if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then
groupmod --gid $USER_GID $USERNAME
usermod --uid $USER_UID --gid $USER_GID $USERNAME
chown -R $USER_UID:$USER_GID /home/$USERNAME;
fi

# Clean up
apt-get autoremove -y
apt-get clean -y
rm -rf /var/lib/apt/lists/*
- run: gcc --version
- checkout
- run: git submodule update --init --recursive
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- run: yarn run build:ci
- persist_to_workspace:
root: ~/repo
paths:
- .

TEST:
executor: node
working_directory: ~/repo
steps:
- attach_workspace:
at: ~/repo
- run: yarn run test:ci

NPM_PUBLISH:
executor: emscripten-porter
working_directory: ~/repo
steps:
#
# Environment setup to install yarn, CMAKE, and C++ tools
# TODO: Leverage CircleCI caching for these dependencies across builds,
# or configure docker layer caching (this should be deterministic). We could
# also publish an image on top of our executor to speed up build times.
# TODO: As this is a requirement for local testing, we should probably
# push this into a shared script
- run:
name: Configure apt and install packages
command: |
apt-get update
apt-get install -y gnupg

# Install & Setup Yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

apt-get update
apt install yarn -y

# Install C++ tools
apt-get -y install build-essential cppcheck valgrind kcachegrind

# version 3.17 of cmake
wget -qO- "https://cmake.org/files/v3.17/cmake-3.17.4-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local

# [Optional] Update UID/GID if needed
if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then
groupmod --gid $USER_GID $USERNAME
usermod --uid $USER_UID --gid $USER_GID $USERNAME
chown -R $USER_UID:$USER_GID /home/$USERNAME;
fi

# Clean up
apt-get autoremove -y
apt-get clean -y
rm -rf /var/lib/apt/lists/*
#
# Print versions of misc. dependent tooling
- run: gcc --version
- run: node -v
- run: yarn -v
#
# Checkout source code and dependent submodules
# Where submodules are the C/C++ libraries we intend to port
# using emscripten
- checkout
- run: git submodule update --init --recursive
#
# Caches dependencies between CI runs. We use the `yarn.lock` file as our
# "cache key". We then restore dependencies from lockfile and update our
# cache if it's changed.
- restore_cache:
name: Restore Yarn and Cypress Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- yarn-packages-
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- run: yarn run build:publish
- save_cache:
name: Save Yarn Package Cache
paths:
- ~/.cache/yarn
key: yarn-packages-{{ checksum "yarn.lock" }}
#
# This step is a prerequisite for `lerna version`
# The git config values need to match the personal access token set
# via the `GH_TOKEN` environment variable
- run:
name: Avoid hosts unknown for github
command: |
rm -rf ~/.ssh
mkdir ~/.ssh/
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
git config --global user.email "danny.ri.brown@gmail.com"
git config --global user.name "dannyrb"
#
# This step is a prerequisite for `lera publish`
# Lerna and NPM will not automatically detect environment variables
# instead, we set our registry and auth token by writing to a temporary
# `.npmrc` file that `lerna publish`/`npm publish` will use
# The value is determined by out `NPM_TOKEN` environment variable
- run:
name: Authenticate with NPM registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
#
# Verify authentication with npm registry
- run:
name: Verify NPM authentication
command: npm whoami
#
# This step is configured in `/lerna.json`.
# Only runs on `main` branch. Walks all commits since last tagged release.
# Determines, based on commit syntax and files changed, what each packages new
# version should be. Creates a commit to update all updated package versions.
# Pushes commit to main, cuts GitHub release w/ changelog.
# @see https://github.com/lerna/lerna/tree/main/commands/version
- run: npx lerna version
#
# This step is configured in `/lerna.json`.
# Checks package versions and publishes packages where the latest version is not
# present in the registry. This command ignores changes to files w/ specific extensions.
# @see https://github.com/lerna/lerna/tree/main/commands/publish
- run: npx lerna publish from-package

workflows:
version: 2

PR_CHECKS:
jobs:
- BUILD:
filters:
branches:
ignore:
- main
- TEST:
requires:
- BUILD
DEPLOY:
jobs:
- NPM_PUBLISH:
filters:
branches:
only: main
# VS Code Extension Version: 1.4.0
version: 2.1

# PR checks (build/test/bench) live in GitHub Actions —
# see .github/workflows/pr-checks.yml. CircleCI only handles the npm
# publish on main now, since the existing GH_TOKEN/NPM_TOKEN env vars and
# release flow are already wired up here.

executors:
emscripten-porter:
docker:
- image: emscripten/emsdk:3.1.74
environment:
TERM: xterm
DEBIAN_FRONTEND: noninteractive
USERNAME: vscode
USER_UID: 1000
USER_GID: 1000

commands:
install-build-tools:
description: Install yarn + cmake + C++ build deps on top of the emsdk image
steps:
- run:
name: Install build tooling
command: |
npm install --global yarn@1.22.22
apt-get update
apt-get -y install build-essential
wget -qO- "https://cmake.org/files/v3.17/cmake-3.17.4-Linux-x86_64.tar.gz" \
| tar --strip-components=1 -xz -C /usr/local
apt-get autoremove -y
apt-get clean -y
rm -rf /var/lib/apt/lists/*

jobs:
NPM_PUBLISH:
executor: emscripten-porter
working_directory: ~/repo
steps:
- install-build-tools
- checkout
- run: git submodule update --init --recursive
- restore_cache:
keys:
- yarn-{{ checksum "yarn.lock" }}
- yarn-
- run: yarn install --frozen-lockfile
- run: yarn run build:publish
- save_cache:
key: yarn-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run:
name: Configure git + npm auth
command: |
rm -rf ~/.ssh
mkdir -p ~/.ssh/
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
git config --global user.email "danny.ri.brown@gmail.com"
git config --global user.name "dannyrb"
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run: npm whoami
- run: npx lerna version
- run: npx lerna publish from-package

workflows:
version: 2

DEPLOY:
jobs:
- NPM_PUBLISH:
filters:
branches:
only: main
Loading
Loading