Merge branch 'master' of https://codefirst.iut.uca.fr/git/nicolas.barbosa/mastermind
continuous-integration/drone/push Build is passing Details

master
Camille TURPIN-ETIENNE 12 months ago
commit 6275580e39

@ -8,44 +8,52 @@ trigger:
- push - push
steps: steps:
- name: build-CoreLibrary - name: build
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- cd Sources - cd Sources
- dotnet restore CoreLibrary/CoreLibrary.csproj - dotnet restore mastermindSansMaui.sln
- dotnet build CoreLibrary/CoreLibrary.csproj -c Release --no-restore - dotnet build mastermindSansMaui.sln -c Release --no-restore
- name: build-ConsoleApp - dotnet publish mastermindSansMaui.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release
image: mcr.microsoft.com/dotnet/sdk:8.0 #- name: build-MauiSpark
commands: # image: mcr.microsoft.com/dotnet/sdk:8.0
- cd Sources # commands:
- dotnet restore ConsoleApp/ConsoleApp.csproj # - mkdir /usr/lib/android-sdk
- dotnet build ConsoleApp/ConsoleApp.csproj -c Release --no-restore # - cd /usr/lib/android-sdk
- name: build-UnitTesting # - wget -O commandlinetools.zip https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip
image: mcr.microsoft.com/dotnet/sdk:8.0 # - apt update && apt install unzip default-jdk -y
commands: # - unzip commandlinetools.zip
- cd Sources # - yes | /usr/lib/android-sdk/cmdline-tools/bin/sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0" --sdk_root=/usr/lib/android-sdk/
- dotnet restore UnitTesting/UnitTesting.csproj # - cd /drone/src/Sources
- dotnet build UnitTesting/UnitTesting.csproj -c Release --no-restore # - dotnet --version
- name: build-MauiSpark # - dotnet workload install maui-android
image: mcr.microsoft.com/dotnet/sdk:8.0 # - dotnet restore MauiSpark/MauiSpark.csproj
commands: # - dotnet build MauiSpark/MauiSpark.csproj -c Release --no-restore /p:AndroidSdkDirectory=/usr/lib/android-sdk/ -property:Aapt2ToolPath=/usr/lib/android-sdk/build-tools/34.0.0
- mkdir /usr/lib/android-sdk
- cd /usr/lib/android-sdk
- wget -O commandlinetools.zip https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip
- apt update && apt install unzip default-jdk -y
- unzip commandlinetools.zip
- yes | /usr/lib/android-sdk/cmdline-tools/bin/sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0" --sdk_root=/usr/lib/android-sdk/
- cd /drone/src/Sources
- dotnet --version
- dotnet workload install maui-android
- dotnet restore MauiSpark/MauiSpark.csproj
- dotnet build MauiSpark/MauiSpark.csproj -c Release --no-restore /p:AndroidSdkDirectory=/usr/lib/android-sdk/ -property:Aapt2ToolPath=/usr/lib/android-sdk/build-tools/34.0.0
- name: tests - name: tests
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- cd Sources/ - cd Sources/
- dotnet restore UnitTesting/UnitTesting.csproj - dotnet restore mastermindSansMaui.sln
- dotnet test UnitTesting/UnitTesting.csproj --no-restore - dotnet test mastermindSansMaui.sln --no-restore
depends_on: [build]
- name: code-inspection
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8
secrets: [ SECRET_SONAR_LOGIN ]
environment:
sonar_host: https://codefirst.iut.uca.fr/sonar/
sonar_token:
from_secret: sonar_token
project_key: celestebarbosa-mastermind
coverage_exclusions: "Tests/**"
commands:
- cd Sources/
- dotnet restore mastermindSansMaui.sln
- dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions=$${coverage_exclusions} /d:sonar.login=$${sonar_token}
- dotnet build mastermindSansMaui.sln -c Release --no-restore
- dotnet test mastermindSansMaui.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- dotnet publish mastermindSansMaui.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
- dotnet sonarscanner end /d:sonar.login=$${sonar_token}
- name: generate-and-deploy-docs - name: generate-and-deploy-docs
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
failure: ignore failure: ignore

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks> <TargetFrameworks>net8.0-android;</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks> <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET --> <!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> --> <!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

@ -9,6 +9,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "ConsoleApp\Co
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiSpark", "MauiSpark\MauiSpark.csproj", "{BD22A919-E40E-4791-A6B0-2B8D37BBE834}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiSpark", "MauiSpark\MauiSpark.csproj", "{BD22A919-E40E-4791-A6B0-2B8D37BBE834}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "UnitTesting\UnitTesting.csproj", "{A2182054-C0D1-46D6-BD39-F3F7926CE2DD}"
ProjectSection(ProjectDependencies) = postProject
{341FB405-085D-4C34-B395-64EF0F9B93E0} = {341FB405-085D-4C34-B395-64EF0F9B93E0}
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -29,6 +34,10 @@ Global
{BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Release|Any CPU.ActiveCfg = Release|Any CPU {BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Release|Any CPU.Build.0 = Release|Any CPU {BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Release|Any CPU.Build.0 = Release|Any CPU
{BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Release|Any CPU.Deploy.0 = Release|Any CPU {BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Release|Any CPU.Deploy.0 = Release|Any CPU
{A2182054-C0D1-46D6-BD39-F3F7926CE2DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2182054-C0D1-46D6-BD39-F3F7926CE2DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2182054-C0D1-46D6-BD39-F3F7926CE2DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2182054-C0D1-46D6-BD39-F3F7926CE2DD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

@ -0,0 +1,46 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreLibrary", "CoreLibrary\CoreLibrary.csproj", "{341FB405-085D-4C34-B395-64EF0F9B93E0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "ConsoleApp\ConsoleApp.csproj", "{97507EBF-3973-4D1C-BE56-2F125B25E74F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "UnitTesting\UnitTesting.csproj", "{A2182054-C0D1-46D6-BD39-F3F7926CE2DD}"
ProjectSection(ProjectDependencies) = postProject
{341FB405-085D-4C34-B395-64EF0F9B93E0} = {341FB405-085D-4C34-B395-64EF0F9B93E0}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{341FB405-085D-4C34-B395-64EF0F9B93E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{341FB405-085D-4C34-B395-64EF0F9B93E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{341FB405-085D-4C34-B395-64EF0F9B93E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{341FB405-085D-4C34-B395-64EF0F9B93E0}.Release|Any CPU.Build.0 = Release|Any CPU
{97507EBF-3973-4D1C-BE56-2F125B25E74F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97507EBF-3973-4D1C-BE56-2F125B25E74F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97507EBF-3973-4D1C-BE56-2F125B25E74F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97507EBF-3973-4D1C-BE56-2F125B25E74F}.Release|Any CPU.Build.0 = Release|Any CPU
{BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Release|Any CPU.Build.0 = Release|Any CPU
{BD22A919-E40E-4791-A6B0-2B8D37BBE834}.Release|Any CPU.Deploy.0 = Release|Any CPU
{A2182054-C0D1-46D6-BD39-F3F7926CE2DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2182054-C0D1-46D6-BD39-F3F7926CE2DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2182054-C0D1-46D6-BD39-F3F7926CE2DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2182054-C0D1-46D6-BD39-F3F7926CE2DD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B3BD74E0-E5DA-4859-B2B7-E3759C2089EE}
EndGlobalSection
EndGlobal
Loading…
Cancel
Save