Skip to content

Commit 8f96ab9

Browse files
committed
Fixes
1 parent af91d00 commit 8f96ab9

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

.ci/check-format.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@ mapfile -t SH_SOURCES < <(git ls-files | grep -E '\.sh$')
2121

2222
if [ ${#SH_SOURCES[@]} -gt 0 ]; then
2323
echo "Checking shell scripts..."
24-
shfmt -d "${SH_SOURCES[@]}"
25-
SH_FORMAT_EXIT=$?
24+
MISMATCHED_SH=$(shfmt -l "${SH_SOURCES[@]}")
25+
if [ -n "$MISMATCHED_SH" ]; then
26+
echo "The following shell scripts are not formatted correctly:"
27+
echo "$MISMATCHED_SH"
28+
shfmt -d "${SH_SOURCES[@]}"
29+
SH_FORMAT_EXIT=1
30+
else
31+
SH_FORMAT_EXIT=0
32+
fi
2633
else
2734
SH_FORMAT_EXIT=0
2835
fi

.github/actions/setup-rv32emu/action.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@ description: 'Install dependencies for building rv32emu on Linux and macOS'
44
runs:
55
using: 'composite'
66
steps:
7+
- name: Cache APT packages
8+
if: runner.os == 'Linux'
9+
uses: actions/cache@v4
10+
with:
11+
path: /var/cache/apt/archives
12+
key: ${{ runner.os }}-apt-${{ hashFiles('.ci/*.sh') }}
13+
restore-keys: |
14+
${{ runner.os }}-apt-
15+
716
- name: Install Linux dependencies
817
if: runner.os == 'Linux'
918
shell: bash
1019
run: |
1120
sudo apt-get update -q=2
12-
sudo apt-get install -q=2 \
21+
sudo apt-get install -y -q=2 \
1322
build-essential \
1423
libsdl2-dev \
1524
libsdl2-mixer-dev \
@@ -19,15 +28,6 @@ runs:
1928
p7zip-full
2029
timeout-minutes: 5
2130

22-
- name: Cache APT packages
23-
if: runner.os == 'Linux'
24-
uses: actions/cache@v4
25-
with:
26-
path: /var/cache/apt/archives
27-
key: ${{ runner.os }}-apt-${{ hashFiles('.ci/*.sh') }}
28-
restore-keys: |
29-
${{ runner.os }}-apt-
30-
3131
- name: Install LLVM 18
3232
if: runner.os == 'Linux'
3333
shell: bash

0 commit comments

Comments
 (0)