Skip to content

Commit 3b0dfae

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

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/check_version_h.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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: |
26+
cmake -B build_version -S .
27+
28+
- name: confirm version.h
29+
run: |
30+
if [ -z "$(git status --porcelain | grep version.h)" ]; then
31+
echo "version.h is in sync"
32+
else
33+
echo "version.h is not in sync"
34+
exit 1
35+
fi

.github/workflows/compilation_on_android_ubuntu.yml

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

7676
jobs:
77+
check_version_h:
78+
use: ./.github/workflows/check_version_h.yml
79+
7780
build_llvm_libraries_on_ubuntu_2204:
7881
permissions:
7982
contents: read

0 commit comments

Comments
 (0)