Skip to content

Commit 0ff45ea

Browse files
authored
fix(ci): support CRIU installation on Debian runners (#103)
add-apt-repository and PPAs are Ubuntu-specific. On Debian, install CRIU directly from the default repos and only use the PPA on Ubuntu.
1 parent 9bf3b18 commit 0ff45ea

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/actions/dependencies/action.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,17 @@ runs:
102102
fi
103103
104104
# Install CRIU for checkpoint-restore support.
105-
# CRIU is not in Ubuntu 24.04 default repos; use the official PPA.
105+
# On Ubuntu 24.04 CRIU is not in default repos; use the official PPA.
106+
# On Debian, CRIU is available in the default repos.
106107
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
107-
sudo add-apt-repository -y ppa:criu/ppa
108-
sudo apt-get update
108+
if [ -f /etc/os-release ]; then
109+
. /etc/os-release
110+
fi
111+
if [ "${ID:-}" = "ubuntu" ]; then
112+
sudo apt-get install -y software-properties-common
113+
sudo add-apt-repository -y ppa:criu/ppa
114+
sudo apt-get update
115+
fi
109116
sudo apt-get install -y criu
110117
echo "CRIU installed: $(criu --version 2>&1 | head -1)"
111118
else

0 commit comments

Comments
 (0)