-
Notifications
You must be signed in to change notification settings - Fork 48
74 lines (65 loc) · 2.3 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build on latest Hyprland release
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# run every night at 2AM (the base docker image is updated at midnight)
- cron: '0 2 * * *'
jobs:
build:
runs-on: ubuntu-latest
container:
# image built from the Dockerfile in the .github/ folder
image: duckonaut/hyprland-arch:latest
steps:
- name: Install dependencies
run: |
sudo -u user sh -c "paru -Syu --noconfirm hyprland meson ninja cpio hyprwayland-scanner hyprutils cmake"
- name: Get version from installed Hyprland
run: |
hash=$(awk -F'"' '/GIT_COMMIT_HASH/ { print $2 }' /usr/include/hyprland/src/version.h)
if [ -z "$hash" ]; then
echo "Failed to get GIT_COMMIT_HASH from /usr/include/hyprland/src/version.h"
exit 1
fi
echo "GIT_COMMIT_HASH=$hash" >> $GITHUB_ENV
- name: Checkout Hyprland repository
uses: actions/checkout@v4
with:
repository: hyprwm/Hyprland
ref: ${{ env.GIT_COMMIT_HASH }}
path: Hyprland
submodules: recursive
- name: Run `make installheaders` in Hyprland repository
run: |
cd Hyprland
make all && make installheaders
- name: Checkout current repository and checkout pinned commit
uses: actions/checkout@v4
with:
fetch-depth: 0 # to allow checkout out a specific commit later
path: split-monitor-workspaces
- name: Get pinned commit from hyprpm.toml file
run: |
cd split-monitor-workspaces
commit=$(grep -F "$GIT_COMMIT_HASH" hyprpm.toml | awk -F'"' '{print $4}')
if [ -z "$commit" ]; then
echo "Failed to get pinned commit from hyprpm.toml with GIT_COMMIT_HASH=$GIT_COMMIT_HASH"
exit 1
fi
echo "PINNED_COMMIT=$commit" >> $GITHUB_ENV
- name: Checkout pinned commit
run: |
cd split-monitor-workspaces
echo "Checking out pinned commit $PINNED_COMMIT"
git config --global --add safe.directory /__w/split-monitor-workspaces/split-monitor-workspaces # fix dubious ownership warning
git checkout $PINNED_COMMIT
- name: Build current repository
run: |
cd split-monitor-workspaces
meson setup build --wipe
ninja -C build