Skip to content

Commit 4e97498

Browse files
committed
Add workflow to confirm version.h is in sync and integrate it into Android compilation workflow
1 parent f9cc6c5 commit 4e97498

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/check_version_h.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright (C) 2019 Intel Corporation. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
name: confirm version.h stay in sync
4+
5+
on:
6+
workflow_call:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
confirm_version:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
key: ${{ steps.create_version_h_cache_key.outputs.key}}
16+
permissions:
17+
contents: read
18+
actions: write # for uploading cached artifact
19+
20+
steps:
21+
- name: checkout
22+
uses: actions/checkout@v4
23+
24+
- name: cmake execute to generate version.h
25+
run: cmake -B build_version -S .
26+
27+
- name: confirm version.h
28+
run: |
29+
if [ -z "$(git status --porcelain | grep version.h)" ]; then
30+
echo "version.h is in sync"
31+
else
32+
echo "version.h is not in sync"
33+
exit 1
34+
fi

.github/workflows/compilation_on_android_ubuntu.yml

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ permissions:
7474
contents: read
7575

7676
jobs:
77+
check_version_h:
78+
permissions:
79+
contents: read
80+
actions: write
81+
uses: ./.github/workflows/check_version_h.yml
82+
7783
build_llvm_libraries_on_ubuntu_2204:
7884
permissions:
7985
contents: read

0 commit comments

Comments
 (0)