forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 2 KB
/
ci-post-commit-analyzer.yml
File metadata and controls
69 lines (60 loc) · 2 KB
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
name: Post-Commit Static Analyzer
permissions:
contents: read
on:
push:
branches:
- 'release/**'
paths:
- 'llvm/**'
- '.github/workflows/ci-post-commit-analyzer.yml'
pull_request:
paths:
- '.github/workflows/ci-post-commit-analyzer.yml'
schedule:
- cron: '30 0 * * *'
concurrency:
group: >-
llvm-project-${{ github.workflow }}-${{ github.event_name == 'pull_request' &&
( github.event.pull_request.number || github.ref) }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
post-commit-analyzer:
if: >-
github.repository_owner == 'llvm' &&
github.event.action != 'closed'
runs-on: ubuntu-22.04
env:
LLVM_VERSION: 18
steps:
- name: Checkout Source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Dependencies
run: |
sudo echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install \
cmake \
ninja-build \
perl \
clang-tools-$LLVM_VERSION \
clang-$LLVM_VERSION
- name: Configure
run: |
scan-build-$LLVM_VERSION \
--use-c++=clang++ \
--use-cc=clang \
cmake -B build -S llvm -G Ninja \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
scan-build-$LLVM_VERSION -o analyzer-results --use-c++=clang++ --use-cc=clang ninja -v -C build
- name: Upload Results
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
with:
name: analyzer-results
path: 'analyzer-results/**/*'