diff options
author | François Conzelmann <[email protected]> | 2023-12-06 23:54:56 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-12-06 22:54:56 +0000 |
commit | 4a42344e9748d2b44c55798ddc3fa41448533c4e (patch) | |
tree | f8a06c575a650be05d629555f4e127115dffe470 /.github | |
parent | 5489f9f07a73c6b5b97702731a5092463a01fb5b (diff) | |
download | Hyprland-4a42344e9748d2b44c55798ddc3fa41448533c4e.tar.gz Hyprland-4a42344e9748d2b44c55798ddc3fa41448533c4e.zip |
style/ci: apply clang-format and verify it in ci (#4039)
* style: apply clang-format
* ci: add new clang-format job to CI
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yaml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a78b7522..54248e3a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -106,3 +106,32 @@ jobs: run: mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DNO_XWAYLAND:STRING=true -H./ -B./build -G Ninja - name: Compile run: make release + + clang-format: + name: "Code Style (Arch)" + runs-on: ubuntu-latest + container: + image: archlinux + steps: + - name: Download dependencies + run: | + sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf + pacman --noconfirm --noprogressbar -Syyu + pacman --noconfirm --noprogressbar -Sy glslang libepoxy libfontenc libxcvt libxfont2 libxkbfile vulkan-headers vulkan-validation-layers git go clang lld libc++ pkgconf meson ninja wayland wayland-protocols libinput libxkbcommon pixman glm libdrm libglvnd cairo pango systemd scdoc base-devel seatd cmake jq python libliftoff tomlplusplus + - name: Set up user + run: | + useradd -m githubuser + echo -e "root ALL=(ALL:ALL) ALL\ngithubuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers + - name: Install libdisplay-info from the AUR + run: | + su githubuser -c "cd ~ && git clone https://aur.archlinux.org/libdisplay-info.git && cd ./libdisplay-info && makepkg -si --skippgpcheck --noconfirm --noprogressbar" + - name: Checkout Hyprland + uses: actions/checkout@v3 + with: + submodules: true + - name: Configure + run: | + meson obj-x86_64-pc-linux-gnu \ + -Ddefault_library=static + - name: clang-format check + run: ninja -C obj-x86_64-pc-linux-gnu clang-format-check |