Skip to content

Commit bef501b

Browse files
committed
feat: A new job in CI to check if checked APIs are up to date
1 parent 612b4bd commit bef501b

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copyright (C) 2019 Intel Corporation. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
4+
name: Verify core/iwasm/include checked APIs to see if they are up to date
5+
6+
on:
7+
# will be triggered on PR events
8+
pull_request:
9+
types:
10+
- opened
11+
- synchronize
12+
paths:
13+
- "core/iwasm/include/**"
14+
- ".github/workflows/verify_checked_apis.yml"
15+
- "ci/generate_checked_functions.py"
16+
push:
17+
paths:
18+
- "core/iwasm/include/**"
19+
- ".github/workflows/verify_checked_apis.yml"
20+
- "ci/generate_checked_functions.py"
21+
22+
# Cancel any in-flight jobs for the same PR/branch so there's only one active
23+
# at a time
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: true
27+
28+
permissions:
29+
contents: read
30+
31+
jobs:
32+
verify_checked_apis:
33+
name: Verify checked APIs
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v3
39+
40+
- name: Set up Python
41+
uses: actions/setup-python@v4
42+
with:
43+
python-version: "3.x"
44+
45+
- name: Install dependencies
46+
run: |
47+
pip install pycparser
48+
sudo apt-get update
49+
sudo apt-get install -y clang-format-14
50+
51+
- name: Generate checked APIs
52+
id: generate_checked_apis
53+
run: |
54+
python3 ci/generate_checked_functions.py
55+
56+
- name: Check for differences
57+
run: |
58+
#it exits with 1 if there were differences and 0 means no differences
59+
git diff --exit-code

0 commit comments

Comments
 (0)