Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
67 changes: 54 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@ on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
publish_target:
description: "What to run"
required: true
type: choice
options:
- all
- python
- dotnet
default: all

permissions:
contents: read

jobs:
# Build all Python packages on Linux (pure + backend wheels).
build-linux:
if: ${{ !github.event.act }}
if: ${{ !github.event.act && (github.event_name != 'workflow_dispatch' || inputs.publish_target == 'all' || inputs.publish_target == 'python') }}
name: Build Linux packages
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -51,7 +62,7 @@ jobs:

# Build Windows-specific maturin backend wheels only.
build-windows:
if: ${{ !github.event.act }}
if: ${{ !github.event.act && (github.event_name != 'workflow_dispatch' || inputs.publish_target == 'all' || inputs.publish_target == 'python') }}
name: Build Windows backend wheels
runs-on: windows-latest
steps:
Expand Down Expand Up @@ -87,7 +98,7 @@ jobs:

# Merge artifacts from both platforms and publish to PyPI.
publish:
if: ${{ !github.event.act }}
if: ${{ !github.event.act && (github.event_name != 'workflow_dispatch' || inputs.publish_target == 'all' || inputs.publish_target == 'python') }}
name: Publish to PyPI
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -115,7 +126,7 @@ jobs:

# Build the Windows native library for the .NET P/Invoke NuGet package.
dotnet-build-windows:
if: ${{ !github.event.act }}
if: ${{ !github.event.act && (github.event_name != 'workflow_dispatch' || inputs.publish_target == 'all' || inputs.publish_target == 'dotnet') }}
name: Build Windows .NET native library
runs-on: windows-latest
steps:
Expand All @@ -126,16 +137,31 @@ jobs:
cache-key: release-windows-dotnet
rustflags: ""

- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0

- name: Install Python
run: uv python install 3.12

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "latest"
cache: npm
cache-dependency-path: src/wasm_sandbox/guests/javascript/package-lock.json

- name: Install just
run: cargo install --locked just

- name: Install LLVM
run: choco install llvm -y

- name: Build sandbox runtimes
run: |
just wasm build release
just js build release
- name: Build WASM sandbox runtime
run: just wasm build release

- name: Build JavaScript sandbox runtime
run: just js build release

- name: Compile WIT world
run: just wasm guest-compile-wit

- name: Build Windows native library
run: just dotnet build-rust release
Expand All @@ -147,7 +173,7 @@ jobs:

# Build and publish .NET NuGet packages.
dotnet-publish:
if: ${{ !github.event.act }}
if: ${{ !github.event.act && (github.event_name != 'workflow_dispatch' || inputs.publish_target == 'all' || inputs.publish_target == 'dotnet') }}
name: Publish .NET NuGet packages
needs: [dotnet-build-windows]
runs-on: ubuntu-latest
Expand All @@ -168,6 +194,17 @@ jobs:
with:
dotnet-version: '8.0.x'

- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0

- name: Install Python
run: uv python install 3.12

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "latest"
cache: npm
cache-dependency-path: src/wasm_sandbox/guests/javascript/package-lock.json

- name: Install just
run: cargo install --locked just

Expand All @@ -181,10 +218,14 @@ jobs:
sudo udevadm trigger --name-match=kvm
sudo chmod 666 /dev/kvm

- name: Build sandbox runtimes
run: |
just wasm build release
just js build release
- name: Build WASM sandbox runtime
run: just wasm build release

- name: Build JavaScript sandbox runtime
run: just js build release

- name: Compile WIT world
run: just wasm guest-compile-wit

- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading