2022-07-10 16:49:53 +03:00
|
|
|
---
|
|
|
|
name: upstream
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
2023-03-06 14:26:11 +00:00
|
|
|
permissions: read-all
|
|
|
|
|
2022-07-10 16:49:53 +03:00
|
|
|
jobs:
|
|
|
|
coverage-job:
|
2023-03-06 14:26:11 +00:00
|
|
|
permissions:
|
|
|
|
checks: write # for coverallsapp/github-action to create new checks
|
|
|
|
contents: read # for actions/checkout to fetch code
|
2023-05-03 16:28:58 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2022-07-10 16:49:53 +03:00
|
|
|
steps:
|
2024-04-09 11:55:37 -03:00
|
|
|
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
2022-07-10 16:49:53 +03:00
|
|
|
- name: Cache
|
2024-04-09 11:55:37 -03:00
|
|
|
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
|
2022-07-10 16:49:53 +03:00
|
|
|
with:
|
|
|
|
path: build
|
|
|
|
key: ${{ matrix.os }}-coverage-v2
|
|
|
|
|
|
|
|
- name: Install Depends
|
|
|
|
run: sudo apt install zlib1g-dev libssl-dev build-essential lcov libmbedtls-dev
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
export JOBS=20
|
|
|
|
mkdir -p build
|
|
|
|
cd build
|
2023-06-06 12:43:02 -07:00
|
|
|
cmake .. -DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -DEVENT__DISABLE_OPENSSL=OFF
|
2022-07-10 16:49:53 +03:00
|
|
|
make -j $JOBS
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
export CTEST_PARALLEL_LEVEL=$JOBS
|
|
|
|
export CTEST_OUTPUT_ON_FAILURE=1
|
|
|
|
cd build
|
|
|
|
make verify_coverage
|
|
|
|
|
|
|
|
- name: Coveralls GitHub Action
|
2024-04-09 11:55:37 -03:00
|
|
|
uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # v1.2.5
|
2022-07-10 16:49:53 +03:00
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
path-to-lcov: ./build/coverage.info.cleaned
|
|
|
|
|
2024-04-09 11:55:37 -03:00
|
|
|
- uses: actions/upload-artifact@3446296876d12d4e3a0f3145a3c87e67bf0a16b5 # v1.0.0
|
2022-07-10 16:49:53 +03:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: coverage-build
|
|
|
|
path: build
|
|
|
|
abi-job:
|
2023-03-06 14:26:11 +00:00
|
|
|
permissions:
|
|
|
|
contents: write # for Git to git push
|
2024-01-13 15:54:49 +03:00
|
|
|
# ABI check is broken [1].
|
|
|
|
# [1]: https://github.com/libevent/libevent/issues/1463
|
|
|
|
if: "false"
|
2023-09-03 08:15:07 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2022-07-10 16:49:53 +03:00
|
|
|
## TODO: use docker image, but for now this is not possible without hacks
|
|
|
|
## due to even public registry require some authentication:
|
2024-02-18 12:07:07 +01:00
|
|
|
## - https://github.com/orgs/community/discussions/25689
|
2022-07-10 16:49:53 +03:00
|
|
|
#container: docker.pkg.github.com/azat/docker-images/lvc-debian
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
|
|
|
|
steps:
|
2024-04-09 11:55:37 -03:00
|
|
|
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
2022-07-10 16:49:53 +03:00
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
run:
|
|
|
|
sudo apt install
|
|
|
|
abi-tracker
|
|
|
|
abi-monitor
|
|
|
|
abi-dumper
|
|
|
|
abi-compliance-checker
|
|
|
|
pkgdiff
|
|
|
|
vtable-dumper
|
|
|
|
|
2024-02-20 07:56:24 +01:00
|
|
|
# FIXME: clone git repo or report to debian
|
|
|
|
- name: Patch abi-compliance-checker to avoid endless loop
|
|
|
|
run: sudo patch /usr/bin/abi-compliance-checker < extra/abi-check/debian.patch
|
|
|
|
|
2022-07-10 16:49:53 +03:00
|
|
|
- name: Generate
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
./extra/abi-check/abi_check.sh
|
|
|
|
env:
|
|
|
|
ABI_CHECK_ROOT: /tmp/le-abi-root
|
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
env:
|
|
|
|
LIBEVENT_DEPLOY_ABI_PRI: ${{ secrets.LIBEVENT_DEPLOY_ABI_PRI }}
|
|
|
|
COMMIT_ID: ${{ github.sha }}
|
|
|
|
run: |
|
|
|
|
[[ -n $LIBEVENT_DEPLOY_ABI_PRI ]] || exit 0
|
|
|
|
|
|
|
|
mkdir -p ~/.ssh
|
|
|
|
echo "$LIBEVENT_DEPLOY_ABI_PRI" > ~/.ssh/id_rsa
|
|
|
|
chmod 600 ~/.ssh/id_rsa
|
|
|
|
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
|
|
|
|
|
|
|
short_commit_id="${COMMIT_ID:0:7}"
|
|
|
|
owner_name="${{ github.event.repository.owner.name }}"
|
|
|
|
|
|
|
|
cd /tmp/le-abi-root/work/abi-check
|
|
|
|
git init
|
|
|
|
git config --local user.name "Libevent Github Robot"
|
|
|
|
git config --local user.email "robot@libevent.org"
|
|
|
|
git add -f .
|
|
|
|
git commit -m "Update ABI/API backward compatibility report (libevent/libevent@$short_commit_id)"
|
|
|
|
git push -f git@github.com:$owner_name/abi master
|
|
|
|
|
|
|
|
# XXX: requires container-id for docker
|
2024-04-09 11:55:37 -03:00
|
|
|
- uses: actions/upload-artifact@3446296876d12d4e3a0f3145a3c87e67bf0a16b5 # v1.0.0
|
2022-07-10 16:49:53 +03:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: build
|
|
|
|
path: /tmp/le-abi-root
|
2024-04-09 11:55:37 -03:00
|
|
|
- uses: actions/upload-artifact@3446296876d12d4e3a0f3145a3c87e67bf0a16b5 # v1.0.0
|
2022-07-10 16:49:53 +03:00
|
|
|
with:
|
|
|
|
name: build
|
2022-07-11 03:50:16 +03:00
|
|
|
path: /tmp/le-abi-root/work/abi-check
|
2022-07-10 16:49:53 +03:00
|
|
|
|
|
|
|
doxygen-job:
|
2023-03-06 14:26:11 +00:00
|
|
|
permissions:
|
|
|
|
contents: write # for Git to git push
|
2023-05-03 16:28:58 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2022-07-10 16:49:53 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
|
|
|
|
steps:
|
2024-04-09 11:55:37 -03:00
|
|
|
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
2022-07-10 16:49:53 +03:00
|
|
|
- name: Install Depends
|
|
|
|
run: |
|
|
|
|
sudo apt install doxygen libmbedtls-dev
|
|
|
|
|
|
|
|
- name: Generate Doxygen
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-06-06 12:43:02 -07:00
|
|
|
cmake -DEVENT__DOXYGEN=ON -DEVENT__DISABLE_OPENSSL=OFF ..
|
2022-07-10 16:49:53 +03:00
|
|
|
make doxygen
|
|
|
|
|
|
|
|
- name: Deploy Documentation
|
|
|
|
env:
|
|
|
|
LIBEVENT_DEPLOY_PRI: ${{ secrets.LIBEVENT_DEPLOY_PRI }}
|
|
|
|
COMMIT_ID: ${{ github.sha }}
|
|
|
|
run: |
|
|
|
|
[[ -n $LIBEVENT_DEPLOY_PRI ]] || exit 0
|
|
|
|
|
|
|
|
mkdir -p ~/.ssh
|
|
|
|
echo "$LIBEVENT_DEPLOY_PRI" > ~/.ssh/id_rsa
|
|
|
|
chmod 600 ~/.ssh/id_rsa
|
|
|
|
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
|
|
|
|
|
|
|
short_commit_id="${COMMIT_ID:0:7}"
|
|
|
|
owner_name="${{ github.event.repository.owner.name }}"
|
|
|
|
|
|
|
|
cd ./build/doxygen/html
|
|
|
|
git init
|
|
|
|
git config --local user.name "Libevent Github Robot"
|
|
|
|
git config --local user.email "robot@libevent.org"
|
|
|
|
git add -f .
|
|
|
|
git commit -m "Update documentation (libevent/libevent@$short_commit_id)"
|
|
|
|
git push -f git@github.com:$owner_name/doc master
|
|
|
|
|
2024-04-09 11:55:37 -03:00
|
|
|
- uses: actions/upload-artifact@3446296876d12d4e3a0f3145a3c87e67bf0a16b5 # v1.0.0
|
2022-07-10 16:49:53 +03:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: doxygen-build
|
2022-07-11 03:50:16 +03:00
|
|
|
path: build
|