107 lines
3.5 KiB
YAML
107 lines
3.5 KiB
YAML
version: 2.1
|
|
|
|
orbs:
|
|
win: circleci/windows@2.4.0
|
|
|
|
executors:
|
|
linux-build:
|
|
description: "Executor using Debian and .NET Core 3.1"
|
|
docker:
|
|
- image: mcr.microsoft.com/dotnet/core/sdk:3.1-buster
|
|
working_directory: /mnt/ramdisk
|
|
|
|
jobs:
|
|
build_linux:
|
|
description: Build ModernUO with Debian
|
|
executor: linux-build
|
|
steps:
|
|
- run: rm -rf ~/project/.git # CircleCI git caching is likely broken
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dotnet-packages-v1-{{ arch }}-{{ checksum ".circleci/checksum.txt" }}
|
|
- run:
|
|
name: Build Argon2
|
|
command: dotnet build -c Release -r linux-x64 Projects/Argon2/Argon2.csproj
|
|
- run:
|
|
name: Install ModernUO dependencies
|
|
command: dotnet restore
|
|
- save_cache:
|
|
paths:
|
|
- /mnt/ramdisk/packages
|
|
key: dotnet-packages-v1-{{ arch }}-{{ checksum ".circleci/checksum.txt" }}
|
|
- run:
|
|
name: Building ModernUO for Linux (Debug)
|
|
command: dotnet build -c Debug -r linux-x64
|
|
build_windows:
|
|
description: Build application
|
|
executor: win/default
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dotnet-packages-v1-{{ arch }}-{{ checksum ".circleci/checksum.txt" }}
|
|
- run:
|
|
name: Build Argon2
|
|
command: dotnet build -c Debug -r win-x64 Projects/Argon2/Argon2.csproj
|
|
- run:
|
|
name: Install ModernUO dependencies
|
|
command: dotnet restore
|
|
- save_cache:
|
|
paths:
|
|
- /mnt/ramdisk/packages
|
|
key: dotnet-packages-v1-{{ arch }}-{{ checksum ".circleci/checksum.txt" }}
|
|
- run:
|
|
name: Building ModernUO for Windows (Debug)
|
|
command: dotnet build -c Debug -r win-x64
|
|
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-v1-{{ arch }}-{{ checksum ".circleci/checksum.txt" }}
|
|
- run:
|
|
name: Build Argon2
|
|
command: dotnet build -c Debug -r linux-x64 Projects/Argon2/Argon2.csproj
|
|
- run:
|
|
name: Install ModernUO dependencies
|
|
command: dotnet restore
|
|
- save_cache:
|
|
paths:
|
|
- /mnt/ramdisk/packages
|
|
key: dotnet-packages-v1-{{ arch }}-{{ checksum ".circleci/checksum.txt" }}
|
|
- run:
|
|
name: Building with Analyzers
|
|
command: dotnet build -c Analyze -r linux-x64
|
|
tests:
|
|
description: Unit Tests
|
|
executor: linux-build
|
|
steps:
|
|
- run: rm -rf ~/project/.git # CircleCI git caching is likely broken
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dotnet-packages-v1-{{ arch }}-{{ checksum ".circleci/checksum.txt" }}
|
|
- run:
|
|
name: Build Argon2
|
|
command: dotnet build -c Debug -r linux-x64 Projects/Argon2/Argon2.csproj
|
|
- run:
|
|
name: Install ModernUO dependencies
|
|
command: dotnet restore
|
|
- save_cache:
|
|
paths:
|
|
- /mnt/ramdisk/packages
|
|
key: dotnet-packages-linux-{{ checksum ".circleci/checksum.txt" }}
|
|
- run:
|
|
name: Running unit tests
|
|
command: dotnet test -r linux-x64
|
|
workflows:
|
|
build-and-test:
|
|
jobs:
|
|
- build_linux
|
|
- build_windows
|
|
- code_styling
|
|
- tests
|