Skip to content
Open
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
6 changes: 4 additions & 2 deletions .github/workflows/CreateRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@ jobs:
strategy:
fail-fast: true
matrix:
arch: [X64]
hypervisor: ['hyperv-ws2025', mshv3, kvm]
cpu: [amd, intel]
cpu_vendor: [amd, intel]
uses: ./.github/workflows/dep_benchmarks.yml
secrets: inherit
with:
hypervisor: ${{ matrix.hypervisor }}
cpu: ${{ matrix.cpu }}
cpu_vendor: ${{ matrix.cpu_vendor }}
arch: ${{ matrix.arch }}
permissions:
contents: read

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/DailyBenchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ jobs:
strategy:
fail-fast: true
matrix:
arch: [X64]
hypervisor: ['hyperv-ws2025', mshv3, kvm]
cpu: [amd, intel]
cpu_vendor: [amd, intel]
uses: ./.github/workflows/dep_benchmarks.yml
secrets: inherit
with:
hypervisor: ${{ matrix.hypervisor }}
cpu: ${{ matrix.cpu }}
cpu_vendor: ${{ matrix.cpu_vendor }}
arch: ${{ matrix.arch }}
baseline_run_id: ${{ needs.find-baseline.outputs.run-id }}
retention_days: 90

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/Fuzzing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ jobs:

fuzzing:
needs: build-guests
strategy:
matrix:
target: ['fuzz_host_print', 'fuzz_guest_call', 'fuzz_host_call', 'fuzz_guest_estimate_trace_event', 'fuzz_guest_trace']
uses: ./.github/workflows/dep_fuzzing.yml
with:
targets: '["fuzz_host_print", "fuzz_guest_call", "fuzz_host_call", "fuzz_guest_estimate_trace_event", "fuzz_guest_trace"]' # Pass as a JSON array
target: ${{ matrix.target }}
arch: X64
max_total_time: 18000 # 5 hours in seconds
secrets: inherit

Expand Down
54 changes: 34 additions & 20 deletions .github/workflows/PrimeCaches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,26 @@ defaults:
shell: bash

jobs:
# Populate v0-rust-guests-{debug,release}-Linux-x64 caches.
# Populate guest caches (key guests-{arch}-{config}) for both architectures.
guests:
strategy:
fail-fast: false
matrix:
arch: [X64, arm64]
config: [debug, release]
uses: ./.github/workflows/dep_build_guests.yml
secrets: inherit
with:
arch: X64
arch: ${{ matrix.arch }}
config: ${{ matrix.config }}

# Populate v0-rust-code-checks-{linux,windows} caches.
code-checks:
uses: ./.github/workflows/dep_code_checks.yml
secrets: inherit

# Populate v0-rust-{Linux,Windows}-{hypervisor}-{debug,release} caches used
# by dep_build_test.yml. Linux is primed once per hypervisor because the kvm
# Populate the host caches (key {arch}-{os}-{hypervisor}-{config}) used by
# dep_build_test.yml. Linux is primed once per hypervisor because the kvm
# pools run Ubuntu and the mshv3 pools run Azure Linux 3, and we want each
# distro to restore a cache produced under its own libc. Only the host
# dependency graph is built here, no tests are run.
Expand All @@ -55,28 +56,41 @@ jobs:
fail-fast: false
matrix:
include:
- hypervisor: kvm
- arch: X64
hypervisor: kvm
config: debug
- hypervisor: kvm
- arch: X64
hypervisor: kvm
config: release
- hypervisor: mshv3
- arch: X64
hypervisor: mshv3
config: debug
- hypervisor: mshv3
- arch: X64
hypervisor: mshv3
config: release
- hypervisor: hyperv-ws2025
- arch: X64
hypervisor: hyperv-ws2025
config: debug
- hypervisor: hyperv-ws2025
- arch: X64
hypervisor: hyperv-ws2025
config: release
- arch: arm64
hypervisor: kvm
config: debug
- arch: arm64
hypervisor: kvm
config: release
timeout-minutes: 30
runs-on: ${{ fromJson(
format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-amd", "JobId=prime-cache-{2}-{3}-{4}-{5}-{6}"]',
matrix.hypervisor == 'hyperv-ws2025' && 'Windows' || 'Linux',
matrix.hypervisor == 'hyperv-ws2025' && 'win2025' || matrix.hypervisor == 'mshv3' && 'azlinux3-mshv' || matrix.hypervisor,
matrix.hypervisor,
matrix.config,
github.run_id,
github.run_number,
github.run_attempt)) }}
runs-on: ${{ fromJson(matrix.arch == 'X64'
&& format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-amd", "JobId=prime-cache-{2}-{3}-{4}-{5}-{6}"]',
matrix.hypervisor == 'hyperv-ws2025' && 'Windows' || 'Linux',
matrix.hypervisor == 'hyperv-ws2025' && 'win2025' || matrix.hypervisor == 'mshv3' && 'azlinux3-mshv' || matrix.hypervisor,
matrix.hypervisor,
matrix.config,
github.run_id,
github.run_number,
github.run_attempt)
|| '["self-hosted", "Linux", "arm64", "kvm", "ubuntu-24.04"]') }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

Expand All @@ -94,7 +108,7 @@ jobs:
- name: Rust cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
shared-key: "${{ runner.os }}-${{ matrix.hypervisor }}-${{ matrix.config }}"
shared-key: "${{ matrix.arch }}-${{ runner.os }}-${{ matrix.hypervisor }}-${{ matrix.config }}"
cache-on-failure: "true"
# Only save on main as caches are not shared across branches.
# https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching#restrictions-for-accessing-a-cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/RustNightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
fail-fast: true
matrix:
hypervisor: [kvm, mshv3]
cpu: [amd, intel]
cpu_vendor: [amd, intel]
config: [debug, release]
runs-on: ${{ fromJson(
format('["self-hosted", "Linux", "X64", "1ES.Pool=hld-{0}-{1}", "JobId=musl-{2}-{3}-{4}-{5}"]',
matrix.hypervisor == 'mshv3' && 'azlinux3-mshv' || matrix.hypervisor,
matrix.cpu,
matrix.cpu_vendor,
matrix.config,
github.run_id,
github.run_number,
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ValidatePullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,26 +94,26 @@ jobs:
fail-fast: true
matrix:
hypervisor: ['hyperv-ws2025', mshv3, kvm]
cpu: [amd, intel, apple]
cpu_vendor: [amd, intel, apple]
arch: [X64, arm64]
config: [debug, release]
exclude:
- cpu: apple
- cpu_vendor: apple
hypervisor: hyperv-ws2025
- cpu: apple
- cpu_vendor: apple
hypervisor: mshv3
- cpu: amd
- cpu_vendor: amd
arch: arm64
- cpu: intel
- cpu_vendor: intel
arch: arm64
- cpu: apple
- cpu_vendor: apple
arch: X64
uses: ./.github/workflows/dep_build_test.yml
secrets: inherit
with:
docs_only: ${{ needs.docs-pr.outputs.docs-only }}
hypervisor: ${{ matrix.hypervisor }}
cpu: ${{ matrix.cpu }}
cpu_vendor: ${{ matrix.cpu_vendor }}
arch: ${{ matrix.arch }}
config: ${{ matrix.config }}

Expand All @@ -130,26 +130,26 @@ jobs:
fail-fast: true
matrix:
hypervisor: ['hyperv-ws2025', mshv3, kvm]
cpu: [amd, intel, apple]
cpu_vendor: [amd, intel, apple]
arch: [X64, arm64]
config: [debug, release]
exclude:
- cpu: apple
- cpu_vendor: apple
hypervisor: hyperv-ws2025
- cpu: apple
- cpu_vendor: apple
hypervisor: mshv3
- cpu: amd
- cpu_vendor: amd
arch: arm64
- cpu: intel
- cpu_vendor: intel
arch: arm64
- cpu: apple
- cpu_vendor: apple
arch: X64
uses: ./.github/workflows/dep_run_examples.yml
secrets: inherit
with:
docs_only: ${{ needs.docs-pr.outputs.docs-only }}
hypervisor: ${{ matrix.hypervisor }}
cpu: ${{ matrix.cpu }}
cpu_vendor: ${{ matrix.cpu_vendor }}
arch: ${{ matrix.arch }}
config: ${{ matrix.config }}

Expand Down
41 changes: 23 additions & 18 deletions .github/workflows/dep_benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

# Reusable workflow to run benchmarks on a single hypervisor/cpu combination.
# Reusable workflow to run benchmarks on a single hypervisor/cpu_vendor combination.
#
# Baseline comparison:
# The workflow supports two mutually exclusive ways to load a baseline for
Expand All @@ -20,7 +20,7 @@
#
# Artifact upload:
# Benchmark results are always uploaded as workflow artifacts named
# benchmarks_<OS>_<hypervisor>_<cpu>. The retention_days input controls
# benchmarks_<OS>_<hypervisor>_<cpu_vendor>. The retention_days input controls
# how long they are kept (default: 5 days).

name: Run Benchmarks
Expand All @@ -37,8 +37,12 @@ on:
description: Hypervisor for this run (passed from caller matrix)
required: true
type: string
cpu:
description: CPU architecture for the build (passed from caller matrix)
cpu_vendor:
description: CPU vendor for the build, amd or intel (passed from caller matrix)
required: true
type: string
arch:
description: CPU architecture for the build, X64 or arm64 (passed from caller matrix)
required: true
type: string
baseline_tag:
Expand Down Expand Up @@ -72,14 +76,15 @@ jobs:
run-benchmarks:
if: ${{ inputs.docs_only == 'false' }}
timeout-minutes: 60
runs-on: ${{ fromJson(
format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}", "JobId=run-benchmarks-{3}-{4}-{5}"]',
inputs.hypervisor == 'hyperv-ws2025' && 'Windows' || 'Linux',
inputs.hypervisor == 'hyperv-ws2025' && 'win2025' || inputs.hypervisor == 'mshv3' && 'azlinux3-mshv' || inputs.hypervisor,
inputs.cpu,
github.run_id,
github.run_number,
github.run_attempt)) }}
runs-on: ${{ fromJson(inputs.arch == 'X64'
&& format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}", "JobId=run-benchmarks-{3}-{4}-{5}"]',
inputs.hypervisor == 'hyperv-ws2025' && 'Windows' || 'Linux',
inputs.hypervisor == 'hyperv-ws2025' && 'win2025' || inputs.hypervisor == 'mshv3' && 'azlinux3-mshv' || inputs.hypervisor,
inputs.cpu_vendor,
github.run_id,
github.run_number,
github.run_attempt)
|| '["self-hosted", "Linux", "arm64", "kvm", "ubuntu-24.04"]') }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

Expand All @@ -97,19 +102,19 @@ jobs:
- name: Rust cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
shared-key: "${{ runner.os }}-${{ inputs.hypervisor }}-release"
shared-key: "${{ inputs.arch }}-${{ runner.os }}-${{ inputs.hypervisor }}-release"
save-if: "false"

- name: Download Rust guests
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: rust-guests-X64-release
name: rust-guests-${{ inputs.arch }}-release
path: src/tests/rust_guests/bin/release/

- name: Download C guests
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: c-guests-X64-release
name: c-guests-${{ inputs.arch }}-release
path: src/tests/c_guests/bin/release/

- name: Build
Expand All @@ -119,15 +124,15 @@ jobs:
if: ${{ inputs.baseline_run_id != '' }}
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: benchmarks_${{ runner.os }}_${{ inputs.hypervisor }}_${{ inputs.cpu }}
name: benchmarks_${{ runner.os }}_${{ inputs.hypervisor }}_${{ inputs.cpu_vendor }}
path: ./target/criterion/
run-id: ${{ inputs.baseline_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true

- name: Download baseline from release
if: ${{ inputs.baseline_run_id == '' }}
run: just bench-download ${{ runner.os }} ${{ inputs.hypervisor }} ${{ inputs.cpu }} ${{ inputs.baseline_tag }}
run: just bench-download ${{ runner.os }} ${{ inputs.hypervisor }} ${{ inputs.cpu_vendor }} ${{ inputs.baseline_tag }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
Expand All @@ -137,7 +142,7 @@ jobs:

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: benchmarks_${{ runner.os }}_${{ inputs.hypervisor }}_${{ inputs.cpu }}
name: benchmarks_${{ runner.os }}_${{ inputs.hypervisor }}_${{ inputs.cpu_vendor }}
path: ./target/criterion/
if-no-files-found: error
retention-days: ${{ inputs.retention_days }}
18 changes: 7 additions & 11 deletions .github/workflows/dep_build_guests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,13 @@ jobs:
build-guests:
if: ${{ inputs.docs_only == 'false' }}
timeout-minutes: 15
runs-on: ${{ fromJson(
format('["self-hosted", "Linux", "{0}", "{1}" {2}]',
inputs.arch,
inputs.arch == 'X64' && '1ES.Pool=hld-kvm-amd' || 'ubuntu-24.04',
inputs.arch == 'X64' && format(', "JobId=build-guests-{0}-{1}-{2}-{3}"',
inputs.config,
github.run_id,
github.run_number,
github.run_attempt)
|| ''
)) }}
runs-on: ${{ fromJson(inputs.arch == 'X64'
&& format('["self-hosted", "Linux", "X64", "1ES.Pool=hld-kvm-amd", "JobId=build-guests-{0}-{1}-{2}-{3}"]',
inputs.config,
github.run_id,
github.run_number,
github.run_attempt)
|| '["self-hosted", "Linux", "arm64", "ubuntu-24.04"]') }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/dep_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
description: Build configuration for this run (passed from caller matrix)
required: true
type: string
cpu:
cpu_vendor:
description: CPU vendor for the build (passed from caller matrix)
required: true
type: string
Expand All @@ -42,12 +42,16 @@ jobs:
build-and-test:
if: ${{ inputs.docs_only == 'false' }}
timeout-minutes: 45
runs-on: ${{ fromJson(
format('["self-hosted", "{0}", "{1}", {2} {3}]',
inputs.hypervisor == 'hyperv-ws2025' && 'Windows' || 'Linux',
inputs.arch,
inputs.arch == 'X64' && format('"1ES.Pool=hld-{0}-{1}"', inputs.hypervisor == 'hyperv-ws2025' && 'win2025' || inputs.hypervisor == 'mshv3' && 'azlinux3-mshv' || inputs.hypervisor, inputs.cpu) || inputs.hypervisor == 'kvm' && '"kvm", "ubuntu-24.04"' || '',
inputs.arch == 'X64' && format(', "JobId=build-and-test-{0}-{1}-{2}-{3}"', inputs.config, github.run_id, github.run_number, github.run_attempt) || '')) }}
runs-on: ${{ fromJson(inputs.arch == 'X64'
&& format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}", "JobId=build-and-test-{3}-{4}-{5}-{6}"]',
inputs.hypervisor == 'hyperv-ws2025' && 'Windows' || 'Linux',
inputs.hypervisor == 'hyperv-ws2025' && 'win2025' || inputs.hypervisor == 'mshv3' && 'azlinux3-mshv' || inputs.hypervisor,
inputs.cpu_vendor,
inputs.config,
github.run_id,
github.run_number,
github.run_attempt)
|| '["self-hosted", "Linux", "arm64", "kvm", "ubuntu-24.04"]') }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

Expand Down
Loading
Loading