-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
83 lines (72 loc) · 2.57 KB
/
ci.yaml
File metadata and controls
83 lines (72 loc) · 2.57 KB
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
name: Build Hyprland
on: [push, pull_request, workflow_dispatch]
jobs:
gcc:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
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: |
CFLAGS=-Werror CXXFLAGS=-Werror make nopch
- name: Compress and package artifacts
run: |
mkdir x86_64-pc-linux-gnu
mkdir hyprland
cp ./LICENSE hyprland/
cp build/Hyprland hyprland/
cp build/hyprctl/hyprctl hyprland/
cp build/hyprpm/hyprpm hyprland/
cp -r example/ hyprland/
cp -r assets/ hyprland/
tar -cvJf Hyprland.tar.xz hyprland
- name: Release
uses: actions/upload-artifact@v4
with:
name: Build archive
path: Hyprland.tar.xz
clang-format:
permissions: read-all
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork
name: "Code Style"
runs-on: ubuntu-latest
container:
image: archlinux
steps:
- name: Checkout repository
uses: actions/checkout@v4
# - name: clang-format check
# uses: jidicula/clang-format-action@v4.16.0
# with:
# exclude-regex: ^subprojects$
- name: Install clang-format
run: |
pacman --noconfirm --noprogressbar -Syyu
pacman --noconfirm --noprogressbar -Sy clang
- name: clang-format check
run: .github/workflows/clang-format-check.sh "." "llvm" "^subprojects$" ""
- name: Save PR head commit SHA
if: failure() && github.event_name == 'pull_request'
shell: bash
run: |
SHA="${{ github.event.pull_request.head.sha }}"
echo "SHA=$SHA" >> $GITHUB_ENV
- name: Save latest commit SHA if not PR
if: failure() && github.event_name != 'pull_request'
shell: bash
run: echo "SHA=${{ github.sha }}" >> $GITHUB_ENV
- name: Report failure in job summary
if: failure()
run: |
DEEPLINK="${{ github.server_url }}/${{ github.repository }}/commit/${{ env.SHA }}"
echo -e "Format check failed on commit [${GITHUB_SHA:0:8}]($DEEPLINK) with files:\n$(<$GITHUB_WORKSPACE/failing-files.txt)" >> $GITHUB_STEP_SUMMARY