Debian Codegraph @

.github/workflows/ci-windows.yml

raw
1 name: MSVC Windows build
2
3 on:
4 push:
5 branches: [ '**' ]
6 pull_request:
7 branches: [ '**' ]
8
9 env:
10 BUILD_TYPE: Release
11
12 permissions:
13 contents: read
14
15 jobs:
16 build:
17
18 runs-on: ci-windows
19 if: ${{ github.repository != 'intel/pcm' }}
20
21 steps:
22 - name: Harden Runner
23 uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
24 with:
25 egress-policy: audit
26
27 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28 with:
29 submodules: recursive
30 - name: Configure CMake
31 run: |
32 if (Test-Path ${{github.workspace}}\build){ Remove-Item ${{github.workspace}}\build -Recurse }
33 cmake -B ${{github.workspace}}\build
34 - name: Build
35 run: |
36 cmake --build ${{github.workspace}}\build --config ${{env.BUILD_TYPE}} --parallel
37 - name: Add MSBuild to PATH
38 uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
39 - name: Build MSR driver
40 run: |
41 chdir ${{github.workspace}}\src\WinMSRDriver
42 msbuild MSR.vcxproj /p:Configuration=Release,Platform=x64 /t:Clean,Build /m
43 - name: upload-artifact
44 uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
45 with:
46 name: PCMforWindows
47 path: build/bin/**/*