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 - 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: 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

Loading…
Cancel
Save