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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
on:
pull_request:
branches: [master]
permissions: read-all
jobs:
# Use https://lvc.github.io/abi-compliance-checker/ to compare builds
# of pull requests against master. Compares checkouts of github.base_ref and
# github.head_ref.
check-abi-last-release:
runs-on: ubuntu-latest
if: github.repository_owner == 'oneapi-src'
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y elfutils universal-ctags vtable-dumper
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
with:
semver_only: true
- name: Checkout base
uses: actions/checkout@v3
with:
ref: ${{ steps.get-latest-tag.outputs.tag }}
clean: true
path: base
- name: Checkout head
uses: actions/checkout@v3
with:
clean: true
path: head
ref: ${{ github.event.pull_request.head.sha }}
- name: Build debug base
run: |
mkdir base/build
cd base/build
cmake -E env CXXFLAGS="-Og -g" cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j$(nproc)
- name: Build debug head
run: |
mkdir head/build
cd head/build
cmake -E env CXXFLAGS="-Og -g" cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j$(nproc)
- name: Download and setup abi-dumper
run: |
git clone https://github.com/lvc/abi-dumper.git abi-dumper
cp abi-dumper/abi-dumper.pl .
chmod +x abi-dumper.pl
- name: Generate dump for base
run: |
./abi-dumper.pl \
./base/build/lib/libze_loader.so \
-lver $(cat ./base/build/VERSION) \
-public-headers ./base/include \
-o ./base.dump
- name: Generate dump for head
run: |
./abi-dumper.pl \
./head/build/lib/libze_loader.so \
-lver $(cat ./head/build/VERSION)-1 \
-public-headers ./head/include \
-o ./head.dump
- name: Download and setup abi-compliance-checker
run: |
wget https://github.com/lvc/abi-compliance-checker/tarball/master -O abi-compliance-checker.tar.gz
tar -xzf abi-compliance-checker.tar.gz
chmod +x lvc-abi-compliance-checker-*/abi-compliance-checker.pl
- name: Compare dumps
run: |
lvc-abi-compliance-checker-*/abi-compliance-checker.pl \
-l libze_loader \
-old base.dump \
-new head.dump \
-report-path release_report.html
- uses: actions/upload-artifact@v4
if: always()
with:
name: abi-report-last-release
path: release_report.html
check-abi-master:
runs-on: ubuntu-latest
if: github.repository_owner == 'oneapi-src'
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y elfutils universal-ctags vtable-dumper
- name: Checkout base
uses: actions/checkout@v3
with:
ref: ${{ github.base_ref }}
clean: true
path: base
- name: Checkout head
uses: actions/checkout@v3
with:
clean: true
path: head
ref: ${{ github.event.pull_request.head.sha }}
- name: Build debug base
run: |
mkdir base/build
cd base/build
cmake -E env CXXFLAGS="-Og -g" cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j$(nproc)
- name: Build debug head
run: |
mkdir head/build
cd head/build
cmake -E env CXXFLAGS="-Og -g" cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j$(nproc)
- name: Download and setup abi-dumper
run: |
git clone https://github.com/lvc/abi-dumper.git abi-dumper
cp abi-dumper/abi-dumper.pl .
chmod +x abi-dumper.pl
- name: Generate dump for base
run: |
./abi-dumper.pl \
./base/build/lib/libze_loader.so \
-lver $(cat ./base/build/VERSION) \
-public-headers ./base/include \
-o ./base.dump
- name: Generate dump for head
run: |
./abi-dumper.pl \
./head/build/lib/libze_loader.so \
-lver $(cat ./head/build/VERSION)-1 \
-public-headers ./head/include \
-o ./head.dump
- name: Download and setup abi-compliance-checker
run: |
wget https://github.com/lvc/abi-compliance-checker/tarball/master -O abi-compliance-checker.tar.gz
tar -xzf abi-compliance-checker.tar.gz
chmod +x lvc-abi-compliance-checker-*/abi-compliance-checker.pl
- name: Compare dumps
run: |
lvc-abi-compliance-checker-*/abi-compliance-checker.pl \
-l libze_loader \
-old base.dump \
-new head.dump \
-report-path master_report.html
- uses: actions/upload-artifact@v4
if: always()
with:
name: abi-report-master
path: master_report.html
|