summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAzat Khuzhin <azat@libevent.org>2020-05-06 02:10:34 +0300
committerAzat Khuzhin <azat@libevent.org>2020-05-06 02:46:28 +0300
commit889ad6d6984e9d0e6aacf01ea27b8a76dfc5cd19 (patch)
tree4b0907d62fdae83f66dc3e59cf00c43001269d2d /.github
parent448a478a98ae7797c1d1a5f1463c02f1b09982f2 (diff)
downloadlibevent-889ad6d6984e9d0e6aacf01ea27b8a76dfc5cd19.tar.gz
Add ABI compatibility report deploy
Closes: #887
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/abi.yml73
1 files changed, 73 insertions, 0 deletions
diff --git a/.github/workflows/abi.yml b/.github/workflows/abi.yml
new file mode 100644
index 00000000..b1e52768
--- /dev/null
+++ b/.github/workflows/abi.yml
@@ -0,0 +1,73 @@
+---
+name: abi
+
+on:
+ push:
+ branches:
+ - master
+ ## TODO: use source tag name in the destination repo
+ #tags:
+ # - release-*
+
+jobs:
+ abi:
+ runs-on: ubuntu-18.04
+ ## TODO: use docker image, but for now this is not possible without hacks
+ ## due to even public registry require some authentication:
+ ## - https://github.community/t5/GitHub-Actions/docker-pull-from-public-GitHub-Package-Registry-fail-with-quot/td-p/32782/page/5
+ #container: docker.pkg.github.com/azat/docker-images/lvc-debian
+ if: "!contains(github.event.head_commit.message, 'ci skip')"
+ strategy:
+ fail-fast: false
+
+ steps:
+ - uses: actions/checkout@v2.0.0
+
+ - name: Install Dependencies
+ run:
+ sudo apt install
+ abi-tracker
+ abi-monitor
+ abi-dumper
+ abi-compliance-checker
+ pkgdiff
+ vtable-dumper
+
+ - 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
+
+ user_name="${{ github.event.head_commit.author.name }}"
+ user_email="${{ github.event.head_commit.author.email }}"
+ short_commit_id="${COMMIT_ID:0:7}"
+ owner_name="${{ github.event.repository.owner.name }}"
+
+ cd /tmp/le-abi-root/work/abi-check/timeline/libevent/
+ git init
+ git config --local user.name $user_name
+ git config --local user.email $user_email
+ 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
+ - uses: actions/upload-artifact@v1
+ if: failure()
+ with:
+ name: build
+ path: /tmp/le-abi-root