aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/ci.yaml
blob: 6d25e027988452e81da2c4c0f1d7ea8fbda30696 (plain)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Build Hyprland

on: [push, pull_request, workflow_dispatch]
jobs:
  gcc:
    name: "Build Hyprland (Arch)"
    runs-on: ubuntu-latest
    container:
      image: archlinux
    steps:
      - name: Checkout repository actions
        uses: actions/checkout@v4
        with:
          sparse-checkout: .github/actions

      - name: Setup base
        uses: ./.github/actions/setup_base
        with:
          INSTALL_XORG_PKGS: true

      - name: Build Hyprland
        run: |
          make all

      - name: Compress and package artifacts
        run: |
          mkdir x86_64-pc-linux-gnu
          mkdir hyprland
          mkdir hyprland/example
          mkdir hyprland/assets
          cp ./LICENSE hyprland/
          cp build/Hyprland hyprland/
          cp build/hyprctl/hyprctl hyprland/
          cp build/hyprpm/hyprpm 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)"
    runs-on: ubuntu-latest
    container:
      image: archlinux
    steps:
      - name: Checkout repository actions
        uses: actions/checkout@v4
        with:
          sparse-checkout: .github/actions

      - name: Setup base
        uses: ./.github/actions/setup_base

      - name: Configure
        run: meson setup build -Ddefault_library=static

      - name: Compile
        run: ninja -C build

  no-pch:
    name: "Build Hyprland without precompiled headers (Arch)"
    runs-on: ubuntu-latest
    container:
      image: archlinux
    steps:
      - name: Checkout repository actions
        uses: actions/checkout@v4
        with:
          sparse-checkout: .github/actions

      - name: Setup base
        uses: ./.github/actions/setup_base
        with:
          INSTALL_XORG_PKGS: true

      - name: Compile
        run: make nopch

  noxwayland:
    name: "Build Hyprland in pure Wayland (Arch)"
    runs-on: ubuntu-latest
    container:
      image: archlinux
    steps:
      - name: Checkout repository actions
        uses: actions/checkout@v4
        with:
          sparse-checkout: .github/actions

      - name: Setup base
        uses: ./.github/actions/setup_base

      - name: Configure
        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: Checkout repository actions
        uses: actions/checkout@v4
        with:
          sparse-checkout: .github/actions

      - name: Setup base
        uses: ./.github/actions/setup_base

      - name: Configure
        run: meson setup build -Ddefault_library=static

      - name: clang-format check
        run: ninja -C build clang-format-check