Adds analyzers to Circle CI (#116)
This commit is contained in:
parent
0a777c2fda
commit
5fa31feee2
1 changed files with 60 additions and 6 deletions
|
|
@ -1,22 +1,76 @@
|
||||||
version: 2.1
|
version: 2.1
|
||||||
jobs:
|
|
||||||
build:
|
orbs:
|
||||||
description: Build application
|
win: circleci/windows@2.4.0
|
||||||
|
|
||||||
|
executors:
|
||||||
|
linux-build:
|
||||||
|
description: "Executor using Debian and .NET Core 3.1"
|
||||||
docker:
|
docker:
|
||||||
- image: mcr.microsoft.com/dotnet/core/sdk:3.1-buster
|
- image: mcr.microsoft.com/dotnet/core/sdk:3.1-buster
|
||||||
working_directory: /mnt/ramdisk
|
working_directory: /mnt/ramdisk
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_linux:
|
||||||
|
description: Build ModernUO with Debian
|
||||||
|
executor: linux-build
|
||||||
steps:
|
steps:
|
||||||
|
- run: rm -rf ~/project/.git # CircleCI git caching is likely broken
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- dotnet-packages-v1-{{ checksum "Projects/Server/Server.csproj" }}-{{ checksum "Projects/Scripts/Scripts.csproj" }}
|
- dotnet-packages-linux-{{ checksum "Projects/Server/Server.csproj" }}-{{ checksum "Projects/Scripts/Scripts.csproj" }}
|
||||||
- run:
|
- run:
|
||||||
name: Install ModernUO dependencies
|
name: Install ModernUO dependencies
|
||||||
command: dotnet restore
|
command: dotnet restore
|
||||||
- save_cache:
|
- save_cache:
|
||||||
paths:
|
paths:
|
||||||
- ~/.nuget/packages
|
- ~/.nuget/packages
|
||||||
key: dotnet-packages-v1-{{ checksum "Projects/Server/Server.csproj" }}-{{ checksum "Projects/Scripts/Scripts.csproj" }}
|
key: dotnet-packages-linux-{{ checksum "Projects/Server/Server.csproj" }}-{{ checksum "Projects/Scripts/Scripts.csproj" }}
|
||||||
- run:
|
- run:
|
||||||
name: Building ModernUO for Linux (Debug)
|
name: Building ModernUO for Linux (Debug)
|
||||||
command: dotnet build -c Debug /p:PublishProfile=Linux
|
command: dotnet build -c Release /p:PublishProfile=Linux
|
||||||
|
build_windows:
|
||||||
|
description: Build application
|
||||||
|
executor: win/default
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- dotnet-packages-windows-{{ checksum "Projects/Server/Server.csproj" }}-{{ checksum "Projects/Scripts/Scripts.csproj" }}
|
||||||
|
- run:
|
||||||
|
name: Install ModernUO dependencies
|
||||||
|
command: dotnet restore
|
||||||
|
- save_cache:
|
||||||
|
paths:
|
||||||
|
- ~/.nuget/packages
|
||||||
|
key: dotnet-packages-windows-{{ checksum "Projects/Server/Server.csproj" }}-{{ checksum "Projects/Scripts/Scripts.csproj" }}
|
||||||
|
- run:
|
||||||
|
name: Building ModernUO for Linux (Debug)
|
||||||
|
command: dotnet build -c Release /p:PublishProfile=Windows
|
||||||
|
code_styling:
|
||||||
|
description: Code analysis
|
||||||
|
executor: linux-build
|
||||||
|
steps:
|
||||||
|
- run: rm -rf ~/project/.git # CircleCI git caching is likely broken
|
||||||
|
- checkout
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- dotnet-packages-linux-{{ checksum "Projects/Server/Server.csproj" }}-{{ checksum "Projects/Scripts/Scripts.csproj" }}
|
||||||
|
- run:
|
||||||
|
name: Install ModernUO dependencies
|
||||||
|
command: dotnet restore
|
||||||
|
- save_cache:
|
||||||
|
paths:
|
||||||
|
- ~/.nuget/packages
|
||||||
|
key: dotnet-packages-linux-{{ checksum "Projects/Server/Server.csproj" }}-{{ checksum "Projects/Scripts/Scripts.csproj" }}
|
||||||
|
- run:
|
||||||
|
name: Building with Analyzers
|
||||||
|
command: dotnet build -c Analyze /p:PublishProfile=Linux
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
build-and-test:
|
||||||
|
jobs:
|
||||||
|
- build_linux
|
||||||
|
- build_windows
|
||||||
|
- code_styling
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue