2023-12-29 17:52:44 +01:00
|
|
|
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: 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
|
|
|
|
|
|
|
|
- name: Build with gcc
|
|
|
|
run: |
|
|
|
|
CC="/usr/bin/gcc" CXX="/usr/bin/g++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -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`
|
|
|
|
cp ./build/libhyprlang.so /usr/lib
|
|
|
|
|
|
|
|
- name: Build with clang
|
|
|
|
run: |
|
|
|
|
rm -rf ./build
|
|
|
|
CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -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`
|
|
|
|
rm ./build/libhyprlang.so
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd ./tests && ../build/hyprlang_test
|
|
|
|
|
|
|
|
clang:
|
|
|
|
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: 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
|
|
|
|
|
|
|
|
- name: Build with clang
|
|
|
|
run: |
|
|
|
|
CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -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`
|
|
|
|
cp ./build/libhyprlang.so /usr/lib
|
|
|
|
|
|
|
|
- name: Build with gcc
|
|
|
|
run: |
|
|
|
|
rm -rf ./build
|
|
|
|
CC="/usr/bin/gcc" CXX="/usr/bin/g++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -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`
|
|
|
|
rm ./build/libhyprlang.so
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
cd ./tests && ../build/hyprlang_test
|
2023-12-30 14:54:43 +01:00
|
|
|
|
|
|
|
doxygen:
|
|
|
|
name: "Deploy docs"
|
2023-12-30 14:55:23 +01:00
|
|
|
runs-on: ubuntu-latest
|
2023-12-30 14:54:43 +01:00
|
|
|
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 doxygen rsync
|
|
|
|
|
|
|
|
- name: Get doxygen theme
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/jothepro/doxygen-awesome-css
|
|
|
|
cd doxygen-awesome-css && git checkout v2.3.1 && cd ..
|
|
|
|
|
|
|
|
- name: Build doxygen site
|
|
|
|
run: |
|
|
|
|
doxygen hyprlang-docs
|
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
env:
|
|
|
|
PK: ${{ secrets.UPDATE_DOCS_PK }}
|
|
|
|
PT: ${{ secrets.DEPLOY_PORT }}
|
|
|
|
AD: ${{ secrets.DEPLOY_USER }}
|
|
|
|
PH: ${{ secrets.DEPLOY_PATH }}
|
|
|
|
run: |
|
|
|
|
touch ./pk
|
|
|
|
cat >> ./pk << EOF
|
|
|
|
$PK
|
|
|
|
EOF
|
|
|
|
eval $(ssh-agent -s) && ssh-add ./pk
|
|
|
|
scp -P $PT -r ./doxygen/* $AD:.$PH
|
|
|
|
|
|
|
|
|