-
Notifications
You must be signed in to change notification settings - Fork 95
113 lines (100 loc) · 2.64 KB
/
Copy pathbuild.yaml
File metadata and controls
113 lines (100 loc) · 2.64 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: "yama-build"
on:
push:
branches:
- "main"
paths:
- "dependencies/**"
- "src/**"
- "rsrc/**"
- "utils/**"
- "**/CmakeLists.txt"
- "**/*.bat"
pull_request:
branches:
- "main"
paths:
- "dependencies/**"
- "src/**"
- "rsrc/**"
- "utils/**"
- "**/CmakeLists.txt"
- "**/*.bat"
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
config:
- {
name: "Build YAMA Scanner",
pe: "YAMA.exe",
}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: 'recursive'
- name: Install ninja build
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install ccache
run: |
choco install -y ccache
(Get-Command ccache).Source
ccache -V
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v4
with:
path: |
C:/Program Files/LLVM
key: llvm-18.1.0
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "18.1.0"
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
# - name: Cache Eventlog manifest
# id: cache-evtx-manifest
# uses: actions/cache@v2
# with:
# path: |
# rsrc/eventlog/Yama.Events.dll
# key: ${{ runner.os }}-evtx-manifest-${{ hashFiles('rsrc/eventlog/Yama.Events.man') }}-${{ hashFiles('rsrc/eventlog/Yama.Events.h') }}
# - name: Build EVTX manifest dll
# run: |
# if ("${{ steps.cache-evtx-manifest.outputs.cache-hit }}" -eq 'true') {
# Write-Host "Using cached rsrc/eventlog/Yama.Events.dll"
# } else {
# Write-Host "No cached rsrc/eventlog/Yama.Events.dll Start building..."
# cd rsrc/eventlog
# ./build.bat
# }
# shell: powershell
- name: Cache .ccache
uses: actions/cache@v4
id: cache-ccache
with:
path: |
.ccache
key: ccache-${{ hashFiles('**/*.cpp', '**/*.hpp') }}
restore-keys: ccache-
- name: Build YAMA Scanner
run: |
./build.bat
shell: powershell
- name: Show ninja build log
run: |
type "./build/yama-ninja.log"
shell: powershell
- name: Check if Yama Scanner exists
run: |
.\build\Yama.exe -V
- name: Archive build results
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.pe }}
path: .\build\Yama.exe