mirror of
https://github.com/hyprwm/hyprlang.git
synced 2024-12-22 18:09:49 +01:00
add arch ci
This commit is contained in:
parent
97bf10facd
commit
b6aea09f6b
1 changed files with 68 additions and 0 deletions
68
.github/workflows/arch.yml
vendored
Normal file
68
.github/workflows/arch.yml
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
name: Build & Test (Arch)
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
jobs:
|
||||
gcc:
|
||||
name: "gcc build / clang test"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux
|
||||
steps:
|
||||
- name: Checkout repository actions
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: .github/actions
|
||||
|
||||
- name: Ger 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
|
||||
|
||||
- name: Build with gcc
|
||||
run: |
|
||||
CC="/usr/bin/g++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build
|
||||
CC="/usr/bin/g++" cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
|
||||
cp ./build/libhyprlang.so /usr/lib
|
||||
|
||||
- name: Build with clang
|
||||
run: |
|
||||
rm -rf ./build
|
||||
CC="/usr/bin/clang" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build
|
||||
CC="/usr/bin/clang" cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
./build/hyprlang_test
|
||||
|
||||
name: "clang build / gcc test"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux
|
||||
steps:
|
||||
- name: Checkout repository actions
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: .github/actions
|
||||
|
||||
- name: Ger 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
|
||||
|
||||
- name: Build with gcc
|
||||
run: |
|
||||
CC="/usr/bin/clang" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build
|
||||
CC="/usr/bin/clang" cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
|
||||
cp ./build/libhyprlang.so /usr/lib
|
||||
|
||||
- name: Build with clang
|
||||
run: |
|
||||
rm -rf ./build
|
||||
CC="/usr/bin/g++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build
|
||||
CC="/usr/bin/g++" cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
./build/hyprlang_test
|
Loading…
Reference in a new issue