-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (38 loc) · 1.67 KB
/
dotnet-format.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: dotnet-format
on:
pull_request:
branches:
- main
workflow_dispatch:
env:
# Stop wasting time caching packages
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending usage data to Microsoft
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
lint:
runs-on: ubuntu-latest
name: Code Convention Check
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup .NET @ Latest
uses: actions/[email protected]
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Configure Project
run: sudo cmake -Bcmake-build-release -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release .
- name: Build Project
run: sudo cmake --build cmake-build-release --config=Release
- name: Create local runtime NuGet package
run: sudo cmake --build cmake-build-release --config=Release --target cpu_features_dotnet_runtime_package
- name: Create local NuGet package
run: sudo cmake --build cmake-build-release --config=Release --target cpu_features_dotnet_package
- name: Add NuGet package to tests
run: sudo cmake --build cmake-build-release --config=Release --target add_nuget_package_to_tests
- name: Setup dotnet-format tool
run: sudo dotnet tool install --global dotnet-format --version 4.1.131201
- name: Check CpuFeaturesDotNet
run: sudo dotnet format "src/CpuFeaturesDotNet/CpuFeaturesDotNet.csproj" --verify-no-changes --verbosity diagnostic
- name: Check CpuFeaturesDotNet.UnitTesting
run: sudo dotnet format "tests/CpuFeaturesDotNet.Testing.csproj" --verify-no-changes --verbosity diagnostic