Skip to content

Commit e0e0ae8

Browse files
committed
Fix github actions
1 parent 094eeb0 commit e0e0ae8

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,29 @@ jobs:
3838
bash -c "
3939
set -euxo pipefail
4040
41-
# Set up pacman
41+
# Setup pacman
4242
pacman-key --init
4343
pacman-key --populate archlinux
4444
pacman -Syu --noconfirm
4545
46-
# Install dependencies
47-
pacman -S --noconfirm base-devel cmake ninja git zlib sdbus-cpp qt6 qt6-webengine qt6-wayland layer-shell-qt
46+
# Install base-devel, sudo, and other dependencies
47+
pacman -S --noconfirm base-devel sudo git cmake ninja json-c zlib sdbus-cpp qt6 qt6-wayland qt6-webengine layer-shell-qt
4848
49-
# Install yay (AUR helper)
50-
cd /tmp
49+
# Create a non-root user
50+
useradd -m builduser
51+
echo 'builduser ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
52+
53+
# Switch to non-root user and install yay + uwebsockets
54+
su builduser <<EOF
55+
set -euxo pipefail
56+
cd ~
5157
git clone https://aur.archlinux.org/yay.git
5258
cd yay
5359
makepkg -si --noconfirm
54-
55-
# Install AUR package
5660
yay -S --noconfirm uwebsockets
61+
EOF
5762
58-
# Build project
63+
# Back to root, build the project
5964
ldd --version
6065
cmake -B build -G Ninja \
6166
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \

0 commit comments

Comments
 (0)