From e208eefc2782aa0c4cf8a97cabf6366289c9f682 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 11 Mar 2024 22:10:51 +0000 Subject: [PATCH] add ci --- .github/FUNDING.yml | 1 + .github/workflows/ci.yaml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/ci.yaml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..bfeb1d6 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +ko_fi: vaxry diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..ddcd8fe --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,37 @@ +name: Build Hyprland + +on: [push, pull_request, workflow_dispatch] +jobs: + build: + runs-on: ubuntu-latest + container: + image: archlinux + steps: + - name: Checkout repository actions + uses: actions/checkout@v4 + with: + sparse-checkout: .github/actions + + - name: Get required pkgs + run: | + sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf + pacman --noconfirm --noprogressbar -Syyu + pacman --noconfirm --noprogressbar -Sy gcc base-devel cmake clang cairo librsvg + + - name: Install hyprlang + run: | + git clone https://github.com/hyprwm/hyprlang --recursive + cd hyprlang + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build + cmake --build ./build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` + cmake --install build + + - name: Build hyprcursor + run: | + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build + cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` + cmake --install ./build + + - name: Run tests + run: | + cd ./build && ctest --output-on-failure