Skip to content

install cloc in format job #105

install cloc in format job

install cloc in format job #105

Workflow file for this run

name: build
on:
push:
pull_request:
jobs:
format:
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
steps:
- name: Install formatter
run: |
pacman -Syu --noconfirm --needed \
clang \
cloc \
git \
make
- uses: actions/checkout@v4
- name: Check formatting
run: make format-check
- name: Check LoC update
run: |
cp README.md /tmp/README.before
make update-loc
cmp -s README.md /tmp/README.before
build:
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
strategy:
fail-fast: false
matrix:
include:
- name: default
xwayland: "0"
- name: xwayland
xwayland: "1"
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v4
- name: Install repo dependencies
run: |
pacman -Syu --noconfirm --needed \
base-devel \
cairo \
git \
libinput \
libxkbcommon \
pango \
pixman \
pkgconf \
sudo \
wayland \
wayland-protocols \
wlroots0.20 \
xcb-util-wm
- name: Build xdg-desktop-portal-wlr-git from AUR
run: |
useradd -m builder
printf 'builder ALL=(ALL) NOPASSWD: ALL\n' >/etc/sudoers.d/builder
chmod 0440 /etc/sudoers.d/builder
install -d -o builder -g builder /tmp/aur
su - builder -c 'git clone https://aur.archlinux.org/xdg-desktop-portal-wlr-git.git /tmp/aur/xdg-desktop-portal-wlr-git'
su - builder -c 'cd /tmp/aur/xdg-desktop-portal-wlr-git && makepkg -si --noconfirm --needed'
- name: Enable XWayland build
if: matrix.xwayland == '1'
run: |
cat > config.local.mk <<'EOF'
XWAYLAND = -DXWAYLAND
XLIBS = xcb xcb-icccm
EOF
- name: Build
run: |
make clean
make