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

Adds appveyor for x86, x64 and combined build on windows #182

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
13 changes: 5 additions & 8 deletions ReClass.NET/CodeGenerator/CppCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -566,15 +566,12 @@ private string GetTypeDefinition(BaseNode node, ILogger logger)
return type;
}

switch (node)
return node switch
{
case ClassInstanceNode classInstanceNode:
return $"class {classInstanceNode.InnerNode.Name}";
case EnumNode enumNode:
return enumNode.Enum.Name;
}

return null;
ClassInstanceNode classInstanceNode => $"class {classInstanceNode.InnerNode.Name}",
EnumNode enumNode => enumNode.Enum.Name,
_ => null,
};
}

/// <summary>
Expand Down
68 changes: 68 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
image: Visual Studio 2022

environment:
matrix:
- job_name: Windows Builds x86
job_group: build
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022

- job_name: Windows Builds x64
job_group: build
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022

- job_name: Build Combined
job_depends_on: build
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022


before_build:
- findstr /V "{48C5258A-FA49-4173-AEE5-0FCA5190DFF2}.Debug {48C5258A-FA49-4173-AEE5-0FCA5190DFF2}.Release" .\ReClass.NET.sln > cleaned.sln # This removes the .Unix project from the solution another option would be to create a custom target inside the project
- rm ReClass.NET.sln
- nuget restore # restore nuget dependencies

for:
# ======================================
# Build
# ======================================
-
matrix:
only:
- job_name: Windows Builds x86
# Build the solution with the name cleaned.sln
# Build the solution with the name cleaned.sln
build_script:
- cd %APPVEYOR_BUILD_FOLDER% # CD into the cloned project folder
- msbuild "cleaned.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=Release /property:Platform=x86

-
matrix:
only:
- job_name: Windows Builds x64

# Build the solution with the name cleaned.sln
build_script:
- cd %APPVEYOR_BUILD_FOLDER% # CD into the cloned project folder
- msbuild "cleaned.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=Release /property:Platform=x64


# ======================================
# Release
# ======================================
-
matrix:
only:
- job_name: Build Combined

build_script:
- cd %APPVEYOR_BUILD_FOLDER% # CD into the cloned project folder
- msbuild "cleaned.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=Release /property:Platform=x86
- msbuild "cleaned.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=Release /property:Platform=x64

# Package the builded files into a zip and push as artifacts
after_build:
- cd %APPVEYOR_BUILD_FOLDER% # CD into the cloned project folder
- cd Bin # CD into Bin
- cd Release # CD into Release
- set BUILD_ARCHIVE=%APPVEYOR_PROJECT_NAME%.zip # Set our output archive as projectname-(Debug|Release)-(x86|x64)
- cmd: 7z a -r %BUILD_ARCHIVE% *.dll *.exe # Add all exe and dll files to our archive
- appveyor PushArtifact %BUILD_ARCHIVE% # Upload the archive as an artifact