Skip to content

Commit c6770eb

Browse files
committed
ci: twister: Remove sudo for Linux environment setup
The twister build job now runs inside a container using the `sdk-build` image, which defaults to the root user inside the container, and `sudo` is therefore no longer necessary. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent d5abef9 commit c6770eb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/twister.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,19 @@ jobs:
146146
if: ${{ runner.os == 'Linux' }}
147147
run: |
148148
# Add ccache PPA to install up-to-date ccache
149-
sudo add-apt-repository -y -n ppa:stephanosio/ccache
149+
add-apt-repository -y -n ppa:stephanosio/ccache
150150
151151
# Add GitHub CLI source
152-
sudo mkdir -p -m 755 /etc/apt/keyrings
153-
sudo curl -L -o /etc/apt/keyrings/githubcli-archive-keyring.gpg \
152+
mkdir -p -m 755 /etc/apt/keyrings
153+
curl -L -o /etc/apt/keyrings/githubcli-archive-keyring.gpg \
154154
https://cli.github.com/packages/githubcli-archive-keyring.gpg
155-
sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
156-
sudo mkdir -p -m 755 /etc/apt/sources.list.d
157-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
155+
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
156+
mkdir -p -m 755 /etc/apt/sources.list.d
157+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
158158
159159
# Install required system packages
160-
sudo apt-get update
161-
sudo apt-get install -y \
160+
apt-get update
161+
apt-get install -y \
162162
ccache \
163163
cmake \
164164
device-tree-compiler \
@@ -182,7 +182,7 @@ jobs:
182182
xz-utils
183183
184184
if [ "${HOSTTYPE}" = "x86_64" ]; then
185-
sudo apt install -y \
185+
apt-get install -y \
186186
g++-multilib \
187187
gcc-multilib
188188
fi
@@ -196,7 +196,7 @@ jobs:
196196
echo "~/.cargo/bin" >> $GITHUB_PATH
197197
198198
## Install uefi-run utility
199-
sudo -E cargo install uefi-run --root /usr
199+
cargo install uefi-run --root /usr
200200
echo "OVMF_FD_PATH=/usr/share/ovmf/OVMF.fd" >> $GITHUB_ENV
201201
202202
## Install Rust target support required by Zephyr

0 commit comments

Comments
 (0)