-
Notifications
You must be signed in to change notification settings - Fork 170
88 lines (75 loc) · 2.45 KB
/
dep_run_examples.yml
File metadata and controls
88 lines (75 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Run Examples
on:
workflow_call:
inputs:
docs_only:
description: Skip building if docs only
required: false
type: string
default: "false"
hypervisor:
description: Hypervisor for this run (passed from caller matrix)
required: true
type: string
config:
description: Build configuration for this run (passed from caller matrix)
required: true
type: string
cpu:
description: CPU architecture for the build (passed from caller matrix)
required: true
type: string
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
run-examples:
if: ${{ inputs.docs_only == 'false' }}
timeout-minutes: 15
runs-on: ${{ fromJson(
format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}"]',
inputs.hypervisor == 'hyperv-ws2025' && 'Windows' || 'Linux',
inputs.hypervisor == 'hyperv-ws2025' && 'win2025' || inputs.hypervisor == 'mshv3' && 'azlinux3-mshv' || inputs.hypervisor,
inputs.cpu)) }}
steps:
- uses: actions/checkout@v6
- uses: hyperlight-dev/ci-setup-workflow@v1.9.0
with:
rust-toolchain: "1.89"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fix cargo home permissions
if: runner.os == 'Linux'
run: |
sudo chown -R $(id -u):$(id -g) /opt/cargo || true
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "${{ runner.os }}-${{ inputs.config }}"
save-if: "false"
- name: Download Rust guests
uses: actions/download-artifact@v8
with:
name: rust-guests-${{ inputs.config }}
path: src/tests/rust_guests/bin/${{ inputs.config }}/
- name: Download C guests
uses: actions/download-artifact@v8
with:
name: c-guests-${{ inputs.config }}
path: src/tests/c_guests/bin/${{ inputs.config }}/
- name: Run Rust examples - windows
if: runner.os == 'Windows'
env:
RUST_LOG: debug
run: just run-rust-examples ${{ inputs.config }}
- name: Run Rust examples - linux
if: runner.os != 'Windows'
env:
RUST_LOG: debug
run: just run-rust-examples-linux ${{ inputs.config }}