Skip to content

Commit 450f204

Browse files
author
Aliaksandr Adziareika
committed
Add yum package manager support
1 parent 75232cd commit 450f204

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,17 @@ runs:
4040
- name: Install ccache
4141
shell: bash
4242
run: |
43+
SUDO_CMD="sudo -E"
44+
if ! command -v sudo &> /dev/null; then
45+
SUDO_CMD=""
46+
fi
47+
4348
if ! command -v ccache &> /dev/null; then
4449
echo "Installing ccache..."
4550
if command -v apt-get &> /dev/null; then
46-
sudo apt-get update && sudo apt-get install -y ccache
51+
$SUDO_CMD apt-get update && $SUDO_CMD apt-get install -y ccache
52+
elif command -v yum &> /dev/null; then
53+
$SUDO_CMD yum install -y ccache
4754
elif command -v brew &> /dev/null; then
4855
HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
4956
elif command -v choco &> /dev/null; then

0 commit comments

Comments
 (0)