-
Notifications
You must be signed in to change notification settings - Fork 680
58 lines (52 loc) · 1.41 KB
/
commit-ci.yml
File metadata and controls
58 lines (52 loc) · 1.41 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
name: Commit CI
on:
push:
branches:
- '!master'
tags:
- '![0-9]+.*'
pull_request:
workflow_dispatch:
jobs:
lint:
runs-on: windows-2019
steps:
- name: Checkout last commit
uses: actions/checkout@v4
- name: Install clang-format@18
shell: pwsh
run: |
$version = ""
if (Get-Command "clang-format" -ErrorAction SilentlyContinue){
$version = clang-format --version
$pat = ".*\s+(\d+\.\d+\.\d+)"
if ($version -match $pat) {
$version = $matches[1]
}
}
if ($version -ne "") {
Write-Host "clang-format version:$version"
if ([version]$version -eq [version]"18.1.8") {
Write-Host "clang-format OK"
} else {
Write-Host "clang-format version does not meet"
choco install llvm --version=18.1.8 --force
}
} else {
Write-Host "clang-format not installed"
choco install llvm --version=18.1.8
}
- name: Code style lint
run: make clang-format-lint
linux:
needs: lint
uses: ./.github/workflows/linux-build.yml
macos:
needs: lint
uses: ./.github/workflows/macos-build.yml
windows:
needs: lint
uses: ./.github/workflows/windows-build.yml
docker:
needs: lint
uses: ./.github/workflows/docker-build.yml