fix(ciyex-ehr): snapshot vitals show Temperature in °F (match encount… #246
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build macOS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| channel: | |
| description: 'Release channel' | |
| required: true | |
| type: choice | |
| options: | |
| - dev | |
| - stage | |
| - prod | |
| default: dev | |
| ref: | |
| description: 'Commit SHA to build (leave blank to use HEAD). Use this to promote a tested dev/stage commit up to the next channel.' | |
| required: false | |
| type: string | |
| default: '' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.inputs.channel || 'dev' }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build ${{ github.event.inputs.channel || 'dev' }} (macOS ${{ matrix.arch }}) | |
| runs-on: macos-14 | |
| timeout-minutes: 90 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [arm64, x64] | |
| env: | |
| VSCODE_ARCH: ${{ matrix.arch }} | |
| VSCODE_QUALITY: 'oss' | |
| # Pull the Electron binary from a mirror instead of GitHub's release CDN, | |
| # which has been returning 504 Gateway Time-out and breaking the build. | |
| ELECTRON_MIRROR: 'https://npmmirror.com/mirrors/electron/' | |
| CHANNEL: ${{ github.event.inputs.channel || 'dev' }} | |
| BUILD_REF: ${{ github.event.inputs.ref || github.sha }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.ref || github.sha }} | |
| - name: Verify channel + write channel marker | |
| run: node build/channels/apply.mjs "$CHANNEL" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Prepare node_modules cache key | |
| run: | | |
| mkdir -p .build | |
| node build/azure-pipelines/common/computeNodeModulesCacheKey.ts darwin "$VSCODE_ARCH" $(node -p process.arch) > .build/packagelockhash | |
| - name: Restore node_modules cache | |
| id: cache-node-modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build/node_modules_cache | |
| key: node_modules-darwin-${{ matrix.arch }}-${{ hashFiles('.build/packagelockhash') }} | |
| - name: Extract node_modules cache | |
| if: steps.cache-node-modules.outputs.cache-hit == 'true' | |
| run: tar -xzf .build/node_modules_cache/cache.tgz | |
| - name: Install dependencies | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| env: | |
| npm_config_arch: ${{ matrix.arch }} | |
| npm_config_foreground_scripts: 'true' | |
| ELECTRON_SKIP_BINARY_DOWNLOAD: 1 | |
| PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npm ci | |
| - name: Create node_modules archive | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| run: | | |
| node build/azure-pipelines/common/listNodeModules.ts .build/node_modules_list.txt | |
| mkdir -p .build/node_modules_cache | |
| tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt | |
| - name: Download Electron | |
| run: npm run electron "$VSCODE_ARCH" | |
| - name: Compile core and extensions | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npm run gulp core-ci | |
| - name: Build client (minified) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npm run gulp "vscode-darwin-${VSCODE_ARCH}-min-ci" | |
| - name: Package .app as tarball (preserves perms/symlinks for universal merge) | |
| run: | | |
| set -e | |
| APP_ROOT="../VSCode-darwin-${VSCODE_ARCH}" | |
| if [ ! -d "$APP_ROOT" ]; then | |
| echo "Expected app folder not found: $APP_ROOT" | |
| ls -la .. | |
| exit 1 | |
| fi | |
| mkdir -p artifacts | |
| tar -cf "artifacts/VSCode-darwin-${VSCODE_ARCH}.tar" -C .. "VSCode-darwin-${VSCODE_ARCH}" | |
| - name: Upload .app artifact (for universal merge) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mac-app-${{ matrix.arch }} | |
| path: artifacts/VSCode-darwin-${{ matrix.arch }}.tar | |
| retention-days: 1 | |
| universal: | |
| name: Merge universal (arm64 + x64) macOS bundle | |
| needs: build | |
| runs-on: macos-14 | |
| timeout-minutes: 30 | |
| env: | |
| VSCODE_ARCH: universal | |
| VSCODE_QUALITY: 'oss' | |
| CHANNEL: ${{ github.event.inputs.channel || 'dev' }} | |
| BUILD_REF: ${{ github.event.inputs.ref || github.sha }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.ref || github.sha }} | |
| - name: Verify channel + write channel marker | |
| run: node build/channels/apply.mjs "$CHANNEL" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Download arm64 .app | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: mac-app-arm64 | |
| path: in-arm64 | |
| - name: Download x64 .app | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: mac-app-x64 | |
| path: in-x64 | |
| - name: Unpack into universal merger layout | |
| run: | | |
| set -e | |
| BUILDDIR="$RUNNER_TEMP/build" | |
| mkdir -p "$BUILDDIR" | |
| tar -xf in-arm64/VSCode-darwin-arm64.tar -C "$BUILDDIR" | |
| tar -xf in-x64/VSCode-darwin-x64.tar -C "$BUILDDIR" | |
| ls -la "$BUILDDIR" | |
| echo "BUILDDIR=$BUILDDIR" >> "$GITHUB_ENV" | |
| - name: Install build/ deps (vscode-universal-bundler, minimatch) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npm ci --prefix build | |
| - name: Run universal merger | |
| run: node build/darwin/create-universal-app.ts "$BUILDDIR" | |
| - name: Compute version + zip universal app | |
| run: | | |
| set -e | |
| VERSION=$(node -p "require('./package.json').version") | |
| SUFFIX="" | |
| if [ "$CHANNEL" != "prod" ]; then | |
| SUFFIX=$(echo "$CHANNEL" | awk '{print toupper(substr($0,1,1)) substr($0,2)}') | |
| fi | |
| ZIP_NAME="CiyexWorkspace${SUFFIX}-darwin-universal-${VERSION}.zip" | |
| mkdir -p out | |
| UNI_DIR="$BUILDDIR/VSCode-darwin-universal" | |
| if [ ! -d "$UNI_DIR" ]; then | |
| echo "Universal output not found at $UNI_DIR" | |
| ls -la "$BUILDDIR" | |
| exit 1 | |
| fi | |
| (cd "$UNI_DIR" && zip -Xry "$GITHUB_WORKSPACE/out/$ZIP_NAME" *) | |
| echo "APP_VERSION=$VERSION" >> "$GITHUB_ENV" | |
| echo "CHANNEL_SUFFIX=$SUFFIX" >> "$GITHUB_ENV" | |
| echo "ZIP_NAME=$ZIP_NAME" >> "$GITHUB_ENV" | |
| - name: Generate update manifest | |
| run: | | |
| set -e | |
| TAG="v${APP_VERSION}-${CHANNEL}-darwin-universal.${{ github.run_number }}" | |
| BASE_URL="https://github.com/${{ github.repository }}/releases/download/${TAG}" | |
| ZIP_SHA=$(shasum -a 256 "out/${ZIP_NAME}" | awk '{print $1}') | |
| cat > out/metadata.json <<EOF | |
| { | |
| "version": "${APP_VERSION}", | |
| "commit": "${BUILD_REF}", | |
| "channel": "${CHANNEL}", | |
| "buildNumber": ${{ github.run_number }}, | |
| "publishedAt": $(date +%s), | |
| "platforms": { | |
| "darwin-universal-archive": { | |
| "url": "${BASE_URL}/${ZIP_NAME}", | |
| "sha256": "${ZIP_SHA}" | |
| } | |
| } | |
| } | |
| EOF | |
| cat out/metadata.json | |
| - name: Create per-build release (immutable) | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ env.APP_VERSION }}-${{ env.CHANNEL }}-darwin-universal.${{ github.run_number }} | |
| name: Ciyex Workspace ${{ env.CHANNEL_SUFFIX }} v${{ env.APP_VERSION }} macOS universal (Build ${{ github.run_number }}) | |
| target_commitish: ${{ env.BUILD_REF }} | |
| prerelease: ${{ env.CHANNEL != 'prod' }} | |
| files: out/* | |
| body: | | |
| ## Ciyex Workspace ${{ env.CHANNEL_SUFFIX }} — macOS (Universal) | |
| **Channel:** `${{ env.CHANNEL }}` | |
| **Build:** #${{ github.run_number }} | |
| **Commit:** ${{ env.BUILD_REF }} | |
| **Compatibility:** Apple Silicon (M1/M2/M3/M4) and Intel x86_64 — **one binary, every Mac**. | |
| ### Downloads | |
| - **Archive:** `${{ env.ZIP_NAME }}` | |
| ### First install | |
| Download the `.zip`, double-click to unpack `Ciyex Workspace.app`, | |
| then drag it into `/Applications`. Right-click → **Open** the first | |
| time so macOS Gatekeeper accepts the unsigned build. If macOS still | |
| blocks it, run: | |
| ``` | |
| xattr -dr com.apple.quarantine "/Applications/Ciyex Workspace.app" | |
| ``` | |
| - name: Update channel pointer release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -e | |
| TAG="${CHANNEL}-latest-darwin-universal" | |
| if ! gh release view "$TAG" --repo "${{ github.repository }}" >/dev/null 2>&1; then | |
| gh release create "$TAG" \ | |
| --repo "${{ github.repository }}" \ | |
| --title "Ciyex Workspace (${CHANNEL}) macOS universal — latest pointer" \ | |
| --notes "Auto-updated pointer release. The metadata.json asset always describes the latest ${CHANNEL} macOS universal build." \ | |
| --prerelease \ | |
| --target "${BUILD_REF}" | |
| fi | |
| gh release upload "$TAG" "out/metadata.json" --repo "${{ github.repository }}" --clobber | |
| echo "Pointer $TAG updated -> build ${{ github.run_number }}" |