Skip to content

Commit 31ff637

Browse files
committed
check exit code
On success, Qemu exit with the code 3. Add check if this code was returned.
1 parent 5c526ef commit 31ff637

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,26 @@ jobs:
5959
- name: Build dev profile
6060
run: cargo build
6161
- name: Test debug profile (Qemu)
62-
run: cargo run
62+
run: |
63+
set +e
64+
cargo run
65+
if [ $? -eq 3 ]; then
66+
echo "Hermit runs succesfully within Qemu"
67+
exit 0
68+
else
69+
echo "Hermit isn't able to run within Qemu"
70+
exit 1
71+
fi
6372
- name: Build release profile
6473
run: cargo build --release
6574
- name: Test release profile (Qemu)
66-
run: cargo run --release
75+
run: |
76+
set +e
77+
cargo run --release
78+
if [ $? -eq 3 ]; then
79+
echo "Hermit runs succesfully within Qemu"
80+
exit 0
81+
else
82+
echo "Hermit isn't able to run within Qemu"
83+
exit 1
84+
fi

0 commit comments

Comments
 (0)