mirror of
https://github.com/hyprwm/hyprgraphics.git
synced 2024-12-26 07:29:49 +01:00
CI: init
This commit is contained in:
parent
73c6651baf
commit
cf9509bd79
2 changed files with 84 additions and 0 deletions
57
.github/workflows/arch.yml
vendored
Normal file
57
.github/workflows/arch.yml
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
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 hyprgraphics 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 hyprgraphics 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
|
27
.github/workflows/nix.yml
vendored
Normal file
27
.github/workflows/nix.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
name: Build & Test
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
jobs:
|
||||
nix:
|
||||
strategy:
|
||||
matrix:
|
||||
package:
|
||||
- hyprgraphics
|
||||
- hyprgraphics-with-tests
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: cachix/install-nix-action@v26
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
# not needed (yet)
|
||||
# - uses: cachix/cachix-action@v12
|
||||
# with:
|
||||
# name: hyprland
|
||||
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
|
||||
- name: Build & Test
|
||||
run: nix build .#${{ matrix.package }} --print-build-logs
|
||||
|
Loading…
Reference in a new issue