ci: handle sudo in actions-install.sh
authorVincent Fu <vincent.fu@samsung.com>
Mon, 23 Sep 2024 16:41:35 +0000 (16:41 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Thu, 26 Sep 2024 17:29:45 +0000 (13:29 -0400)
commit0710fce4caaf1e9608b14583aba9075cb7caf9c3
tree87ef320f465558a91094c6a359655e736e30cb47
parent3ce48db90dce97ab2c7bd3c6003daa32cd8fc55d
ci: handle sudo in actions-install.sh

We run our tests as root in containers and VMs. Those platforms do not
have sudo. Use a small bash function to eliminate the need to install
sudo at the very beginning of the dependency installation script.

This function just checks for the existence of sudo and uses it when
installed but does nothing when it is not installed. With this function
we can just add sudo to the list of packages to install like all the
other packages. We may still need sudo in one of our test scripts.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
ci/actions-install.sh