-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.27 KB
/
ci.yaml
File metadata and controls
48 lines (38 loc) · 1.27 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
name: C++ CI
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: '3.29.2'
- name: Install LLVM and Clang
run: |
# Download and install LLVM 19.0.0 from GitHub releases
$llvmVersion = "20.1.7"
$downloadUrl = "https://github.com/llvm/llvm-project/releases/download/llvmorg-$llvmVersion/LLVM-$llvmVersion-win64.exe"
$installerPath = "LLVM-$llvmVersion-windows-x64.exe"
Invoke-WebRequest -Uri $downloadUrl -OutFile $installerPath
Start-Process -FilePath $installerPath -ArgumentList "/S" -Wait
echo "C:\Program Files\LLVM\bin" >> $GITHUB_PATH
# Check what version was installed
clang --version
shell: pwsh
- name: Configure CMake with Clang
run: |
cmake -S . -B build -G "Ninja" `
-DCMAKE_C_COMPILER=clang `
-DCMAKE_CXX_COMPILER=clang++ `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_VERBOSE_MAKEFILE=ON
shell: pwsh
- name: Build
run: cmake --build build
shell: pwsh
- name: Run tests
run: ctest --test-dir build --output-on-failure
shell: pwsh