Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
45 changes: 33 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
# Test on all hypervisor configurations before publishing
# NOTE: Windows WHP temporarily disabled (see pr-validate.yml)
test:
name: Test (${{ matrix.build }})
# Build native addons on each platform and upload as artifacts.
# These are combined in the publish-npm job to create a cross-platform package.
build-native:
name: Build (${{ matrix.build }})
strategy:
fail-fast: true
matrix:
build: [linux-kvm, linux-mshv]
build: [linux-kvm, windows-whp]
include:
- build: linux-kvm
os: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd"]
hypervisor: kvm
- build: linux-mshv
os: [self-hosted, Linux, X64, "1ES.Pool=hld-azlinux3-mshv-amd"]
hypervisor: mshv
- build: windows-whp
os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2022-amd"]
hypervisor: whp
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
Expand All @@ -55,14 +55,28 @@ jobs:

- name: Build release binary
run: node scripts/build-binary.js --release
env:
VERSION: ${{ github.event.release.tag_name || inputs.version }}

- name: Run tests
run: just test

# Build and publish npm package (after tests pass)
# Upload the native .node addons so the publish job can combine them
- name: Upload native addons
uses: actions/upload-artifact@v4
with:
name: native-addons-${{ matrix.build }}
path: |
deps/js-host-api/js-host-api.*.node
src/code-validator/guest/host/hyperlight-analysis.*.node
src/code-validator/guest/hyperlight-analysis.*.node
if-no-files-found: error
retention-days: 1

# Combine native addons from all platforms and publish a single npm package
publish-npm:
name: Publish to npmjs.org
needs: [test]
needs: [build-native]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -78,10 +92,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Download all platform native addons into their expected locations
- name: Download all native addons
uses: actions/download-artifact@v4
with:
pattern: native-addons-*
merge-multiple: true

- name: Setup
run: just setup

Comment thread
simongdavies marked this conversation as resolved.
Outdated
- name: Build binary
- name: Build binary (with all platform addons present)
run: VERSION="${{ github.event.release.tag_name || inputs.version }}" node scripts/build-binary.js --release

- name: Set version from release tag
Expand All @@ -100,7 +121,7 @@ jobs:
# Build and publish Docker image (after tests pass)
publish-docker:
name: Publish to GitHub Container Registry
needs: [test]
needs: [build-native]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand Down
4 changes: 2 additions & 2 deletions builtin-modules/ooxml-core.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "Shared OOXML infrastructure - units, colors, themes, Content_Types, relationships",
"author": "system",
"mutable": false,
"sourceHash": "sha256:1e939013c13555bc",
"dtsHash": "sha256:9f88e7c59a56854c",
"sourceHash": "sha256:b5f017fe2d4e2ed3",
"dtsHash": "sha256:6aac85502082bf89",
"importStyle": "named",
"hints": {
"overview": "Low-level OOXML infrastructure. Most users should use ha:pptx instead.",
Expand Down
4 changes: 2 additions & 2 deletions builtin-modules/pptx-charts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "OOXML DrawingML chart generation - bar, pie, line charts for PPTX presentations",
"author": "system",
"mutable": false,
"sourceHash": "sha256:5c521ce93ff39626",
"dtsHash": "sha256:5f653830226c3554",
"sourceHash": "sha256:4174b6f03be2e0fb",
"dtsHash": "sha256:4353b8263dc99405",
"importStyle": "named",
"hints": {
"overview": "Chart generation for PPTX. Always used with ha:pptx.",
Expand Down
4 changes: 2 additions & 2 deletions builtin-modules/pptx-tables.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "Styled tables for PPTX presentations - headers, borders, alternating rows",
"author": "system",
"mutable": false,
"sourceHash": "sha256:0739a7db5a8ab428",
"dtsHash": "sha256:82d903ffbf4dfb1e",
"sourceHash": "sha256:2d58934ed7df9fe1",
"dtsHash": "sha256:3ba75bbc44353467",
"importStyle": "named",
"hints": {
"overview": "Table generation for PPTX. Always used with ha:pptx.",
Expand Down
4 changes: 2 additions & 2 deletions builtin-modules/pptx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "PowerPoint PPTX presentation builder - slides, text, shapes, themes, layouts",
"author": "system",
"mutable": false,
"sourceHash": "sha256:093b19522e994756",
"dtsHash": "sha256:2107e369816b4bd5",
"sourceHash": "sha256:23569540a0f8622f",
"dtsHash": "sha256:27520514e4401465",
"importStyle": "named",
"hints": {
"overview": "Core PPTX slide building. Charts in ha:pptx-charts, tables in ha:pptx-tables.",
Expand Down
Loading
Loading