another attempt to fix Github Actions curl timeouts
Will run "sudo ethtool -K eth0 tx off rx off" in container before executing build commands. Since our build environment doesn't have ethtool installed, this will imply rebuilding Docker image. Until that, CI builds will fail due to missing utility.
This commit is contained in:
parent
62abbe5ae0
commit
86cdb09734
@ -31,8 +31,15 @@ else
|
||||
fi
|
||||
|
||||
$SUDO docker start $CONTAINER_NAME >/dev/null 2>&1 || {
|
||||
if [ "$GITHUB_ACTIONS" = "true" ]; then
|
||||
SECURITY_OPT="--cap-add SYS_ADMIN --cap-add NET_ADMIN --security-opt apparmor:unconfined --security-opt seccomp=unconfined"
|
||||
else
|
||||
SECURITY_OPT=""
|
||||
fi
|
||||
|
||||
echo "Creating new container..."
|
||||
$SUDO docker run \
|
||||
$SECURITY_OPT \
|
||||
--detach \
|
||||
--name $CONTAINER_NAME \
|
||||
--volume $REPOROOT:$CONTAINER_HOME_DIR/termux-packages \
|
||||
@ -49,6 +56,10 @@ $SUDO docker start $CONTAINER_NAME >/dev/null 2>&1 || {
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$GITHUB_ACTIONS" = "true" ]; then
|
||||
$SUDO docker exec $DOCKER_TTY $CONTAINER_NAME sudo ethtool -K eth0 tx off rx off
|
||||
fi
|
||||
|
||||
if [ "$#" -eq "0" ]; then
|
||||
$SUDO docker exec --interactive $DOCKER_TTY $CONTAINER_NAME bash
|
||||
else
|
||||
|
@ -3,6 +3,9 @@ set -e -u
|
||||
|
||||
PACKAGES=""
|
||||
|
||||
# For fixing networking interface when running on Github Actions.
|
||||
PACKAGES+=" ethtool"
|
||||
|
||||
# For en_US.UTF-8 locale.
|
||||
PACKAGES+=" locales"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user