Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dotnet-cake for build #2537

Merged
merged 9 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "1.1.0",
"version": "3.0.0",
"commands": [
"dotnet-cake"
]
}
}
}
}
25 changes: 6 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

name: 'Build'
env:
DotNetVersion: "7.0.100-rc.1.22431.12"
DotNetVersion2: "6.0.202"
NuGetVersion: "5.7.0"
DotNetVersion: "8.0.100-preview.4.23260.5"
DotNetVersion2: "7.0.302"
DotNetVersion3: "6.0.203"
NuGetVersion: "6.5.0"
MonoVersion: "6.12.0"
Artifacts: ${{ github.workspace }}/artifacts/
Coverage: ${{ github.workspace }}/coverage/
Expand Down Expand Up @@ -53,6 +54,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
${{ env.DotNetVersion3 }}
${{ env.DotNetVersion2 }}
${{ env.DotNetVersion }}

Expand All @@ -64,24 +66,9 @@ jobs:
run: |
nuget install tools/packages.config -ExcludeVersion -OutputDirectory tools

# - name: 🍰 Run Cake
# run: |
# dotnet cake --bootstrap
# dotnet cake --configuration=Release --verbosity=Verbose --target=CI --publish-all --archive

- name: 🍰 Run Cake
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
shell: bash
run: |
echo $PATH
chmod 755 ./build.sh
./build.sh --configuration Release --verbosity Verbose --target CI --publish-all --archive

- name: 🍰 Run Cake
if: ${{ runner.os == 'Windows' }}
shell: powershell
run: |
.\build.ps1 -configuration Release -verbosity Verbose -target CI --publish-all --archive
dotnet cake --configuration=Release --verbosity=Verbose --target=CI --publish-all --archive

- name: ⬆ Publish Logs
uses: actions/upload-artifact@v2
Expand Down
32 changes: 6 additions & 26 deletions .github/workflows/tests-net6.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

name: 'Tests net6.0'
env:
DotNetVersion: "7.0.100-rc.1.22431.12"
DotNetVersion2: "6.0.202"
NuGetVersion: "5.7.0"
DotNetVersion: "8.0.100-preview.4.23260.5"
DotNetVersion2: "7.0.302"
DotNetVersion3: "6.0.203"
NuGetVersion: "6.5.0"
MonoVersion: "6.12.0"
Artifacts: ${{ github.workspace }}/artifacts/
Coverage: ${{ github.workspace }}/coverage/
Expand All @@ -17,7 +18,6 @@ on:
- 'CHANGELOG.md'
branches:
- master
- demo/*
- feature/*
tags:
- '*'
Expand Down Expand Up @@ -57,6 +57,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
${{ env.DotNetVersion3 }}
${{ env.DotNetVersion2 }}
${{ env.DotNetVersion }}

Expand All @@ -68,36 +69,15 @@ jobs:
run: |
nuget install tools/packages.config -ExcludeVersion -OutputDirectory tools

# - name: 🍰 Run Cake
# run: |
# dotnet cake --bootstrap
# dotnet cake --configuration=Debug --verbosity=Diagnostic --target=Test --test-project="${{ matrix.testProjects }}"

- name: 🍰 Run Cake
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
uses: nick-invision/retry@v2
with:
shell: bash
timeout_minutes: 40
max_attempts: 3
retry_on: error
command: |
echo $PATH
chmod 755 ./build.sh
./build.sh --configuration Release --verbosity Verbose --target Test --test-project="$TEST_PROJECT" --use-dotnet-test
env:
TEST_PROJECT: ${{ matrix.testProjects }}

- name: 🍰 Run Cake
if: ${{ runner.os == 'Windows' }}
uses: nick-invision/retry@v2
with:
shell: powershell
timeout_minutes: 40
max_attempts: 3
retry_on: error
command: |
.\build.ps1 -configuration Release -verbosity Verbose -target Test --test-project="$ENV:TEST_PROJECT" --use-dotnet-test
dotnet cake --configuration=Release --verbosity=Verbose --target=Test --test-project="$TEST_PROJECT" --use-dotnet-test
env:
TEST_PROJECT: ${{ matrix.testProjects }}

Expand Down
33 changes: 8 additions & 25 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

name: 'Tests'
env:
DotNetVersion: "7.0.100-rc.1.22431.12"
DotNetVersion2: "6.0.202"
NuGetVersion: "5.7.0"
DotNetVersion: "8.0.100-preview.4.23260.5"
DotNetVersion2: "7.0.302"
DotNetVersion3: "6.0.203"
NuGetVersion: "6.5.0"
MonoVersion: "6.12.0"
Artifacts: ${{ github.workspace }}/artifacts/
Coverage: ${{ github.workspace }}/coverage/
Expand All @@ -13,6 +14,8 @@ defaults:
shell: pwsh
on:
pull_request:
paths-ignore:
- 'CHANGELOG.md'
branches:
- master
- feature/*
Expand Down Expand Up @@ -54,6 +57,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
${{ env.DotNetVersion3 }}
${{ env.DotNetVersion2 }}
${{ env.DotNetVersion }}

Expand All @@ -65,36 +69,15 @@ jobs:
run: |
nuget install tools/packages.config -ExcludeVersion -OutputDirectory tools

# - name: 🍰 Run Cake
# run: |
# dotnet cake --bootstrap
# dotnet cake --configuration=Debug --verbosity=Diagnostic --target=Test --test-project="${{ matrix.testProjects }}"

- name: 🍰 Run Cake
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
uses: nick-invision/retry@v2
with:
shell: bash
timeout_minutes: 40
max_attempts: 3
retry_on: error
command: |
echo $PATH
chmod 755 ./build.sh
./build.sh --configuration Release --verbosity Verbose --target Test --test-project="$TEST_PROJECT"
env:
TEST_PROJECT: ${{ matrix.testProjects }}

- name: 🍰 Run Cake
if: ${{ runner.os == 'Windows' }}
uses: nick-invision/retry@v2
with:
shell: powershell
timeout_minutes: 40
max_attempts: 3
retry_on: error
command: |
.\build.ps1 -configuration Release -verbosity Verbose -target Test --test-project="$ENV:TEST_PROJECT"
dotnet cake --configuration=Release --verbosity=Verbose --target=Test --test-project="$TEST_PROJECT"
env:
TEST_PROJECT: ${{ matrix.testProjects }}

Expand Down
12 changes: 9 additions & 3 deletions .pipelines/init.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
parameters:
# Configuration: Release
Verbosity: Normal
DotNetVersion: "7.0.100-rc.1.22431.12"
DotNetVersion2: "6.0.202"
DotNetVersion: "8.0.100-preview.4.23260.5"
DotNetVersion2: "7.0.302"
DotNetVersion3: "6.0.203"
CakeVersion: "1.1.0"
NuGetVersion: "5.7.0"
MonoVersion: ''
Expand All @@ -29,6 +30,11 @@ steps:
inputs:
packageType: 'sdk'
version: ${{ parameters.DotNetVersion2 }}
- task: UseDotNet@2
displayName: Install dotnet $(DotNetVersion3)
inputs:
packageType: 'sdk'
version: ${{ parameters.DotNetVersion3 }}
- task: DotNetCoreCLI@2
displayName: 'dotnet install cake'
inputs:
Expand All @@ -50,7 +56,7 @@ steps:
arguments: install tools/packages.config -ExcludeVersion -OutputDirectory tools
- ${{ if ne(parameters.MonoVersion, '') }}:
- script: |
curl -o mono.pkg https://download.mono-project.com/archive/$MONO_VERSION/macos-10-universal/MonoFramework-MDK-$MONO_VERSION.90.macos10.xamarin.universal.pkg
curl -o mono.pkg https://download.mono-project.com/archive/$MONO_VERSION/macos-10-universal/MonoFramework-MDK-$MONO_VERSION.182.macos10.xamarin.universal.pkg
sudo installer -pkg mono.pkg -target /
sudo cp -rf /Library/Frameworks/Mono.framework/Versions/$MONO_VERSION/ /Library/Frameworks/Mono.framework/Versions/Current/
MONOPREFIX=/Library/Frameworks/Mono.framework/Versions/$MONO_VERSION
Expand Down
1 change: 0 additions & 1 deletion NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="darc-pub-DotNet-msbuild-Trusted-a02f736" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-a02f7365/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="dotnet6-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json" />
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ resources:

variables:
Verbosity: Diagnostic
DotNetVersion: "6.0.400"
CakeVersion: "1.1.0"
NuGetVersion: "5.7.0"
DotNetVersion: "8.0.100-preview.4.23260.5"
CakeVersion: "3.0.0"
NuGetVersion: "6.5.0"
GitVersionVersion: "5.0.1"
MonoVersion: "6.12.0"
Coverage: "$(Agent.BuildDirectory)/c"
Expand Down
Loading