Skip to content

Commit 60f4996

Browse files
authored
Merge pull request espressif#136 from eringerli/remove-unneded-apg-get-install
Only install clang-format if it is really missing
2 parents d69421a + a4b6ff8 commit 60f4996

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

actions_install.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
set -e
44

55
pip3 install clint pyserial setuptools adafruit-nrfutil
6-
sudo gem install apt-spy2
7-
sudo apt-spy2 check
8-
sudo apt-spy2 fix --commit
96

10-
# after selecting a specific mirror, we need to run 'apt-get update'
11-
sudo apt-get -o Acquire::Retries=3 update
7+
# Only install stuff if it is really missing. This should never be executed,
8+
# as the default image contains clang-format v10, v11 (default) and v12.
9+
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#language-and-runtime
10+
if [ ! -f /usr/bin/clang-format ]; then
11+
sudo gem install apt-spy2
12+
sudo apt-spy2 check
13+
sudo apt-spy2 fix --commit
1214

13-
sudo apt-get -o Acquire::Retries=3 install -y libllvm8 -V
15+
# after selecting a specific mirror, we need to run 'apt-get update'
16+
sudo apt-get -o Acquire::Retries=3 update
17+
18+
sudo apt-get -o Acquire::Retries=3 install -y clang-format-8 libllvm8
1419

15-
sudo apt install -fy cppcheck clang-format-8
16-
if [ ! -f /usr/bin/clang-format ]; then
1720
sudo ln -s /usr/bin/clang-format-8 /usr/bin/clang-format
1821
fi
1922

0 commit comments

Comments
 (0)