From fa5460b5ab228e5f463976895765f2aa44fb9929 Mon Sep 17 00:00:00 2001 From: Justin Emgarten Date: Fri, 19 Apr 2024 14:27:15 -0700 Subject: [PATCH 1/2] Add workflow_dispatch option to github actions (#192) --- .github/workflows/dotnet.yml | 6 ++++++ .github/workflows/functional.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c62ccf9..ee2d8d7 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -14,6 +14,12 @@ on: paths-ignore: - 'doc/**' - '*.md' + workflow_dispatch: + inputs: + branch: + description: 'Branch to run on' + required: true + default: 'main' jobs: build-linux: diff --git a/.github/workflows/functional.yml b/.github/workflows/functional.yml index 4903a12..7e09793 100644 --- a/.github/workflows/functional.yml +++ b/.github/workflows/functional.yml @@ -11,6 +11,12 @@ on: paths-ignore: - 'doc/**' - '*.md' + workflow_dispatch: + inputs: + branch: + description: 'Branch to run on' + required: true + default: 'main' jobs: build-linux: From d935a05dab37505e72eb840efd6a0c0d9ad77418 Mon Sep 17 00:00:00 2001 From: Justin Emgarten Date: Fri, 19 Apr 2024 17:19:01 -0700 Subject: [PATCH 2/2] Remove dotnet format (#194) * Revert "Add workflow_dispatch option to github actions (#192)" This reverts commit fa5460b5ab228e5f463976895765f2aa44fb9929. * Update common build folder * Remove dotnet format --- .github/workflows/dotnet.yml | 6 ----- .github/workflows/functional.yml | 6 ----- build.ps1 | 3 --- build/common/common.ps1 | 42 -------------------------------- build/common/common.sh | 12 --------- 5 files changed, 69 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ee2d8d7..c62ccf9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -14,12 +14,6 @@ on: paths-ignore: - 'doc/**' - '*.md' - workflow_dispatch: - inputs: - branch: - description: 'Branch to run on' - required: true - default: 'main' jobs: build-linux: diff --git a/.github/workflows/functional.yml b/.github/workflows/functional.yml index 7e09793..4903a12 100644 --- a/.github/workflows/functional.yml +++ b/.github/workflows/functional.yml @@ -11,12 +11,6 @@ on: paths-ignore: - 'doc/**' - '*.md' - workflow_dispatch: - inputs: - branch: - description: 'Branch to run on' - required: true - default: 'main' jobs: build-linux: diff --git a/build.ps1 b/build.ps1 index 9531eea..c8c09ed 100644 --- a/build.ps1 +++ b/build.ps1 @@ -49,9 +49,6 @@ if ($AWSDefaultRegion) { # Download tools Install-CommonBuildTools $RepoRoot -# Run dotnet-format to apply style fixes or fail on CI builds -Invoke-DotnetFormat $RepoRoot - # Clean and write git info Remove-Artifacts $RepoRoot Invoke-DotnetMSBuild $RepoRoot ("build\build.proj", "/t:Clean;WriteGitInfo", "/p:Configuration=$Configuration") diff --git a/build/common/common.ps1 b/build/common/common.ps1 index 279e16a..d351718 100644 --- a/build/common/common.ps1 +++ b/build/common/common.ps1 @@ -126,21 +126,6 @@ Function Invoke-DotnetMSBuild { Invoke-DotnetExe $RepoRoot $buildArgs } -Function Install-DotnetTools { - param( - [string]$RepoRoot - ) - - $toolsPath = Join-Path $RepoRoot ".nuget/tools" - - if (-not (Test-Path $toolsPath)) { - Write-Host "Installing dotnet tools to $toolsPath" - $args = @("tool","install","--tool-path",$toolsPath,"--ignore-failed-sources","dotnet-format","--version","5.1.250801") - - Invoke-DotnetExe $RepoRoot $args - } -} - Function Install-CommonBuildTools { param( [string]$RepoRoot @@ -148,31 +133,4 @@ Function Install-CommonBuildTools { Install-DotnetCLI $RepoRoot Install-NuGetExe $RepoRoot - Install-DotnetTools $RepoRoot -} - -Function Invoke-DotnetFormat { - param( - [string]$RepoRoot - ) - - # Only run in local dev envs - if ($env:CI -ne "True") - { - $formatExe = Join-Path $RepoRoot ".nuget/tools/dotnet-format.exe" - - $args = @("--fix-whitespace", "--fix-style", "warn") - - $command = "$formatExe $args" - Write-Host "[EXEC] $command" -ForegroundColor Cyan - - & $formatExe $args - - if (-not $?) { - Write-Warning "dotnet-format failed. Please fix the style errors!" - - # Currently dotnet-format fails on CIs but not locally in some scenarios - # exit 1 - } - } } \ No newline at end of file diff --git a/build/common/common.sh b/build/common/common.sh index 4623e11..8d71b5c 100644 --- a/build/common/common.sh +++ b/build/common/common.sh @@ -7,8 +7,6 @@ run_standard_tests() # Download dotnet cli REPO_ROOT=$(pwd) DOTNET=$(pwd)/.cli/dotnet - DOTNET_TOOLS=$(pwd)/.nuget/tools - DOTNET_FORMAT=$DOTNET_TOOLS/dotnet-format if [ ! -f $DOTNET ]; then echo "Installing dotnet" @@ -24,16 +22,6 @@ run_standard_tests() # Display info $DOTNET --info - # install dotnet-format - if [ ! -d $DOTNET_TOOLS ]; then - echo "Installing dotnet tools" - mkdir -p .nuget/tools - - $DOTNET tool install --tool-path $DOTNET_TOOLS --ignore-failed-sources dotnet-format --version 5.1.250801 - fi - - $DOTNET_FORMAT --fix-whitespace --fix-style warn - # clean rm -r -f $(pwd)/artifacts