1
0
Fork 0
mirror of https://gitlab.com/niansa/libasync.git synced 2025-03-06 20:53:29 +01:00

ci: add docs and coverage pipeline

This commit is contained in:
Arsen Arsenović 2022-01-26 23:44:22 +01:00
parent 1cd76ff79e
commit 058528d69a
No known key found for this signature in database
GPG key ID: 4745351A0CC0C1BC
2 changed files with 80 additions and 0 deletions

45
.github/workflows/coverage.yml vendored Normal file
View file

@ -0,0 +1,45 @@
name: Tests and coverage
on:
push:
pull_request:
permissions:
statuses: write
jobs:
tests:
runs-on: ubuntu-latest
container:
# XXX(arsen): stop doing this when GCC 11 is in Ubuntu LTS
image: ubuntu:impish
steps:
- uses: actions/checkout@v2
- name: Get dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -y install python3-dev libxml2-dev libxslt1-dev \
cmake libyaml-dev libclang-dev llvm-dev \
libglib2.0-dev libjson-glib-dev flex \
ninja-build build-essential python3-pip \
git libgtest-dev
pip3 install -U meson hotdoc gcovr
- name: Build
run: |
git clone --depth=1 https://github.com/managarm/frigg.git subprojects/frigg
meson --buildtype=debug -Dbuild_tests=true -Db_coverage=true build
cd build
ninja test
ninja coverage-html
ninja coverage-xml
ninja coverage-text
ninja coverage-sonarqube
- name: Upload coverage reports as artifacts
uses: actions/upload-artifact@v2
with:
name: coverages
path: |
build/meson-logs/coverage.xml
build/meson-logs/sonarqube.xml
build/meson-logs/coverage.txt
build/meson-logs/coveragereport/

35
.github/workflows/docs.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: Documentation
on:
push:
pull_request:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get dependencies
run: |
sudo apt-get -y install python3-dev libxml2-dev libxslt1-dev \
cmake libyaml-dev libclang-dev llvm-dev \
libglib2.0-dev libjson-glib-dev flex \
ninja-build jq
pip install -U meson hotdoc
wget https://raw.githubusercontent.com/WayneD/rsync/c3f7414c450faaf6a8281cc4a4403529aeb7d859/rsync-ssl
sudo install -D rsync-ssl /usr/local/bin/rsync-ssl
- name: Build
run: |
meson -Denable_docs=true build
cd build
ninja build-doc
- name: Upload docs as artifacts
uses: actions/upload-artifact@v2
with:
name: libasync-docs
path: build/libasync-doc/
- name: Upload docs to docs.managarm.org
if: github.ref == 'refs/heads/master' && github.repository == 'managarm/libasync'
env:
RSYNC_PASSWORD: ${{ secrets.RSYNC_DOCUMENTATION_PASSWD }}
run: |
rsync-ssl -a --delete build/libasync-doc/html/ docs@rsync.managarm.org::docs/libasync