-
Notifications
You must be signed in to change notification settings - Fork 361
35 lines (32 loc) · 1.01 KB
/
build.yml
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
name: Build
on:
push:
branches:
- dev
pull_request:
types: [opened, synchronize, reopened]
branches:
- dev
jobs:
build:
name: Build
runs-on: windows-latest
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up msbuild
uses: microsoft/setup-msbuild@v2
- name: Install sonar-scanner and build-wrapper
uses: sonarsource/sonarcloud-github-c-cpp@v3
- name: Build with build-wrapper (mnist)
run: |
build-wrapper-win-x86-64.exe --out-dir build_wrapper_output_directory msbuild examples\mnist\mnist.vcxproj /t:Rebuild /p:Configuration=Release
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
run: |
sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"