Skip to content

Commit 0e096b1

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 a6edc48 commit 0e096b1

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
@@ -147,19 +147,19 @@ jobs:
147147
if: ${{ runner.os == 'Linux' }}
148148
run: |
149149
# Add ccache PPA to install up-to-date ccache
150-
sudo add-apt-repository -y -n ppa:stephanosio/ccache
150+
add-apt-repository -y -n ppa:stephanosio/ccache
151151
152152
# Add GitHub CLI source
153-
sudo mkdir -p -m 755 /etc/apt/keyrings
154-
sudo curl -L -o /etc/apt/keyrings/githubcli-archive-keyring.gpg \
153+
mkdir -p -m 755 /etc/apt/keyrings
154+
curl -L -o /etc/apt/keyrings/githubcli-archive-keyring.gpg \
155155
https://cli.github.com/packages/githubcli-archive-keyring.gpg
156-
sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
157-
sudo mkdir -p -m 755 /etc/apt/sources.list.d
158-
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
156+
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
157+
mkdir -p -m 755 /etc/apt/sources.list.d
158+
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
159159
160160
# Install required system packages
161-
sudo apt-get update
162-
sudo apt-get install -y \
161+
apt-get update
162+
apt-get install -y \
163163
ccache \
164164
cmake \
165165
device-tree-compiler \
@@ -183,7 +183,7 @@ jobs:
183183
xz-utils
184184
185185
if [ "${HOSTTYPE}" = "x86_64" ]; then
186-
sudo apt install -y \
186+
apt-get install -y \
187187
g++-multilib \
188188
gcc-multilib
189189
fi
@@ -197,7 +197,7 @@ jobs:
197197
echo "~/.cargo/bin" >> $GITHUB_PATH
198198
199199
## Install uefi-run utility
200-
sudo -E cargo install uefi-run --root /usr
200+
cargo install uefi-run --root /usr
201201
echo "OVMF_FD_PATH=/usr/share/ovmf/OVMF.fd" >> $GITHUB_ENV
202202
203203
## Install Rust target support required by Zephyr

0 commit comments

Comments
 (0)