Skip to content

Commit

Permalink
Attempting to add Gen2DFTLib to autobuild
Browse files Browse the repository at this point in the history
  • Loading branch information
CaiB committed Oct 9, 2024
1 parent e7cca97 commit ec34c48
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 7 deletions.
26 changes: 20 additions & 6 deletions DoAutobuild.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
$BaseDir = $env:APPVEYOR_BUILD_FOLDER;
$BuildVersion = $env:appveyor_build_version;

& nuget restore

& dotnet publish "$env:APPVEYOR_BUILD_FOLDER\ColorChord.NET\ColorChord.NET.csproj" --output "$env:APPVEYOR_BUILD_FOLDER\ColorChord.NET\PublishResult" --configuration Release --verbosity minimal
# ColorChord.NET
& dotnet publish "$BaseDir\ColorChord.NET\ColorChord.NET.csproj" --output "$BaseDir\ColorChord.NET\PublishResult" --configuration Release --verbosity minimal
if ($LastExitCode -NE 0) { [Environment]::Exit(-1); }

$ExtensionDirs = Get-ChildItem "$env:APPVEYOR_BUILD_FOLDER\Extensions\" -Directory
# Extensions
$ExtensionDirs = Get-ChildItem "$BaseDir\Extensions\" -Directory;
$ExtensionDirs | ForEach-Object `
{
& dotnet publish "$env:APPVEYOR_BUILD_FOLDER\Extensions\$($_.Name)\$($_.Name).csproj" --output "$env:APPVEYOR_BUILD_FOLDER\Extensions\PublishResult" -p:OutputPath="$env:APPVEYOR_BUILD_FOLDER\Extensions\PublishResult" --configuration Release --verbosity minimal
& dotnet publish "$BaseDir\Extensions\$($_.Name)\$($_.Name).csproj" --output "$BaseDir\Extensions\PublishResult" -p:OutputPath="$BaseDir\Extensions\PublishResult" --configuration Release --verbosity minimal
if ($LastExitCode -NE 0) { [Environment]::Exit(-2); }
}

# Remove-Item "$env:APPVEYOR_BUILD_FOLDER\Extensions\PublishResult\ColorChord.NET-API.*"
# Gen2DFTLib
$Gen2Profiles = Get-ChildItem "$BaseDir\Gen2DFTLib\Properties\PublishProfiles\" -Filter '*.pubxml' -File;
$Gen2TargetDir = New-Item -ItemType Directory "$BaseDir\Gen2DFTLib\PublishResult"
$Gen2Profiles | ForEach-Object `
{
& dotnet publish "$BaseDir\Gen2DFTLib\Gen2DFTLib.csproj" /p:PublishProfile=$($_.FullName)
if ($LastExitCode -NE 0) { [Environment]::Exit(-3); }
Copy-Item "$BaseDir\Gen2DFTLib\bin\AOT\*" $Gen2TargetDir;
}

& 7z a "ColorChord.NET-autobuild-v$($env:appveyor_build_version).zip" "$env:APPVEYOR_BUILD_FOLDER\ColorChord.NET\PublishResult\*"
& 7z a "ColorChord.NET-Extensions-autobuild-v$($env:appveyor_build_version).zip" "$env:APPVEYOR_BUILD_FOLDER\Extensions\PublishResult\CC.NET-Ext-*"
& 7z a -mx9 "ColorChord.NET-autobuild-v$BuildVersion.zip" "$BaseDir\ColorChord.NET\PublishResult\*"
& 7z a -mx9 "ColorChord.NET-Extensions-autobuild-v$BuildVersion.zip" "$BaseDir\Extensions\PublishResult\CC.NET-Ext-*"
& 7z a -mx9 "Gen2DFTLib-autobuild-v$BuildVersion.zip" $(Join-Path $Gen2TargetDir.FullName '\*')
21 changes: 21 additions & 0 deletions Gen2DFTLib/Properties/PublishProfiles/Win_x64_AVX2.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>x64</Platform>
<PublishDir>bin\AOT\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>false</PublishSingleFile>
<PublishReadyToRun>false</PublishReadyToRun>

<IlcInstructionSet>x86-x64-v3</IlcInstructionSet> <!-- Approx. 2015 level feature set: Haswell/Excavator -->
<AssemblyName>Gen2DFTLib_Win_x64_AVX2</AssemblyName>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<SelfContained>true</SelfContained>
<PublishSingleFile>false</PublishSingleFile>
<PublishReadyToRun>false</PublishReadyToRun>

<IlcInstructionSet>x86-x64</IlcInstructionSet> <!-- SShould work on all x64 -->
<AssemblyName>Gen2DFTLib_Win_x64_Baseline</AssemblyName>
</PropertyGroup>
</Project>
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ build_script:
. $env:APPVEYOR_BUILD_FOLDER\DoAutobuild.ps1
artifacts:
- path: ColorChord.NET*autobuild-v*.zip
- path: Gen2DFTLib-autobuild-v*.zip
deploy:
- provider: GitHub
tag: auto-v$(appveyor_build_version)
release: Automatic Build v$(appveyor_build_version)
description: This is an automatic build of the latest commits. Usage is at your own risk. Unless you are actively debugging, it is recommended to use a regular release instead.
description: This is an automatic build of the latest under-development code. This build may be unstable or may not work at all. If you prefer a more stable build, download one of the regular releases instead.
auth_token:
secure: fIgQpdctIp9szYmG0dfhfD0Cc4/eKQYO7aGXOOYULOB4Bu5SIg6GE+ZRw9kTFNRZ
artifact: /ColorChord\.NET.*autobuild-v.*\.zip/
Expand Down

0 comments on commit ec34c48

Please sign in to comment.