ajout du build dans drone
continuous-integration/drone/push Build is passing Details

master
Céleste BARBOSA 12 months ago
parent 7d9f364c0c
commit 9df76fffb5

@ -8,44 +8,34 @@ trigger:
- push
steps:
- name: build-CoreLibrary
- name: build
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- cd Sources
- dotnet restore CoreLibrary/CoreLibrary.csproj
- dotnet build CoreLibrary/CoreLibrary.csproj -c Release --no-restore
- name: build-ConsoleApp
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- cd Sources
- dotnet restore ConsoleApp/ConsoleApp.csproj
- dotnet build ConsoleApp/ConsoleApp.csproj -c Release --no-restore
- name: build-UnitTesting
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- cd Sources
- dotnet restore UnitTesting/UnitTesting.csproj
- dotnet build UnitTesting/UnitTesting.csproj -c Release --no-restore
- name: build-MauiSpark
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- 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
- dotnet restore mastermindSansMaui.sln
- dotnet build mastermindSansMaui.sln -c Release --no-restore
- dotnet publish mastermindSansMaui.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release
#- name: build-MauiSpark
# image: mcr.microsoft.com/dotnet/sdk:8.0
# commands:
# - 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
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- cd Sources/
- dotnet restore UnitTesting/UnitTesting.csproj
- dotnet test UnitTesting/UnitTesting.csproj --no-restore
- dotnet restore mastermindSansMaui.sln
- dotnet test mastermindSansMaui.sln --no-restore
depends_on: [build]
- name: generate-and-deploy-docs
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
failure: ignore

Loading…
Cancel
Save