From 91acb071e0528be30bba00819e0422fa90ee719f Mon Sep 17 00:00:00 2001 From: Ludvig Liljenberg Date: Mon, 3 Feb 2025 12:36:19 -0800 Subject: [PATCH 1/4] Test Signed-off-by: Ludvig Liljenberg --- Justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Justfile b/Justfile index 56045d0b8..9ff46a5b1 100644 --- a/Justfile +++ b/Justfile @@ -1,7 +1,7 @@ import 'c.just' alias build-rust-debug := build-rust -set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"] +set windows-shell := ["pwsh.exe", "-NoLogo", "-Command", "$ErrorActionPreference = 'Stop';"] set dotenv-load := true set-trace-env-vars := if os() == "windows" { "$env:RUST_LOG='none,hyperlight-host=info';" } else { "RUST_LOG=none,hyperlight-host=info" } From d21ff394f84c6508dac0a9de9451b75a93ea4e83 Mon Sep 17 00:00:00 2001 From: Ludvig Liljenberg Date: Mon, 3 Feb 2025 13:08:38 -0800 Subject: [PATCH 2/4] Test 2 Signed-off-by: Ludvig Liljenberg --- .github/workflows/dep_rust.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dep_rust.yml b/.github/workflows/dep_rust.yml index 4754e8156..0b08dda9f 100644 --- a/.github/workflows/dep_rust.yml +++ b/.github/workflows/dep_rust.yml @@ -20,6 +20,10 @@ permissions: id-token: write contents: read +defaults: + run: + shell: bash + jobs: build: if: ${{ inputs.docs_only == 'false' }} @@ -55,11 +59,6 @@ jobs: run: | cargo fetch --locked - - name: Get gh action service name - if: ${{ (runner.os == 'Windows' )}} - run: (Get-Service actions.runner.*) | Foreach { $_.Name, $_.UserName, $_.ServiceType } - shell: pwsh - - name: Build and move Rust guests run: just build-and-move-rust-guests @@ -71,7 +70,6 @@ jobs: - name: Verify MSRV run: ./dev/verify-msrv.sh hyperlight-host hyperlight-guest hyperlight-common - shell: bash - name: Run Rust tests env: From 082f8308dc5324daec9a4a9c35b95856c8955311 Mon Sep 17 00:00:00 2001 From: Ludvig Liljenberg Date: Mon, 3 Feb 2025 13:31:13 -0800 Subject: [PATCH 3/4] revert unnecessary thigns Signed-off-by: Ludvig Liljenberg --- .github/workflows/dep_rust.yml | 5 +++++ Justfile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dep_rust.yml b/.github/workflows/dep_rust.yml index 0b08dda9f..444e91686 100644 --- a/.github/workflows/dep_rust.yml +++ b/.github/workflows/dep_rust.yml @@ -59,6 +59,11 @@ jobs: run: | cargo fetch --locked + - name: Get gh action service name + if: ${{ (runner.os == 'Windows' )}} + run: (Get-Service actions.runner.*) | Foreach { $_.Name, $_.UserName, $_.ServiceType } + shell: pwsh + - name: Build and move Rust guests run: just build-and-move-rust-guests diff --git a/Justfile b/Justfile index 9ff46a5b1..56045d0b8 100644 --- a/Justfile +++ b/Justfile @@ -1,7 +1,7 @@ import 'c.just' alias build-rust-debug := build-rust -set windows-shell := ["pwsh.exe", "-NoLogo", "-Command", "$ErrorActionPreference = 'Stop';"] +set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"] set dotenv-load := true set-trace-env-vars := if os() == "windows" { "$env:RUST_LOG='none,hyperlight-host=info';" } else { "RUST_LOG=none,hyperlight-host=info" } From 5dfd64e6dd42060783be6c296f0e3cf30f536a0c Mon Sep 17 00:00:00 2001 From: Ludvig Liljenberg Date: Thu, 6 Feb 2025 13:32:49 -0800 Subject: [PATCH 4/4] Add docs Signed-off-by: Ludvig Liljenberg --- .github/workflows/dep_rust.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/dep_rust.yml b/.github/workflows/dep_rust.yml index 444e91686..66f0a0ff8 100644 --- a/.github/workflows/dep_rust.yml +++ b/.github/workflows/dep_rust.yml @@ -20,6 +20,12 @@ permissions: id-token: write contents: read +# The reason for default shell bash is because on our self-hosted windows runners, +# the default shell is powershell, which doesn't work correctly together with `just` commands. +# Even if a command inside a just-recipe fails, github reports the step as successful. +# The problem may or may not be related to our custom windows runner not applying the +# powershell steps outlined here +# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference defaults: run: shell: bash