summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorxDarksome <dev@darkso.me>2022-06-24 18:58:11 +0300
committerGitHub <noreply@github.com>2022-06-24 18:58:11 +0300
commitbe460ea9547691eb136bf8b600b67b778af47e3f (patch)
treeb74869ad39dd804aec31694d4dd429822c223644 /.github/workflows
parent776ca3baf269059e8c13ba8b625645215e71f78c (diff)
parente7467c60f9fe9e66c74dd8dc7c752a73ed4bc4db (diff)
Merge branch 'hyprwm:main' into main
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yaml48
-rw-r--r--.github/workflows/version-update.sh26
2 files changed, 55 insertions, 19 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 8adef5c4..77c9c48b 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -13,34 +13,44 @@ jobs:
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 xcb-util-errors xcb-util-renderutil xcb-util-wm xorg-fonts-encodings xorg-server-common xorg-setxkbmap xorg-xkbcomp xorg-xwayland git cmake go clang lld libc++ pkgconf meson ninja wayland wayland-protocols libinput libxkbcommon pixman glm libdrm libglvnd cairo pango systemd scdoc base-devel seatd
-
- name: Set up user
run: |
useradd -m githubuser
echo -e "root ALL=(ALL:ALL) ALL\ngithubuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
-
- name: Build wlroots
run: |
su githubuser -c "cd ~ && git clone https://gitlab.freedesktop.org/wlroots/wlroots"
su githubuser -c "cd ~/wlroots && meson build/ --prefix=/usr && ninja -C build/ && sudo ninja -C build/ install && cd .."
-
- name: Fix permissions for git
run: |
git config --global --add safe.directory /__w/Hyprland/Hyprland
-
- name: Checkout Hyprland
uses: actions/checkout@v3
with:
submodules: recursive
-
- - name: Build Hyprland With default settings
+ - name: Build Hyprland
run: |
git submodule sync --recursive && git submodule update --init --force --recursive
make all
-
- - name: Build Hyprland with LEGACY_RENDERER
+ - name: Compress and package artifacts
run: |
- make legacyrenderer
+ mkdir x86_64-pc-linux-gnu
+ mkdir hyprland
+ mkdir hyprland/example
+ mkdir hyprland/assets
+ cp ./LICENSE hyprland/
+ cp build/Hyprland hyprland/
+ cp hyprctl/hyprctl hyprland/
+ cp subprojects/wlroots/build/libwlroots.so.11032 hyprland/
+ cp build/Hyprland hyprland/
+ cp -r example/ hyprland/
+ cp -r assets/ hyprland/
+ tar -cvf Hyprland.tar.xz hyprland
+ - name: Release
+ uses: actions/upload-artifact@v3
+ with:
+ name: Build archive
+ path: Hyprland.tar.xz
meson:
name: "Build Hyprland with Meson (Arch)"
@@ -63,13 +73,13 @@ jobs:
-Ddefault_library=static
- name: Compile
run: ninja -C obj-x86_64-pc-linux-gnu
- - name: Compress artifacts
- run: |
- mkdir x86_64-pc-linux-gnu
- DESTDIR=$PWD/x86_64-pc-linux-gnu meson install -C obj-x86_64-pc-linux-gnu --tags runtime
- tar -cvf x86_64-pc-linux-gnu.tar.xz x86_64-pc-linux-gnu
- - name: Upload artifacts
- uses: actions/upload-artifact@v3
- with:
- name: Build artifacts (x86_64-pc-linux-gnu)
- path: x86_64-pc-linux-gnu.tar.xz
+# - name: Compress artifacts
+# run: |
+# mkdir x86_64-pc-linux-gnu
+# DESTDIR=$PWD/x86_64-pc-linux-gnu meson install -C obj-x86_64-pc-linux-gnu --tags runtime
+# tar -cvf x86_64-pc-linux-gnu.tar.xz x86_64-pc-linux-gnu
+# - name: Upload artifacts
+# uses: actions/upload-artifact@v3
+# with:
+# name: Build artifacts (x86_64-pc-linux-gnu)
+# path: x86_64-pc-linux-gnu.tar.xz
diff --git a/.github/workflows/version-update.sh b/.github/workflows/version-update.sh
new file mode 100644
index 00000000..1bf95af9
--- /dev/null
+++ b/.github/workflows/version-update.sh
@@ -0,0 +1,26 @@
+name: "Nix & Meson: update version"
+
+on: [push, workflow_dispatch]
+
+jobs:
+ update:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@v3
+ - name: Update flake and meson version
+ run: |
+ REGEX="([0-9]+(\.[0-9a-zA-Z]+)+)"
+
+ CRT_REV=$(git show-ref --tags --head --abbrev | head -n 1 | head -c 7)
+ TAG_REV=$(git show-ref --tags --abbrev | tail -n 1 | head -c 7)
+ CRT_VER=$(sed -nEe "/$REGEX/{p;q;}" meson.build | awk -F\' '{print $2}')
+ VERSION=$(git show-ref --tags --abbrev | tail -n 1 | tail -c +20)
+
+ if [[ $TAG_REV = $CRT_REV ]] || [[ $CRT_VER != $VERSION ]]; then
+ sed -Ei "s/$REGEX/$VERSION/g" meson.build
+ sed -Ei "s/$REGEX/$VERSION/g" flake.nix
+ fi
+ - uses: stefanzweifel/git-auto-commit-action@v4
+ with:
+ commit_message: "[gha] bump flake and meson version"