Skip to content

Commit a31ce8e

Browse files
committed
Dont check cargo lock for Rust test guest
Signed-off-by: Simon Davies <[email protected]>
1 parent da37ab7 commit a31ce8e

File tree

2 files changed

+6
-30
lines changed

2 files changed

+6
-30
lines changed

.github/workflows/ValidatePullRequest.yml

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ permissions:
1818
contents: write
1919

2020
jobs:
21-
docs-and-common-deps-pr:
21+
docs-pr:
2222
runs-on: ubuntu-latest
2323
outputs:
2424
docs-only: ${{ steps.docs-only.outputs.result }}
@@ -32,9 +32,6 @@ jobs:
3232
- '**/*.txt'
3333
all:
3434
- '**/*'
35-
common_deps:
36-
- '**/src/hyperlight_guest/Cargo.toml'
37-
- '**/src/hyperlight_common/Cargo.toml'
3835
- uses: actions/github-script@v7
3936
id: docs-only
4037
with:
@@ -43,42 +40,22 @@ jobs:
4340
let all_file_count = ${{steps.changes.outputs.all_count}};
4441
return all_file_count === docs_file_count;
4542
result-encoding: string
46-
# Check to see if this a dependabot PR and if it updates either the common or guest Cargo.toml files
47-
# if it does we need to try and generate a new Cargo.lock file as the PR validation checks that these are up to date
48-
- name: checkout
49-
if: ${{ github.actor == 'dependabot[bot]' && steps.changes.outputs.common_deps_count > 0 }}
50-
uses: actions/checkout@v4
51-
with:
52-
ref: ${{ github.head_ref }}
53-
- name: Update Cargo.lock for dependabot changes
54-
if: ${{ github.actor == 'dependabot[bot]' && steps.changes.outputs.common_deps_count > 0 }}
55-
run: |
56-
cargo update --manifest-path src/tests/rust_guests/simpleguest/Cargo.toml
57-
cargo update --manifest-path src/tests/rust_guests/callbackguest/Cargo.toml
58-
if [ -n "$(git status --porcelain src/tests/rust_guests/simpleguest/Cargo.lock src/tests/rust_guests/callbackguest/Cargo.lock)" ]; then
59-
git config user.name "github-actions[bot]"
60-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
61-
git add src/tests/rust_guests/simpleguest/Cargo.lock
62-
git add src/tests/rust_guests/callbackguest/Cargo.lock
63-
git commit -m "Update Cargo.lock files for dependabot changes"
64-
git push
65-
fi
6643

6744
rust:
6845
needs:
69-
- docs-and-common-deps-pr
46+
- docs-pr
7047
uses: ./.github/workflows/dep_rust.yml
7148
secrets: inherit
7249
with:
73-
docs_only: ${{needs.docs-and-common-deps-pr.outputs.docs-only}}
50+
docs_only: ${{needs.docs-pr.outputs.docs-only}}
7451

7552
fuzzing:
7653
needs:
77-
- docs-and-common-deps-pr
54+
- docs-pr
7855
uses: ./.github/workflows/dep_fuzzing.yml
7956
with:
8057
max_total_time: 300 # 5 minutes in seconds
81-
docs_only: ${{needs.docs-and-common-deps-pr.outputs.docs-only}}
58+
docs_only: ${{needs.docs-pr.outputs.docs-only}}
8259
secrets: inherit
8360

8461
spelling:

.github/workflows/dep_rust.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@ jobs:
5050
- name: clippy
5151
run: just clippy ${{ matrix.config }}
5252

53+
# Does not check for updated Cargo.lock files for test rust guests as this causes an issue with this checkwhen deoendabot updates dependencies in common crates
5354
- name: Ensure up-to-date Cargo.lock
5455
run: |
5556
cargo fetch --locked
56-
cargo fetch --manifest-path src/tests/rust_guests/simpleguest/Cargo.toml --locked
57-
cargo fetch --manifest-path src/tests/rust_guests/callbackguest/Cargo.toml --locked
5857
5958
- name: Get gh action service name
6059
if: ${{ (runner.os == 'Windows' )}}

0 commit comments

Comments
 (0)