Skip to content

Commit fde2885

Browse files
authored
Merge branch 'main' into dependabot/github_actions/crate-ci/typos-1.30.0
Signed-off-by: Simon Davies <[email protected]>
2 parents d9b3f91 + 29420da commit fde2885

36 files changed

+430
-237
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
"--device=/dev/kvm"
1818
],
1919

20-
// Use 'postCreateCommand' to run commands after the container is created
21-
"postCreateCommand": "bash .devcontainer/setup.sh",
20+
// use `postStartCommand` for additional setup commands
21+
// this is run after the container is created and the user has been added
22+
"postStartCommand": "bash .devcontainer/setup.sh",
2223

2324
"customizations": {
2425
"vscode": {

.github/workflows/Benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- uses: actions/checkout@v4
3030

31-
- uses: hyperlight-dev/ci-setup-workflow@v1.2.0
31+
- uses: hyperlight-dev/ci-setup-workflow@v1.3.0
3232
with:
3333
rust-toolchain: "1.81.0"
3434
env:

.github/workflows/CargoPublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
fetch-depth: 0
3333
fetch-tags: true
3434

35-
- uses: hyperlight-dev/ci-setup-workflow@v1.2.0
35+
- uses: hyperlight-dev/ci-setup-workflow@v1.3.0
3636
with:
3737
rust-toolchain: "1.81.0"
3838

.github/workflows/CreateRelease.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24-
- uses: hyperlight-dev/ci-setup-workflow@v1.2.0
24+
- uses: hyperlight-dev/ci-setup-workflow@v1.3.0
2525
with:
2626
rust-toolchain: "1.81.0"
2727
env:
@@ -41,7 +41,7 @@ jobs:
4141
steps:
4242
- uses: actions/checkout@v4
4343

44-
- uses: hyperlight-dev/ci-setup-workflow@v1.2.0
44+
- uses: hyperlight-dev/ci-setup-workflow@v1.3.0
4545
with:
4646
rust-toolchain: "1.81.0"
4747
env:
@@ -57,12 +57,6 @@ jobs:
5757
uses: ./.github/workflows/dep_build_guest_binaries.yml
5858
secrets: inherit
5959

60-
fuzzing:
61-
uses: ./.github/workflows/dep_fuzzing.yml
62-
with:
63-
max_total_time: 3600 # 1 hour in seconds
64-
secrets: inherit
65-
6660
benchmarks:
6761
needs: [build-guest-binaries]
6862
uses: ./.github/workflows/Benchmarks.yml
@@ -109,7 +103,7 @@ jobs:
109103
fetch-depth: 0
110104
fetch-tags: true
111105

112-
- uses: hyperlight-dev/ci-setup-workflow@v1.2.0
106+
- uses: hyperlight-dev/ci-setup-workflow@v1.3.0
113107
with:
114108
rust-toolchain: "1.81.0"
115109
env:

.github/workflows/Fuzzing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
1413
fuzzing:
1514
uses: ./.github/workflows/dep_fuzzing.yml
1615
with:
16+
targets: '["fuzz_host_print", "fuzz_guest_call", "fuzz_host_call"]' # Pass as a JSON array
1717
max_total_time: 18000 # 5 hours in seconds
1818
secrets: inherit

.github/workflows/ValidatePullRequest.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
- docs-pr
5555
uses: ./.github/workflows/dep_fuzzing.yml
5656
with:
57+
targets: '["fuzz_host_print", "fuzz_guest_call", "fuzz_host_call"]' # Pass as a JSON array
5758
max_total_time: 300 # 5 minutes in seconds
5859
docs_only: ${{needs.docs-pr.outputs.docs-only}}
5960
secrets: inherit
@@ -65,3 +66,23 @@ jobs:
6566
- uses: actions/checkout@v4
6667
- name: Spell Check Repo
6768
uses: crate-ci/[email protected]
69+
70+
# Gate PR merges on this specific "join-job" which requires all other
71+
# jobs to run first. We need this job since we cannot gate on particular jobs
72+
# in the workflow, since they can sometimes be skipped (e.g. if the PR only touches docs).
73+
# This step fixes this issue by always running.
74+
report-ci-status:
75+
needs:
76+
- docs-pr
77+
- rust
78+
- fuzzing
79+
- spelling
80+
if: always()
81+
runs-on: ubuntu-latest
82+
steps:
83+
- name: Previous jobs succeeded
84+
if: ${{ !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}
85+
run: exit 0
86+
- name: Previous jobs failed
87+
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
88+
run: exit 1

.github/workflows/dep_build_guest_binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@v4
3333

34-
- uses: hyperlight-dev/ci-setup-workflow@v1.2.0
34+
- uses: hyperlight-dev/ci-setup-workflow@v1.3.0
3535
with:
3636
rust-toolchain: "1.81.0"
3737
env:

.github/workflows/dep_fuzzing.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: Maximum total time for the fuzz run in seconds
88
required: true
99
type: number
10+
targets:
11+
description: Fuzz targets to run
12+
required: true
13+
type: string
1014
docs_only:
1115
description: Skip fuzzing if docs only
1216
required: false
@@ -21,11 +25,14 @@ jobs:
2125
fuzz:
2226
if: ${{ inputs.docs_only == 'false' }}
2327
runs-on: [ self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd" ]
28+
strategy:
29+
matrix:
30+
target: ${{ fromJson(inputs.targets) }}
2431
steps:
2532
- name: Checkout code
2633
uses: actions/checkout@v4
2734

28-
- uses: hyperlight-dev/ci-setup-workflow@v1.2.0
35+
- uses: hyperlight-dev/ci-setup-workflow@v1.3.0
2936
with:
3037
rust-toolchain: "1.81.0"
3138
env:
@@ -44,12 +51,12 @@ jobs:
4451
run: cargo install cargo-fuzz
4552

4653
- name: Run Fuzzing
47-
run: cargo +nightly fuzz run --release fuzz_target_1 -- -max_total_time=300
54+
run: just fuzz-timed ${{ matrix.target }} ${{ inputs.max_total_time }}
4855
working-directory: src/hyperlight_host
4956

5057
- name: Upload Crash Artifacts
5158
if: failure() # This ensures artifacts are only uploaded on failure
5259
uses: actions/upload-artifact@v4
5360
with:
5461
name: fuzz-crash-artifacts
55-
path: src/hyperlight_host/fuzz/artifacts/
62+
path: fuzz/artifacts/

.github/workflows/dep_rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
with:
5555
components: rustfmt
5656

57-
- uses: hyperlight-dev/ci-setup-workflow@v1.2.0
57+
- uses: hyperlight-dev/ci-setup-workflow@v1.3.0
5858
with:
5959
rust-toolchain: "1.81.0"
6060
env:

0 commit comments

Comments
 (0)