-
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
102 additions
and
91 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Validate | ||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.x | ||
|
||
# - name: Build Native Bridge | ||
# run: dotnet build -c Release ./SharpShellNativeBridge/SharpShellNativeBridge.sln | ||
|
||
- name: Build SharpShell | ||
run: dotnet build -c Release ./SharpShell/SharpShell.sln | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifacts | ||
path: | | ||
./SharpShellNativeBridge/artifacts | ||
./SharpShell/artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
# Define the location of the xml report and html report. | ||
$coverageDir = "$PSScriptRoot\artifacts\coverage" | ||
$coverageDir = "$PSScriptRoot\artifacts\coverage" | ||
$coverageReport = "$coverageDir\coverage.xml" | ||
|
||
# Quote arguments for the commandline. | ||
$testAssemblyArgs = "`"$PSScriptRoot\SharpShell.Tests\bin\Release\SharpShell.Tests.dll`"" | ||
$workArgs = "`"$PSScriptRoot\artifacts\tests`"" | ||
# Get the set of test assemblies and the work folder. | ||
$testAssemblies = Get-ChildItem -Include *.Tests.dll -Recurse | Where-Object {$_.FullName -like "*bin\Release*"} | ||
$workArgs = "$PSScriptRoot\artifacts\tests" | ||
|
||
# Create an artifacts directory and build the report. | ||
# Create an artifacts directory and create the command to build the report. | ||
New-Item -ItemType Directory -Force -Path "$PSScriptRoot\artifacts\coverage" | ||
OpenCover.Console.exe "-target:nunit3-console.exe" ` | ||
-targetargs:"$testAssemblyArgs --work=$workArgs" ` | ||
$command = "OpenCover.Console.exe -target:nunit3-console.exe" ` | ||
"-targetargs:`"$testAssemblies --work=$workArgs`"" ` | ||
"-filter:+[SharpShell*]* -[SharpShell.Tests*]*" ` | ||
"-register:user" ` | ||
"-output:$coverageReport" | ||
"-register:user -output:$coverageReport" | ||
Write-Host "Running: `"$command`"" | ||
Invoke-Expression $command | ||
|
||
# Create a local report. | ||
reportgenerator "-reports:$coverageReport" "-targetdir:$coverageDir\html" | ||
|
||
# Upload the report to codecov. The CODECOV_TOKEN env var must be set. | ||
codecov -f "$coverageReport" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Create the artifacts packages folder. | ||
$artifactsFolder = "$PSScriptRoot/artifacts/packages" | ||
|
||
if (Test-Path $artifactsFolder) { Remove-Item $artifactsFolder -Recurse -Force } | ||
New-Item -Path $artifactsFolder -ItemType directory | ||
|
||
# Package each of our projects. This must be run *after* ./build.ps1. | ||
dotnet pack --no-restore --no-build "$PSScriptRoot/SharpShell.csproj" -c:Release | ||
|
||
# Copy over the packages. | ||
Get-ChildItem "$PSScriptRoot" -Include SharpGL*.nupkg -Recurse | Copy-Item -Destination $artifactsFolder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,57 @@ | ||
version: 1.0.{build} | ||
image: Visual Studio 2017 | ||
image: Visual Studio 2019 | ||
configuration: Release | ||
environment: | ||
CODECOV_TOKEN: 875a7530-b25b-49e9-a2ba-fe8b7a80cc6b | ||
|
||
# Cache chocolatey packages and Nuget packages. Nuget package cache is invalidated | ||
# on any change to a project file, the choco cache on any change to the config | ||
# nuget file. | ||
cache: | ||
- SharpShell/packages -> **/*.csproj | ||
- C:/ProgramData/chocolatey/bin -> ./SharpShell/config.ps1 | ||
- C:/ProgramData/chocolatey/lib -> ./SharpShell/config.ps1 | ||
|
||
# Before building, restore Nuget packages and install dependencies. | ||
before_build: | ||
- ps: | | ||
nuget restore SharpShell\SharpShell.sln | ||
.\SharpShell\config.ps1 | ||
- ps: | | ||
nuget restore SharpShell/SharpShell.sln | ||
./SharpShell/config.ps1 | ||
build: | ||
project: SharpShell\SharpShell.sln | ||
publish_nuget: true | ||
verbosity: minimal | ||
# Use our own build script. | ||
build_script: | ||
- ps: | | ||
./SharpShell/build.ps1 | ||
./SharpShell/pack.ps1 | ||
# After the build as completed, analyse coverage and upload. | ||
on_success: | ||
- ps: ./SharpShell/coverage.ps1 | ||
|
||
# Before packaging, zip up the tools. | ||
before_package: | ||
- ps: | | ||
7z a ServerManager.zip C:\projects\sharpshell\SharpShell\Tools\ServerManager\bin\Release\* | ||
7z a ServerRegistrationManager.zip C:\projects\sharpshell\SharpShell\Tools\ServerRegistrationManager\bin\Release\* | ||
- ps: | | ||
7z a ServerManager.zip C:/projects/sharpshell/SharpShell/Tools/ServerManager/bin/Release/* | ||
7z a ServerRegistrationManager.zip C:/projects/sharpshell/SharpShell/Tools/ServerRegistrationManager/bin/Release/* | ||
# Track our artifacts. | ||
artifacts: | ||
- path: ServerManager.zip | ||
name: ServerManager | ||
- path: ServerRegistrationManager.zip | ||
name: ServerRegistrationManager | ||
- path: SharpShell\artifacts | ||
name: artifacts | ||
- path: ServerManager.zip | ||
name: ServerManager | ||
- path: ServerRegistrationManager.zip | ||
name: ServerRegistrationManager | ||
- path: SharpShell/artifacts | ||
name: artifacts | ||
- path: './source/**/*.nupkg' | ||
|
||
# Deploy to Nuget and GitHub Releases. | ||
deploy: | ||
- provider: NuGet | ||
api_key: | ||
secure: TWio+nDN8Ew7+OH7J3tLcEoM6DmxrIwfAr+2Ag8ROWJUEnXyoSAZ/I1GxBgB0qMd | ||
on: | ||
APPVEYOR_REPO_TAG: true | ||
- provider: GitHub | ||
auth_token: | ||
secure: KTWUORrnJKPKLSf/3ROLY50T9UfgTMnKHf3OjBOv8tlY/DAxtlglRU3eM+j45fMt | ||
artifact: SharpShell.*.nupkg, ServerRegistrationManager.*.nupkg, ServerManager.zip, ServerRegistrationManager.zip | ||
on: | ||
APPVEYOR_REPO_TAG: true | ||
|
||
# After the build as completed, analyse coverage and upload. | ||
on_success: | ||
- ps: ./SharpShell/coverage.ps1 | ||
- provider: NuGet | ||
api_key: | ||
secure: TWio+nDN8Ew7+OH7J3tLcEoM6DmxrIwfAr+2Ag8ROWJUEnXyoSAZ/I1GxBgB0qMd | ||
on: | ||
APPVEYOR_REPO_TAG: true | ||
- provider: GitHub | ||
auth_token: | ||
secure: KTWUORrnJKPKLSf/3ROLY50T9UfgTMnKHf3OjBOv8tlY/DAxtlglRU3eM+j45fMt | ||
on: | ||
APPVEYOR_REPO_TAG: true |