-
Notifications
You must be signed in to change notification settings - Fork 48
72 lines (70 loc) · 1.96 KB
/
abi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: check-abi
on:
push:
branches:
- queue
- abi
paths:
- '.github/workflows/abi.yaml'
- '**.h'
- '**.c'
pull_request:
branches:
- master
- queue
workflow_dispatch:
env:
ABI_BRANCH: ${{ secrets.ABI_BRANCH }}
jobs:
save-and-test-ABI:
runs-on: ubuntu-20.04
steps:
- name: set ABI branch
if: ${{ env.ABI_BRANCH == '' }}
run: echo "ABI_BRANCH=master" >> $GITHUB_ENV
- name: checkout
uses: actions/checkout@v2
- name: get reference ABI
id: reference
continue-on-error: true
uses: dawidd6/action-download-artifact@v2
with:
workflow: abi.yaml
branch: ${{ env.ABI_BRANCH }}
name: abi
path: reference-abi
- name: update
run: sudo apt-get update
- name: dependencies
run: >
sudo apt-get install --yes gcc
gcc make pkg-config abigail-tools
libdevmapper-dev libreadline-dev libaio-dev libsystemd-dev
libudev-dev libjson-c-dev liburcu-dev libcmocka-dev libedit-dev
- name: create ABI
run: make -Orecurse -j$(grep -c ^processor /proc/cpuinfo) abi.tar.gz
- name: save ABI
uses: actions/upload-artifact@v1
with:
name: abi
path: abi
- name: compare ABI against reference
id: compare
continue-on-error: true
if: ${{ steps.reference.outcome == 'success' }}
run: make abi-test
- name: save differences
if: ${{ steps.compare.outcome == 'failure' }}
uses: actions/upload-artifact@v1
with:
name: abi-test
path: abi-test
- name: fail
# MUST use >- here, otherwise the condition always evaluates to true
if: >-
${{
env.ABI_BRANCH != github.ref_name &&
(steps.reference.outcome == 'failure' ||
steps.compare.outcome == 'failure')
}}
run: false