mirror of
https://github.com/hyprwm/hyprutils.git
synced 2024-12-23 02:59:48 +01:00
57 lines
2.1 KiB
YAML
57 lines
2.1 KiB
YAML
name: Build & Test (Arch)
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
jobs:
|
|
gcc:
|
|
name: "Arch: Build and Test (gcc)"
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: archlinux
|
|
steps:
|
|
- name: Checkout repository actions
|
|
uses: actions/checkout@v4
|
|
with:
|
|
sparse-checkout: .github/actions
|
|
|
|
- name: Get required pkgs
|
|
run: |
|
|
sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf
|
|
pacman --noconfirm --noprogressbar -Syyu
|
|
pacman --noconfirm --noprogressbar -Sy gcc base-devel cmake clang libc++ pixman
|
|
|
|
- name: Build hyprutils with gcc
|
|
run: |
|
|
CC="/usr/bin/gcc" CXX="/usr/bin/g++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
|
|
CC="/usr/bin/gcc" CXX="/usr/bin/g++" cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
|
|
cmake --install ./build
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd ./build && ctest --output-on-failure
|
|
|
|
clang:
|
|
name: "Arch: Build and Test (clang)"
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: archlinux
|
|
steps:
|
|
- name: Checkout repository actions
|
|
uses: actions/checkout@v4
|
|
with:
|
|
sparse-checkout: .github/actions
|
|
|
|
- name: Get required pkgs
|
|
run: |
|
|
sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf
|
|
pacman --noconfirm --noprogressbar -Syyu
|
|
pacman --noconfirm --noprogressbar -Sy gcc base-devel cmake clang libc++ pixman
|
|
|
|
- name: Build hyprutils with clang
|
|
run: |
|
|
CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
|
|
CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
|
|
cmake --install ./build
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd ./build && ctest --output-on-failure
|