mirror of
https://github.com/hyprwm/Hyprland
synced 2026-04-21 21:20:39 +02:00
83 lines
2.6 KiB
YAML
83 lines
2.6 KiB
YAML
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
|